compress-prompt
$
npx mdskill add doodledood/manifest-dev/compress-promptTransform a prompt into the **minimal instruction** needed for the model to succeed. Not "preserve everything densely"—instead, "what's the least I need to say?"
SKILL.md
.github/skills/compress-promptView on GitHub ↗
---
name: compress-prompt
description: 'Compresses prompts/skills into minimal goal-focused instructions. Trusts the model, drops what it already knows, maximizes action space. Use when asked to compress, condense, or minimize a prompt.'
---
# Compress Prompt
## Goal
Transform a prompt into the **minimal instruction** needed for the model to succeed. Not "preserve everything densely"—instead, "what's the least I need to say?"
Output: Display compressed result + stats. Optionally write to file with `--output <path>`.
## Input
`$ARGUMENTS` = prompt (file path or inline text) [--output path]
If file path: read content. If inline: use directly. If ambiguous: try as file first.
## Principles
1. **Trust capability, enforce discipline** - Models know HOW to do tasks. But they cut corners, forget context, skip verification, declare victory early. Drop capability instructions, keep discipline guardrails.
2. **Goal over process** - State WHAT to achieve, not HOW. Let the model choose its approach.
3. **Training filter** - "Would a competent person need to be told this?" If no → drop it. Models are trained on millions of examples.
4. **Maximize action space** - Fewer constraints = more freedom = better results. Each constraint should earn its place.
5. **Inline-typable brevity** - Short enough you could type it verbally to a capable colleague.
6. **Avoid arbitrary values** - "Max 4 rounds" or "2-3 examples" become rigid rules. State the principle, not the number. Constrain productively while giving flexibility.
## What to Keep vs Drop
| KEEP | DROP |
|------|------|
| Core goal/purpose | Process/phases (capability) |
| Acceptance criteria (success conditions) | Examples the model knows |
| Novel constraints (counter-intuitive rules) | Obvious constraints (model defaults) |
| Execution discipline (write before proceeding, verify before finalizing) | Edge case handling (model trained on these) |
| Output format if non-standard | Explanations and rationale |
**Execution discipline examples** (KEEP these):
- "Write findings to file BEFORE proceeding" — prevents context rot
- "Don't finalize until X confirmed" — prevents premature completion
- "Read full log before synthesis" — restores lost context
**Training-redundant examples** (DROP these):
- "Be thorough", "Handle errors gracefully", "Ask clarifying questions"
- "Consider edge cases", "Use professional tone"
## Constraints
**Create todo list** - Track: input validation, compression, verification iterations, output.
**Verify with agent** - Launch `prompt-compression-verifier` to check goal clarity, novel constraints preserved, no over-specification. Iterate until verification passes.
**Single paragraph output** - The compressed prompt must be one dense paragraph, not reformatted sections or bullets.
**Non-destructive** - Original file untouched. Display output + optional file save.
## Output Format
```
Compressed: {source}
Original: {tokens} tokens
Compressed: {tokens} tokens ({percentage}% reduction)
---
{compressed paragraph}
---
Verification: PASSED/INCOMPLETE ({iterations} iteration(s))
```
## Example
**Before** (1,247 tokens): Full code reviewer prompt with phases, edge cases, examples...
**After** (67 tokens):
```
Review code for bugs, security issues, performance problems; success = all critical issues identified with actionable fixes. Output JSON {file, line, issue, severity, fix}. Never approve code with critical issues.
```
**Kept**: Goal, acceptance criteria, output format, novel constraint (never approve with critical issues).
**Dropped**: Process phases, edge case handling, examples, obvious constraints.
More from doodledood/manifest-dev
- autoEnd-to-end autonomous execution: figure-out → define → do, chained without manual approval gates. Use when you want to define and execute without intervention during planning, when the user asks for autonomous or end-to-end work, says just build it, or asks to tend or babysit a PR.
- auto-optimize-promptIteratively auto-optimize a prompt until no issues remain. Uses prompt-reviewer in a loop, asks user for ambiguities, applies fixes via prompt-engineering skill. Runs until converged.
- defineManifest builder. Turns shared understanding into a verifiable Manifest with Deliverables, Acceptance Criteria, Global Invariants, and Approach. Use when planning features, scoping refactors, debugging complex issues, or when the user asks to define, scope, plan, spec out, make a manifest, or break down a task.
- doneCompletion marker for the /do workflow. Outputs a plain-prose summary of what was built. Called by /do after every Acceptance Criterion and Global Invariant verifies PASS, when the manifest is complete, all criteria pass, or the workflow needs to wrap up with a completion summary.
- escalateStructured escalation when /do hits an unrecoverable blocker. Surfaces what was tried, why it failed, and what the user can decide. Called by /do when work is blocked, cannot proceed, hits an unrecoverable failure, needs a user decision, or gets stuck.
- exampleAnalyzes the current project structure and tech stack. Use when asked to explore, understand, or summarize a project. Trigger terms: project overview, analyze codebase, what is this project.
- figure-outFigure things out together — any topic, problem, or idea. Presses relentlessly until shared understanding is reached. Use when you need to understand before acting, when figuring it out is the goal, or when the user asks to think through a decision, dig deeper, press an assumption, investigate why something is happening, or work through a problem.
- figure-out-teamDrive a multi-party deliberation in a Slack channel or thread. The agent is an involved orchestrator — presses rigorously, brings evidence, names trade-offs, surfaces disagreements, advances when answers cohere; owner-by-Slack-handle overrules. Use when the people involved cannot all sit in one chat, when deliberation has to happen in Slack, or when the user asks to figure out with the team, press a group asynchronously, or get the team aligned.
- harden-task-fileHarden /define task guidance files for one-shot quality. Iterates: orthogonality gap analysis, user-approved additions, prompt review, fix, converge. Use when a task file needs comprehensive coverage or "harden task file".
- learn-from-sessionAnalyze Claude Code sessions to learn what went right/wrong and suggest high-confidence improvements to skills. Use when asked to analyze a session, learn from a session, or review workflow effectiveness.