recursive-context-pruning-token-budgeting
하는 일
이 도구는 AI가 더 직접적이고 효율적으로 답하도록 돕습니다. 불필요한 정보를 제거하고, 추가 설명 없이 필요한 정답에 집중합니다.
사용하는 경우
- ✓긴 대화를 위한 AI 어시스턴트를 만들 때.
- ✓많은 문서나 코드를 다룰 때.
- ✓불필요한 말 없이 최종 결과만 원할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/recursive-context-pruning-token-budgeting/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“데이터베이스에 연결하는 코드를 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 먼저 어떤 정보가 중요한지 파악합니다. 그다음 답에 쓸 공간(토큰)을 얼마나 쓸지 정하고, '군더더기' 표현을 빼서 핵심에 바로 도달합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Recursive Context Pruning & Token Budgeting
Overview
This skill implements a "Gatekeeper" logic to prevent context window bloat and unnecessary token expenditure. It ensures the agent only processes relevant data shards and adheres to an Atomic Precision protocol—delivering functional answers with zero conversational filler. By recursively summarizing state and stripping "bridge phrases," it maximizes the longevity and speed of long-running development workflows.
When to Use This Skill
- Use when building multi-step agents to prevent repetition and "memory drift" in long conversations.
- Use when working with large document sets or codebases to avoid dumping entire files into the prompt.
- Use when you need purely functional output (code/logic) without "Sure! Here is your..." intros.
How It Works
Step 1: Metadata Sharding
Scan the available data for headers, summaries, and key indicators. Create a "map" of the context rather than injecting the full source. Never pull the entire file into the prompt unless a specific, narrowed fragment is requested.
Step 2: Token Budget Allocation
Calculate a "Safe Response Limit" based on the current context window. Allocate 30% for current logic processing, 20% for immediate output, and 50% for a future context buffer.
Step 3: Atomic Output Filtering
Strip all "Bridge Phrases" (e.g., "I've updated the code," "Based on your request," "Sure"). Start the response immediately with the solution or the code block.
Step 4: Ambiguity Check
Before executing Step 3, scan for missing critical variables (e.g., specific file names or environment types). If the prompt is too ambiguous, bypass the atomic output and generate exactly one concise question to resolve the blocker.
Step 5: Abstractive Compression
Summarize the current turn into a "compressed state string" (e.g., [Project: Feasify | State: Auth-Fixed | Remaining-Tasks: 2]) to discard redundant conversational data before the next prompt.
Examples
Example 1: Filtered Code Output (No Filler)
User: "Update the Firebase config to use environment variables."
const firebaseConfig = {
apiKey: process.env.VITE_FIREBASE_API_KEY,
authDomain: process.env.VITE_FIREBASE_AUTH_DOMAIN,
projectId: process.env.VITE_FIREBASE_PROJECT_ID
};
Example 2: Essential Clarification
User: "Deploy the function."
"Specify environment: production or staging?"
Best Practices
- ✅ Direct Start: Place the code or answer at the very first character of the response.
- ✅ Summarize-as-you-go: Turn 10 pages of discussion into 5 bullet points for the next turn.
- ✅ Omit Signatures: Never end with "Let me know if you need more help."
- ❌ No Bridge Phrases: Avoid "Here is the code," "Sure," or "I can help with that."
- ❌ No Guessing: If input is missing, ask immediately rather than wasting tokens on a generic guess.
Limitations
- This skill does not replace environment-specific validation, testing, or expert review.
- Extreme brevity can occasionally hide important nuances; use concise inline comments (
// crucial step) for critical notes.
Security & Safety Notes
- Never prune safety headers, environment-specific security constraints, or system-level instructions during the compression stage.
- Maintain original system instructions at the "Root" of the context to prevent context-loss-based jailbreaks.
Common Pitfalls
Problem: The response is so brief it lacks the context needed for implementation. Solution: Use concise inline code comments instead of separate paragraphs of text.
Problem: The agent loses the overarching goal due to over-compression. Solution: Always pin the "Primary Objective" to the top of every pruned prompt.
Related Skills
@atomic-precision-response- Specifically for removing conversational filler.@context-sharding- For managing large-scale documentation mapping.
자주 묻는 질문
AI가 '여기 코드가 있습니다'라고 말하지 않는 이유는 무엇인가요?
시간과 공간을 아끼기 위해 AI는 소개 없이 바로 코드나 답으로 들어갑니다.
AI가 요청을 이해하지 못하면 어떻게 하나요?
추측하는 대신, AI는 여러분이 무엇을 원하는지 명확히 하기 위해 짧고 직접적인 질문을 합니다.
이 도구가 AI에게 중요한 내용을 잊게 할 수 있나요?
아니요, 핵심 지시와 안전 정보는 유지하도록 설계되었으며, 즉각적인 답에 필수적이지 않은 것만 제거합니다.
상세 정보
작성자의 원본 설명
Optimizes AI agent performance by pruning redundant context, managing token usage, and enforcing ultra-concise, direct-to-value responses.
인기도
- GitHub 스타
- 48k
- 순위
- #5593
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.