context-compressor
Strategies for compressing context to maximize token efficiency
Skill by Ashish-Dhankecha
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ashish-dhankecha-context-compressor
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/context-compressor
What's inside
- Skill name
context-compressor- Description
- Strategies for compressing context to maximize token efficiency
- License
- AGPL-3.0
- Instructions
- 198 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Context Compressor Skill <role> You are a context compression specialist. Your job is to maintain rich understanding while using minimal tokens. **Core principle:** Compress aggressively, decompress only when needed. </role> --- ## Compression Strategies ### Strategy 1: Summary Mode **When:** You've fully understood a file and may need to reference it later. **How:** ```markdown ## File Summary: src/auth/login.ts **Purpose:** Handles user login via email/password **Key functions:** - handleLogin(req, res) → Validates credentials, returns JWT - validateCredentials(email, password) → Checks against DB **Dependencies:** bcrypt, jose, database **Tokens saved:** ~400 (95 lines not reloaded) ``` **Use instead of:** Re-reading the full file --- ### Strategy 2: Outline Mode **When:** You need to understand a file's structure but not implementation details. **How:** ```markdown ## Outline: src/services/payment.ts (127 lines) - L1-15: Imports and types - L17-35: PaymentService class - L20: constructor(config) - L25: processPayment(amount, method) - L45: refund(transactionId) - L67: getHistory(userId) - L90-127: Helper functions ``` **Tokens:** ~50 vs ~500 for full file --- ### Strategy 3: Diff-Only Mode **When:** You've already seen a file and need to understand changes. **How:** ```markdown ## Changes to: src/config.ts Added: - L45: TOKEN_BUDGET_THRESHOLD = 0.5 - L46: COMPRESSION_ENABLED = true Modified: - L12: MAX_CONTEXT → increased from 100000 to 150000 ``` **Use for:** Reviewing modifications, understanding updates --- ### Strategy 4: Reference Mode **When:** You need to track a file without loading it. **How:** ```markdown ## References | File | Last Seen | Summary | Load If | |------|-----------|---------|---------| | auth.ts | Task 2 | Login handling | Auth bugs | | db.ts | Task 1 | Postgres client | DB errors | | utils.ts | Never | Utility funcs | Helper needed | ``` **Cost:** ~10 tokens vs ~200+ per file --- ### Strategy 5: Progressive Disclosure **When:** Unsure how much detail is needed. **Process:** 1. Start with outline (Level 1) 2. If insufficient, load key functions (Level 2) 3. If still stuck, load related code (Level 3) 4. Full file only as last resort (Level 4) ``` L1: Outline → "I see handleLogin at L25" L2: Function → "handleLogin validates then calls createToken" L3: Related → "createToken uses jose.sign with HS256" L4: Full → Only for complex debugging ``` --- ## Compression Triggers ### Automatic Compression Points | Trigger | Action | |---------|--------| | After understanding a file | Create summary | | Switching tasks | Compress previous context |
From Ashish-Dhankecha/Leo, AGPL-3.0.
More from Ashish-Dhankecha/Leo
- 0.469score
debugger
Ashish-Dhankecha
Systematic debugging with persistent state and fresh context advantages
SkillCFreshness: CClaude Code +9 - 0.469score
verifier
Ashish-Dhankecha
Validates implemented work against spec requirements with empirical evidence
SkillCFreshness: CClaude Code +9 - 0.469score
codebase-mapper
Ashish-Dhankecha
Analyzes existing codebases to understand structure, patterns, and technical debt
SkillCFreshness: CClaude Code +9 - 0.469score
context-fetch
Ashish-Dhankecha
Search-first skill to reduce unnecessary file reads by searching before loading
SkillCFreshness: CClaude Code +9 - 0.469score
context-health-monitor
Ashish-Dhankecha
Monitors context complexity and triggers state dumps before quality degrades
SkillCFreshness: CClaude Code +9 - 0.469score
empirical-validation
Ashish-Dhankecha
Requires proof before marking work complete — no "trust me, it works"
SkillCFreshness: CClaude Code +9 - 0.469score
executor
Ashish-Dhankecha
Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management
SkillCFreshness: CClaude Code +9 - 0.469score
planner
Ashish-Dhankecha
Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification
SkillCFreshness: CClaude Code +9 - 0.469score
token-budget
Ashish-Dhankecha
Manages token budget estimation and tracking to prevent context overflow
SkillCFreshness: CClaude Code +9 - 0.466score
plan-checker
Ashish-Dhankecha
Validates plans before execution to catch issues early
SkillCFreshness: CClaude Code +9 - 0.464score
github
Ashish-Dhankecha
GitHub repository search, commit inspection, and PR automation
SkillCFreshness: CClaude Code +9 - 0.461score
linkedin
Ashish-Dhankecha
LinkedIn automation and profile search tool
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 28, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- AGPL-3.0
- Repository
- github.com/Ashish-Dhankecha/Leo
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Ashish-Dhankecha
- 0.469score
debugger
Ashish-Dhankecha
Systematic debugging with persistent state and fresh context advantages
SkillCFreshness: CClaude Code +9 - 0.469score
verifier
Ashish-Dhankecha
Validates implemented work against spec requirements with empirical evidence
SkillCFreshness: CClaude Code +9 - 0.469score
codebase-mapper
Ashish-Dhankecha
Analyzes existing codebases to understand structure, patterns, and technical debt
SkillCFreshness: CClaude Code +9 - 0.469score
context-fetch
Ashish-Dhankecha
Search-first skill to reduce unnecessary file reads by searching before loading
SkillCFreshness: CClaude Code +9 - 0.469score
context-health-monitor
Ashish-Dhankecha
Monitors context complexity and triggers state dumps before quality degrades
SkillCFreshness: CClaude Code +9 - 0.469score
empirical-validation
Ashish-Dhankecha
Requires proof before marking work complete — no "trust me, it works"
SkillCFreshness: CClaude Code +9
Cite this page
context-compressor skill. Agent Mart. https://agentmart.dev/skills/ashish-dhankecha-context-compressor (last updated 2026-10-24)