Agent Skillsdoodledood/manifest-dev › compress-prompt

compress-prompt

GitHub

将提示词压缩为最小化、目标导向的指令,去除模型已知的冗余信息,保留核心目标与关键约束。适用于需要精简Prompt以提升效率的场景。

.claude/skills/compress-prompt/SKILL.md doodledood/manifest-dev

Trigger Scenarios

要求压缩或精简提示词 优化Prompt长度

Install

npx skills add doodledood/manifest-dev --skill compress-prompt -g -y
More Options

Non-standard path

npx skills add https://github.com/doodledood/manifest-dev/tree/main/.claude/skills/compress-prompt -g -y

Use without installing

npx skills use doodledood/manifest-dev@compress-prompt

指定 Agent (Claude Code)

npx skills add doodledood/manifest-dev --skill compress-prompt -a claude-code -g -y

安装 repo 全部 skill

npx skills add doodledood/manifest-dev --all -g -y

预览 repo 内 skill

npx skills add doodledood/manifest-dev --list

SKILL.md

Frontmatter
{
    "name": "compress-prompt",
    "metadata": {
        "internal": true
    },
    "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.

Version History

  • 2ac487e Current 2026-08-20 08:55

Same Skill Collection

.claude/skills/auto-optimize-prompt/SKILL.md
.claude/skills/harden-task-file/SKILL.md
.claude/skills/learn-from-session/SKILL.md
.claude/skills/optimize-prompt-token-efficiency/SKILL.md
.claude/skills/sync-claude-code-plugins/SKILL.md
.claude/skills/sync-tools/SKILL.md
claude-plugins/manifest-dev-tools/skills/babysit-pr/SKILL.md
claude-plugins/manifest-dev-tools/skills/handoff/SKILL.md
claude-plugins/manifest-dev-tools/skills/prompt-engineering/SKILL.md
claude-plugins/manifest-dev-tools/skills/re-pitch/SKILL.md
claude-plugins/manifest-dev-tools/skills/review-pr/SKILL.md
claude-plugins/manifest-dev-tools/skills/review-prompt/SKILL.md
claude-plugins/manifest-dev-tools/skills/walk-pr/SKILL.md
claude-plugins/manifest-dev/skills/auto/SKILL.md
claude-plugins/manifest-dev/skills/check-pr/SKILL.md
claude-plugins/manifest-dev/skills/define/SKILL.md
claude-plugins/manifest-dev/skills/do/SKILL.md
claude-plugins/manifest-dev/skills/done/SKILL.md
claude-plugins/manifest-dev/skills/escalate/SKILL.md
claude-plugins/manifest-dev/skills/figure-out-team/SKILL.md
claude-plugins/manifest-dev/skills/figure-out/SKILL.md
claude-plugins/manifest-dev/skills/init-context/SKILL.md
claude-plugins/manifest-dev/skills/just-auto/SKILL.md
claude-plugins/manifest-dev/skills/just-do/SKILL.md
claude-plugins/manifest-dev/skills/next-ticket/SKILL.md
claude-plugins/manifest-dev/skills/poll-slack/SKILL.md
claude-plugins/manifest-dev/skills/review-writing/SKILL.md
claude-plugins/manifest-dev/skills/run-ticket/SKILL.md
claude-plugins/manifest-dev/skills/sweep-tickets/SKILL.md
claude-plugins/manifest-dev/skills/ticket-up/SKILL.md
claude-plugins/PLUGIN_TEMPLATE/skills/example/SKILL.md
claude-plugins/manifest-dev-tools/skills/teach-me/SKILL.md
claude-plugins/manifest-dev/skills/chat-surface/SKILL.md
claude-plugins/manifest-dev/skills/review-code/SKILL.md

Metadata

Files
0
Version
2ac487e
Hash
e906d6b9
Indexed
2026-08-20 08:55

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 04:12
浙ICP备14020137号-1 $방문자$