prompt-compressor
Compress verbose prompts & context before LLM processing. This skill should be used when input exceeds 1500 tokens, contains redundant phrasing, or includes unnecessary context. Reduces tokens by 40-60%.
npx skills add majiayu000/claude-skill-registry --skill prompt-compressor-georgekhananaev-claude-skills-vault-ec107c31 --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.
# Prompt Compressor Compress verbose prompts/context before processing. Saves 40-60% tokens. ## When to Use Invoke when: - Input >1500 tokens - User pastes entire files (needs only sections) - Prompts have redundant phrasing - Context includes irrelevant info - Commands: `/compress-prompt`, `/cp` ## Process 1. **Identify core intent** - What user actually wants 2. **Extract essential context** - Only what's needed 3. **Remove redundant phrases** - See rules below 4. **Apply abbreviations** - Use `token-formatter` conventions 5. **Output compressed version** - w/ token savings % ## Compression Rules ### Remove Phrases | Remove | Transform To | |--------|--------------| | "Please help me with" | (delete) | | "I need you to" | (delete) | | "Could you please" | (delete) | | "I would like to" | (delete) | | "I think", "Maybe", "Perhaps" | (delete) | | "This might be a dumb question" | (delete) | | "As I mentioned before" | (delete) | | "For your reference" | (delete) | ### Transform Patterns | Verbose | Compressed | |---------|------------| | "I want to create a fn that takes X and returns Y" | `fn(X) → Y` | | "The error message says..." | `Error: ...` | | "In the file located at..." |
- When to Use
- Process
- Compression Rules
- Remove Phrases
- Transform Patterns
- Never Compress (Security)
- Output Format
- Examples
- Example 1: Verbose Request
- Example 2: Error Context
- Compression Levels
- Integration
- Script Usage
- Quick Reference
Compress prompt text python scripts/compress_prompt.py "your prompt text here" Compress from file python scripts/compress_prompt.py --file prompt.txt Set compression level python scripts/compress_prompt.py --level heavy "text"
What does the prompt-compressor skill do?
Compress verbose prompts & context before LLM processing. This skill should be used when input exceeds 1500 tokens, contains redundant phrasing, or includes unnecessary context. Reduces tokens by 40-60%.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill prompt-compressor-georgekhananaev-claude-skills-vault-ec107c31 --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.
