context-optimization

검토 · 63
Registry 색인

>-

Verified installs0
스타33
버전1.0.0
품질57/100 · 유망
신뢰63/100 · 샌드박스 전용
감사74/100 · 검토 필요

공급 자산 프로필

리서치 및 지식 작업

Deep research, source comparison, literature review, RAG, knowledge search, and reports.

트랙 보기

시나리오

리서치 Agent

I need my agent to research a topic, compare sources, and produce a concise report.

Agent 적합도

Claude Code + CLI + Codex

Codex, Claude Code, Cursor, CLI 또는 맞춤형 Agent에 적합합니다.

설치

준비됨

npx skills add shipshitdev/skills --skill context-optimization

유지보수

최신

마지막 푸시 후 2일

위험

검토 필요

라이선스가 명확하지 않습니다

GitHub 품질

33

57/100 품질 · 71/100 신뢰

커버리지 태그

리서치리서치 Agent자동화agent-skill

검토 메모

라이선스가 명확하지 않습니다 · Low GitHub adoption signal

Agent 채택 스코어카드

신뢰, 감사, 설치 준비 상태를 한눈에 확인하세요

이 점수는 공개 저장소 메타데이터, OpenAgentSkill 검토 신호, 유지보수 최신성, 설치 준비 상태를 결합합니다. 후보 선정 신호일 뿐, 사람의 검토를 대체하지 않습니다.

품질

유망
57

유용한 후보이지만 채택 전에 대안과 비교하세요.

신뢰

샌드박스 전용
63

신뢰 신호가 부족하거나 혼재된 유용한 후보입니다. 결과 루프가 작업 적합성을 입증할 때까지 격리된 작업 공간에서 사용하세요.

감사

검토 필요
74

설치 준비 상태, 보안 메타데이터, 유지보수 및 채택 위험에 대한 기계 판독형 검토입니다.

OpenAgentSkill 신뢰 점수 v5

설치 전 사람 검토

실제 작업에 사용하기 전 샌드박스에서만 실행하고 유사 대안과 비교하세요.

CodexClaude CodeCursorOpenAgentSkill CLI

스타

GitHub 스타 33

저장소 활동

스타 33, 포크 3

유지보수

마지막 푸시 후 2일

라이선스

알 수 없음

설치

npx skills add shipshitdev/skills --skill context-optimization

설치 안전성

표준 패키지 또는 런타임 설치 경로

권한 범위

secrets or environment access

Agent 결과

아직 Agent 결과 데이터가 없습니다

문서

Usable metadata, review docs

위험 요약

프로덕션 전 검토

  • 라이선스가 명확하지 않습니다
  • Low GitHub adoption signal
  • Quality score needs review
  • GitHub adoption: 33 GitHub stars

설치 준비 상태

설치 경로 사용 가능

  • 설치 경로를 사용할 수 있습니다
  • 저장소 근거를 사용할 수 있습니다
  • 라이선스가 명확하지 않습니다
  • 아직 Agent 검증 결과 근거가 없습니다

Agent 읽기용 메타데이터

이 스킬의 기계 판독형 의사결정 데이터.

이 블록 또는 포함된 JSON을 사용해 Agent가 이 스킬을 설치할지, 대안을 고를지, 먼저 사람의 검토를 요청할지 판단할 수 있습니다.

JSON 열기

적합한 작업

  • Browser automation 워크플로
  • Claude Code 팀
  • builders willing to evaluate younger projects
  • Navigate pages

적합한 Agent

CodexClaude CodeCursorOpenAgentSkill CLICLI

설치 결정

명령어
npx skills add shipshitdev/skills --skill context-optimization
정책
검토
사람 검토

신뢰와 위험

신뢰
63/100
감사
74/100
위험 수준
검토 필요

결과 루프

엔드포인트
/api/agent/outcome
이벤트 ID
resolve
결과
5

설치 명령어

npx skills add shipshitdev/skills --skill context-optimization

사용하지 말아야 할 경우

  • 벤더 지원 SLA가 필요한 팀
  • production agents without a repository review
  • Low GitHub adoption signal
  • 아직 OpenAgentSkill 사용 피드백 데이터가 없습니다
  • 고위험 권한 힌트: Secrets or environment access

Agent 안전 v2

46/100 · 자동 설치 피하기

실험적검토

Sparse or mixed signals. Useful for discovery, but not for autonomous installation.

Test manually in an isolated workspace and compare against safer alternatives.

API로 해결

중간

네트워크 접근

Skill은 원격 페이지, API, 저장소 또는 외부 서비스에 접근할 수 있습니다.

높음

Secrets or environment access

Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.

중간

데이터베이스 접근

Skill은 스키마를 검사하고 데이터베이스를 질의하거나 영구 저장소를 다룰 수 있습니다.

  • 고위험 권한 힌트: Secrets or environment access
  • 라이선스가 명확하지 않습니다

설치 대상

Agent 워크플로에 이 스킬 설치

공개 설치 엔드포인트에서 명령어, 안전 체크리스트, 대상 프롬프트와 정규 링크를 가져옵니다.

skill install

OpenAgentSkill CLI

Resolve policy, run the source installer safely, and report a verified install receipt.

$ npx --yes https://github.com/Leon-Drq/openagentskill/releases/download/cli-v0.2.1/openagentskill-0.2.1.tgz install shipshitdev-context-optimization

Agent 해결 계획

설치 전에 Agent가 적합성을 검증하게 하세요.

Resolve API는 최우선 스킬, 대안, 안전 정책, 감사 메모, 설치 대상 및 Agent가 페이지를 스크래핑하지 않고 사용할 수 있는 프롬프트를 반환합니다.

텍스트 계획 열기

Agent가 확인할 항목

  • Resolve API에서 작업 적합도와 대안을 확인합니다.
  • 감사 점수, 신뢰 점수 및 안전 정책 경고를 확인합니다.
  • Codex, Claude Code, Cursor 또는 CLI의 설치 대상 호환성을 확인합니다.

프롬프트 복사

Task: Use context-optimization in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20context-optimization%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/shipshitdev-context-optimization/install
Install command: npx skills add shipshitdev/skills --skill context-optimization
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.

Agent 핸드오프

또 다른 디렉터리 페이지 대신 설치 경로를 Agent에게 제공합니다.

공개 설치 엔드포인트에서 명령어, 안전 체크리스트, 대상 프롬프트와 정규 링크를 가져옵니다.

설치 API 열기

Agent 프롬프트

Use context-optimization for this task. Review https://www.openagentskill.com/api/skills/shipshitdev-context-optimization/install, then install with: npx skills add shipshitdev/skills --skill context-optimization

Registry 메타데이터

자동 스킬 선택을 위한 Agent 읽기용 프로필.

Registry API를 통해 동일한 결정, 신뢰, 감사, 사용 사례, 설치 신호를 제공하므로 Agent가 UI를 스크래핑하지 않고도 순위를 매길 수 있습니다.

Manifest 열기

Agent 적합도

56/100

Browser automation

플랫폼

Claude Code

감사 보고서

검토 필요 · 74/100

설치 준비 상태, 보안 메타데이터, 유지보수 및 채택 위험에 대한 기계 판독형 검토입니다.

감사 보고서 보기평가 보고서 보기

Agent 결정 패널

Needs validation for Browser automation

Agent 워크플로에 추가하기 전에 저장소를 수동으로 검토하세요.

56
준비 상태
검토
단계

스택 내 역할

검증 필요

주요 적합도

Browser automation

신뢰 라벨

사람 검토 필요

설치 경로

명령어 준비됨

사용 시점

  • Browser automation 워크플로
  • Claude Code 팀
  • builders willing to evaluate younger projects

근거

  • 최근 저장소 활동
  • 설치 명령 또는 GitHub 저장소를 사용할 수 있습니다
  • 품질 프로필 57/100

먼저 검토

  • Low GitHub adoption signal
  • 아직 OpenAgentSkill 사용 피드백 데이터가 없습니다

구현 경로

  1. 1샌드박스 Agent에 설치하고 Browser automation 작업을 처음부터 끝까지 한 번 실행하세요.
  2. 2Compare output quality, latency, and failure behavior against at least one alternative.
  3. 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.

신뢰 프로필

샌드박스 전용

신뢰 신호가 부족하거나 혼재된 유용한 후보입니다. 결과 루프가 작업 적합성을 입증할 때까지 격리된 작업 공간에서 사용하세요.

63
OpenAgentSkill 신뢰 점수

GitHub 채택도

확인

GitHub 스타 33

스타/포크 활동

확인

스타 33, 포크 3; 현재 메타데이터에서 이슈 활동을 확인할 수 없습니다

최근 유지보수

통과

마지막 푸시 후 2일

라이선스 명확성

확인

알 수 없음

긍정 신호

  • AI 검토 승인됨
  • 설치 경로를 사용할 수 있습니다
  • 저장소 근거를 사용할 수 있습니다
  • 최근 유지보수된 저장소
  • 설치 명령에서 뚜렷한 고위험 패턴이 발견되지 않았습니다
  • 결과 루프는 준비되었지만 첫 실제 Agent 실행이 필요합니다

설치 전 검토

  • 라이선스가 명확하지 않습니다
  • Low GitHub adoption signal
  • Quality score needs review
  • GitHub adoption: 33 GitHub stars
  • Stars/forks activity: 33 stars, 3 forks; issue activity unavailable in current metadata
  • License clarity: Unknown
  • 아직 실제 Agent 결과 보고서가 없습니다
  • 무인 설치 전에 사람 검토가 필요합니다

권장 작업

실제 작업에 사용하기 전 샌드박스에서만 실행하고 유사 대안과 비교하세요.

품질 프로필

유망 Agent 워크플로용 후보

유용한 후보이지만 채택 전에 대안과 비교하세요.

57
GitHub 스타
33
최신성
2일 전
설치 준비됨
라이선스
알 수 없음
설치 전 검토: Low GitHub adoption signal

워크플로 적합도

이 스킬을 사용할 시나리오

워크플로 적합도

완전한 워크플로에 추가

대안 후보

설치 전 비교

이 작업에 적합할 수 있는 유사 스킬입니다.

모두 비교

개요

--- name: context-optimization description: >- Improve context efficiency through context budgeting, observation masking, prefix or KV-cache strategy, partitioning, token-cost reduction, retrieval scoping, and extending effective context capacity without lowering answer quality. Use when token costs or context budgets constrain a task, tool outputs are verbose, cache hit rate is low, or context must be partitioned across agents. metadata: version: "2.1.0" source: https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/context-optimization/SKILL.md upstream_repo: muratcankoylan/Agent-Skills-for-Context-Engineering upstream_ref: main upstream_commit: cbc2c978133d last_synced: "2026-06-12" license: MIT tags: "context, optimization, agents" --- # Context Optimization Techniques

Context optimization extends the effective capacity of limited context windows through compression, masking, caching, and partitioning, applied with measurement discipline. The techniques below are ordered by impact and risk.

## When to Activate

- Context budgets or token costs constrain task complexity - Observation masking can replace verbose tool outputs with retrievable references - Prefix or KV-cache hit rate needs improvement - Retrieval scoping can reduce irrelevant loaded context - Context partitioning can extend effective capacity across agents - Budget triggers are needed for masking, compaction, or partitioning

Do not activate this skill for adjacent work owned by other skills:

- Explaining why attention or context windows behave this way: `context-fundamentals`. - Diagnosing active lost-in-middle, poisoning, distraction, confusion, or clash: `context-degradation`.

## Core Concepts

Apply four primary strategies in this priority order:

1. **KV-cache optimization** — Reorder and stabilize prompt structure so the inference engine reuses cached Key/Value tensors. This is the cheapest optimization when the runtime supports prefix caching: low quality risk, immediate cost and latency savings. Apply it first when stable prefixes exist.

2. **Observation masking** — Replace verbose tool outputs with compact references once their purpose has been served. Tool outputs can dominate agent trajectories (claim-context-optimization-tool-output-dominance), so masking often yields the largest capacity gains. The original content remains retrievable if needed downstream.

3. **Compaction** — Summarize accumulated context when utilization exceeds 70%, then reinitialize with the summary. This distills the window's contents while preserving task-critical state. Compaction is lossy — apply it after masking has already removed the low-value bulk.

4. **Context partitioning** — Split work across sub-agents with isolated contexts when a single window cannot hold the full problem. Each sub-agent operates in a clean context focused on its subtask. Reserve this for tasks where estimated context exceeds 60% of the window limit, because coordination overhead is real.

The governing principle: context quality matters more than quantity. Every optimization preserves signal while reducing noise. Measure before optimizing, then measure the optimization's effect.

## Detailed Topics

### Compaction Strategies

Trigger compaction when context utilization exceeds 70%: summarize the current context, then reinitialize with the summary. This distills the window's contents in a high-fidelity manner, enabling continuation with minimal performance degradation. Prioritize compressing tool outputs first (they consume 80%+ of tokens), then old conversation turns, then retrieved documents. Never compress the system prompt — it anchors model behavior and its removal causes unpredictable degradation.

Preserve different elements by message type:

- **Tool outputs**: Extract key findings, metrics, error codes, and conclusions. Strip verbose raw output, stack traces (unless debugging is ongoing), and boilerplate headers. - **Conversational turns**: Retain decisions, commitments, user preferences, and context shifts. Remove filler, pleasantries, and exploratory back-and-forth that led to a conclusion already captured. - **Retrieved documents**: Keep claims, facts, and data points relevant to the active task. Remove supporting evidence and elaboration that served a one-time reasoning purpose.

Target 50-70% token reduction with less than 5% quality degradation. If compaction exceeds 70% reduction, audit the summary for critical information loss — over-aggressive compaction is the most common failure mode.

### Observation Masking

Mask observations selectively based on recency and ongoing relevance — not uniformly. Apply these rules:

- **Never mask**: Observations critical to the current task, observations from the most recent turn, observations used in active reasoning chains, and error outputs when debugging is in progress. - **Mask after 3+ turns**: Verbose outputs whose key points have already been extracted into the conversation flow. Replace with a compact reference: `[Obs:{ref_id} elided. Key: {summary}. Full content retrievable.]` - **Always mask immediately**: Repeated/duplicate outputs, boilerplate headers and footers, outputs already summarized earlier in the conversation.

Masking should achieve 60-80% reduction in masked observations with less than 2% quality impact. The key is maintaining retrievability — store the full content externally and keep the reference ID in context so the agent can request the original if needed.

### KV-Cache Optimization

Maximize prefix cache hits by structuring prompts so that stable content occupies the prefix and dynamic content appears at the end. KV-cache stores Key and Value tensors computed during inference; when consecutive requests share an identical prefix, the cached tensors are reused, saving both cost and latency.

Apply this ordering in every prompt:

1. System prompt (most stable — never changes within a session) 2. Tool definitions (stable across requests) 3. Frequently reused templates and few-shot examples 4. Conversation history (grows but shares prefix with prior turns) 5. Current query and dynamic content (least stable — always last)

Design prompts for cache stability: remove timestamps, session counters, and request IDs from the system prompt. Move dynamic metadata into a separate user message or tool result where it does not break the prefix. Even a single whitespace change in the prefix invalidates the entire cached block downstream of that change.

Target 70%+ cache hit rate for stable workloads. At scale, this translates to 50%+ cost reduction and 40%+ latency reduction on cached tokens.

### Context Partitioning

Partition work across sub-agents when a single context cannot hold the full problem without triggering aggressive compaction. Each sub-agent operates in a clean, focused context for its subtask, then returns a structured result to a coordinator agent.

Plan partitioning when estimated task context exceeds 60% of the window limit. Decompose the task into independent subtasks, assign each to a sub-agent, and aggregate results. Validate that all partitions completed before merging, merge compatible results, and apply summarization if the aggregated output still exceeds budget.

This approach achieves separation of concerns — detailed search context stays isolated within sub-agents while the coordinator focuses on synthesis. However, coordination has real token cost: the coordinator prompt, result aggregation, and error handling all consume tokens. Only partition when the savings exceed this overhead.

### Budget Management

Allocate explicit token budgets across context categories before the session begins: system prompt, tool definitions, retrieved documents, message history, tool outputs, and a reserved buffer (5-10% of total). Monitor usage against budget continuously and trigger optimization when any category exceeds its allocation or total utilization crosses 70%.

Use trigger-based optimization rather than periodic optimization. Monitor these signals:

- Token utilization above 80% — trigger compaction - Attention degradation indicators (repetition, missed instructions) — trigger masking + compaction - Quality score drops below baseline — audit context composition before optimizing

## Practical Guidance

### Optimization Decision Framework

Select the optimization technique based on what dominates the context:

| Context Composition | First Action | Second Action | |---|---|---| | Tool outputs dominate (>50%) | Observation masking | Compaction of remaining turns | | Retrieved documents dominate | Summarization | Partitioning if docs are independent | | Message history dominates | Compaction with selective preservation | Partitioning for new subtasks | | Multiple components contribute | KV-cache optimization first, then layer masking + compaction | — | | Near-limit with active debugging | Mask resolved tool outputs only — preserve error details | — |

### Performance Targets

Track these metrics to validate optimization effectiveness:

- **Compaction**: 50-70% token reduction, <5% quality degradation, <10% latency overhead from the compaction step itself - **Masking**: 60-80% reduction in masked observations, <2% quality impact, near-zero latency overhead - **Cache optimization**: 70%+ hit rate for stable workloads, 50%+ cost reduction, 40%+ latency reduction - **Partitioning**: Net token savings after accounting for coordinator overhead; break-even typically requires 3+ subtasks

Iterate on strategies based on measured results. If an optimization technique does not measurably improve the target metric, remove it — optimization machinery itself consumes tokens and adds latency.

## Examples

**Example 1: Compaction Trigger**

```python if context_tokens / context_limit > 0.8: context = compact_context(context) ```

**Example 2: Observation Masking**

```python if len(observation) > max_length: ref_id = store_observation(observation) return f"[Obs:{ref_id} elided. Key: {extract_key(observation)}]" ```

**Example 3: Cache-Friendly Ordering**

```python # Stable content first context = [system_prompt, tool_definitions] # Cacheable context += [reused_templates] # Reusable context += [unique_content] # Unique ```

**Example 4: Budget-triggered optimization policy**

```yaml budgets: tool_outputs: 35% message_history: 30% retrieved_documents: 20% reserved_buffer: 15% triggers: tool_outputs_over_budget: mask resolved observations total_context_over_70_percent: compact message history repeated_irrelevant_retrievals: tighten retrieval scope ```

## Guidelines

1. Measure before optimizing—know your current state 2. Apply masking before compaction — remove low-value bulk first, then summarize what remains 3. Design for cache stability with consistent prompts 4. Partition before context becomes problematic 5. Monitor optimization effectiveness over time 6. Balance token savings against quality preservation 7. Test optimization at production scale 8. Implement graceful degradation for edge cases

## Gotchas

1. **Whitespace breaks KV-cache**: Even a single whitespace or newline change in the prompt prefix invalidates the entire KV-cache block downstream of that point. Pin system prompts as immutable strings — do not interpolate timestamps, version numbers, or session IDs into them. Diff prompt templates byte-for-byte between deployments.

2. **Timestamps in system prompts destroy cache hit rates**: Including `Current date: {today}` or similar dynamic content in the system prompt forces a full cache miss on every new day (or every request, if using time-of-day). Move dynamic metadata into a user message or a separate tool result appended after the stable prefix.

3. **Compaction under pressure loses critical state**: When the model performing compaction is itself under context pressure (>85% utilization), its summarization quality degrades — it omits task goals, drops user co

기술 세부 사항

버전
1.0.0
라이선스
Unknown
최근 업데이트
2026년 8월 23일
게시일
2026년 8월 23일

결정 스냅샷

검증 필요

56
준비됨
검토
단계

최근 저장소 활동

감사

설치 검토

설치 및 채택 검토

74
검토 필요
보안
75/100
유지보수
100/100
설치
92/100
전체 감사 열기평가 보고서 보기

Agent 검증 증거

Agent 검증 증거

Resolve, 검토, 설치 및 한 번의 제한된 실행 후 결과 보고서입니다.

0
검증됨
Needs first agent run자동 설치: 먼저 검토최근: 알 수 없음
성공률
최근 실패
결과
0
출력 품질
실패
0
관련 없음
0
설치
0
위험 차단
0
설정 필요
0
프로덕션
0

아직 Agent 결과 데이터가 없습니다. 첫 실행은 /api/agent/outcome을 통해 성공, 설정 필요, 위험 차단, 실패 또는 비관련 결과를 보고할 수 있습니다.

설치

Agent 워크플로에 추가

무료 오픈 소스. 프로덕션 Agent에 설치하기 전에 보고서를 검토하세요.

성장 루프

공유 키트

X

context-optimization용 시나리오 기반 초안입니다. X에 수동으로 게시할 수 있습니다.

큐레이터 노트
A practical pick for a repeatable workflow:

context-optimization: >-

33 stars

https://www.openagentskill.com/skills/shipshitdev-context-optimization?ref=x
X 초안 열기
선택 사항: 설치 명령이 포함된 답글
Listing + install path for context-optimization:
https://www.openagentskill.com/skills/shipshitdev-context-optimization?ref=x

Install: npx skills add shipshitdev/skills --skill context-optimization

등록 출처

Registry 색인

소유권 주장 가능

이 등록은 공개 소스에서 색인되었으며 유지보수자 소유권 주장이 승인될 때까지 공식으로 표시되지 않습니다.

제작자
shipshitdev
색인 주체
OpenAgentSkill 커뮤니티 인덱스

귀속은 공개 저장소 또는 제작자 프로필에 연결됩니다. 제작자는 등록을 주장하여 소유권 신호를 업데이트할 수 있습니다.

이 스킬 소유권 주장

소유자 소유권 주장

이 스킬 등록 소유권 주장

이 Registry 색인 등록은 shipshitdev에게 귀속되어 있지만 아직 공식으로 표시되지 않았습니다. 소유권을 주장하면 확인된 소유자 신호가 추가되어 이후 출시, 설치 및 감사 업데이트를 더 신뢰할 수 있습니다.

크리에이터 백링크 키트

README에 증거 배지 추가

개발자가 저장소를 평가하는 위치에 정규 등록, 현재 신뢰 및 감사 신호, 실제 Agent-Proven 증거를 표시합니다.

[![Listed on OpenAgentSkill](https://www.openagentskill.com/api/badge/shipshitdev-context-optimization?metric=listed&label=Listed)](https://www.openagentskill.com/skills/shipshitdev-context-optimization)
[![OpenAgentSkill Trust](https://www.openagentskill.com/api/badge/shipshitdev-context-optimization?metric=trust&label=Trust)](https://www.openagentskill.com/skills/shipshitdev-context-optimization)
[![OpenAgentSkill Audit](https://www.openagentskill.com/api/badge/shipshitdev-context-optimization?metric=audit&label=Audit)](https://www.openagentskill.com/skills/shipshitdev-context-optimization/audit)
[![Agent Proven](https://www.openagentskill.com/api/badge/shipshitdev-context-optimization?metric=proven&label=Agent%20Proven)](https://www.openagentskill.com/skills/shipshitdev-context-optimization)

작성자

S

shipshitdev

@shipshitdev

플랫폼 적합도

상태 신호

GitHub 스타
33
품질 점수
34/100
최근 GitHub 푸시
2026년 8월 20일
프레임워크 힌트
알 수 없음
OpenAgentSkill 조회수
0
설치 명령 복사
0
외부 클릭
0

커뮤니티 신호

이 스킬이 Agent 워크플로에 유용한지 알려 주세요. 집계된 피드백은 시간이 지날수록 순위를 개선합니다.

신뢰와 안전

샌드박스 전용

63
  • GitHub 채택도GitHub 스타 33확인
  • 스타/포크 활동스타 33, 포크 3; 현재 메타데이터에서 이슈 활동을 확인할 수 없습니다확인
  • 최근 유지보수마지막 푸시 후 2일통과
  • 라이선스 명확성알 수 없음확인
  • README/SKILL.md 완성도공개 메타데이터에 더 충실한 README/SKILL.md 맥락이 필요합니다정보
  • 의존성/런타임 위험자격 증명 또는 환경 변수 접근정보