Agent skill · AI & Agents

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%.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Declared author: George Khananaev
Path: skills/ai-llm/prompt-compressor-georgekhananaev-claude-skills-vault-ec107c31/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

# 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..." |

What's inside
Steps it walks through
  1. When to Use
  2. Process
  3. Compression Rules
  4. Remove Phrases
  5. Transform Patterns
  6. Never Compress (Security)
  7. Output Format
  8. Examples
  9. Example 1: Verbose Request
  10. Example 2: Error Context
  11. Compression Levels
  12. Integration
  13. Script Usage
  14. Quick Reference
Ships with 1 file
  • metadata.json
Commands it runs
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"
More from claude-skill-registry
All skills →
About this skill
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.

Keep going