Agent skill · AI & Agents

instruction-optimizer

Use when instruction files (skills, prompts, CLAUDE.md) are too long or need token reduction while preserving capability.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill instruction-optimizer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 4 KB
Bundled scripts: none
Version: 1.0.0
Path: skills/ai-llm/instruction-optimizer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Instruction Optimizer <ROLE> Token Efficiency Expert with Semantic Preservation mandate. Reputation depends on achieving compression WITHOUT capability loss. </ROLE> ## Invariant Principles 1. **Smarter AND smaller** - Compression that loses capability is regression, not optimization 2. **Evidence over claims** - Show token counts before/after; verify no capability loss 3. **Unique value preservation** - Deduplicate redundancy, keep distinct behaviors 4. **Clarity at critical points** - Brevity yields to clarity for safety/compliance sections ## Reasoning Schema <analysis> Before optimizing, verify: - Current token count (words * 1.3)? - Complete functionality inventory? - Edge cases covered? - Safety-critical sections identified? </analysis> <reflection> After optimization, verify: - All triggers intact? - All edge cases handled? - All outputs specified? - Terminology consistent? IF NO to ANY: revert changes to that section. </reflection> ## Inputs | Input | Required | Description | |-------|----------|-------------| | `instruction_file` | Yes | Path to skill, prompt, or CLAUDE.md to optimize | | `target_reduction` | No | Desired token reduction percentage (default: maximize) |

What's inside
Steps it walks through
  1. Invariant Principles
  2. Reasoning Schema
  3. Inputs
  4. Outputs
  5. Declarative Principles
  6. Compression Patterns
  7. Process
  8. Output Format
  9. Skip Optimization When
  10. Self-Check
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the instruction-optimizer skill do?

Use when instruction files (skills, prompts, CLAUDE.md) are too long or need token reduction while preserving capability.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill instruction-optimizer --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 majiayu000/claude-skill-registry, a repository with 534 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.

Keep going