Compacting prompts, docs, and skills with compactprompt
# Compacting prompts, docs, and skills with compactprompt
Use **compactprompt** to reduce token usage by shrinking prompts, markdown
documentation, and AI-agent skills while preserving their meaning and structure.
## When to use
- The user wants to **compact / shrink / trim / reduce** the size or token count
of: a prompt, a markdown file (`README.md`, `CLAUDE.md`, docs, notes), or an
agent skill (`SKILL.md` / `AGENTS.md`).
- The user wants to **review** a file or folder for compaction opportunities.
## How to call it
**Preferred — the MCP tools** (when the `compactprompt` MCP server is configured):
- `review(path)` — read-only report of tokens, repetition, and estimated savings.
- `compact(path, engine, apply=false)` — compact a file/skill; previews unless `apply` is true.
- `compact_prompt(prompt, ratio, engine)` — shorten a prompt string.
- `count_tokens(text)` — count tokens.
**Or the CLI** (the package ships a `compactprompt` command):when to use it
Community prompt sourced from the open-source GitHub repo gtkcyber/compact_prompt (MIT). A "Compacting prompts, docs, and skills with compactprompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
gtkcyber/compact_prompt · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar