recursive-context-pruning-token-budgeting
Optimizes AI agent performance by pruning redundant context, managing token usage, and enforcing ultra-concise, direct-to-value responses.
npx skills add sickn33/agentic-awesome-skills --skill recursive-context-pruning-token-budgeting --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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%
- Overview
- When to Use This Skill
- How It Works
- Step 1: Metadata Sharding
- Step 2: Token Budget Allocation
- Step 3: Atomic Output Filtering
- Step 4: Ambiguity Check
- Step 5: Abstractive Compression
- Examples
- Example 1: Filtered Code Output (No Filler)
- Example 2: Essential Clarification
- Best Practices
- Limitations
- Security & Safety Notes
What does the recursive-context-pruning-token-budgeting skill do?
Optimizes AI agent performance by pruning redundant context, managing token usage, and enforcing ultra-concise, direct-to-value responses.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill recursive-context-pruning-token-budgeting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.