context-optimizer

Solid

Analyze skill content for optimal placement (Skill vs Passive Context vs Hybrid), compress markdown to pipe-delimited format (60-80% token reduction), and validate compliance against the decision framework. Based on Vercel research showing passive context achieves 100% pass rates vs 53-79% for skills. Use when you ask "compress this skill", "Skill vs Passive Context placement", "reduce tokens". Do NOT use for gathering knowledge before a task (use context-gather).

AI & Automation 38 stars 13 forks Updated today MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Context Optimizer Tooling suite for optimizing Claude Code context placement. Passive context (AGENTS.md, @imports) achieves 100% pass rates versus 53-79% for skills by eliminating decision points. ## Triggers - `analyze skill placement` - classify content as Skill vs Passive Context - `compress markdown` - reduce token count for context files - `validate compliance` - check skill/passive context placement decisions - `optimize context` - lower API costs and improve agent performance - `extract and index` - split markdown into detail files with compact index ## Process 1. **Analyze**: Run `analyze_skill_placement.py` to classify content 2. **Compress**: Run `compress_markdown_content.py` to reduce token counts 3. **Validate**: Run `test_skill_passive_compliance.py` to check compliance 4. **Verify**: Confirm output JSON contains expected classification and metrics ## Verification - [ ] Classification matches expected type (Skill/PassiveContext/Hybrid) - [ ] Compression achieves target reduction (40-80% depending on level) - [ ] Compliance validator returns exit code 0 - [ ] Output JSON is valid and contains all required fields ## Scripts | Script | Purpose | Exit Codes | |--------|---------|------------| | `analyze_skill_placement.py` | Classify content as Skill/PassiveContext/Hybrid | 0=success, 1=error | | `compress_markdown_content.py` | Compress markdown with token reduction metrics | 0=success, 1=error, 2=config, 3=external | | `test_skill_passive_compliance.py...

Details

Author
rjmurillo
Repository
rjmurillo/ai-agents
Created
7 months ago
Last Updated
today
Language
Markdown
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category