home/productivity/compacting-prompts-docs-and-skills-with-compactprompt

Compacting prompts, docs, and skills with compactprompt

GPTClaudeDeepSeek··943 copies·updated 2026-07-14
compacting-prompts-docs-and-skills-with-compactprompt.prompt
# 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