From prompt-doctor
Use when the user asks to critique, improve, sharpen, or audit a prompt before sending it — or when their draft is vague, missing scope/metric/baseline/subject/success criterion. Also use when the user invokes /prompt-doctor or says "help me write a better prompt", "this prompt is too basic", "mejora este prompt", "afilá este prompt".
How this skill is triggered — by the user, by Claude, or both
Slash command
/prompt-doctor:prompt-doctorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pre-flight critic for user prompts. Diagnoses the 5 dimensions agents need to execute well: **scope, metric, baseline, subject, success criterion**. Proposes a sharper version. Optionally learns the user's stylistic patterns over time (learning mode).
Pre-flight critic for user prompts. Diagnoses the 5 dimensions agents need to execute well: scope, metric, baseline, subject, success criterion. Proposes a sharper version. Optionally learns the user's stylistic patterns over time (learning mode).
Core principle: a prompt is executable when an agent can decide unambiguously what counts as "done". If any of the 5 dimensions is missing or implicit, the agent has to guess — and will guess wrong.
Use when:
/prompt-doctor "<draft>" explicitly/prompt-doctor first?"Do NOT use when:
Every executable prompt answers these. If a dimension is N/A, say so explicitly — "no baseline" is a valid answer; silence is not.
| # | Dimension | Question | Example answer |
|---|---|---|---|
| 1 | Scope | What is in, what is out? | "Refactor auth.ts only. No changes to callers." |
| 2 | Metric | How is success measured? | "All existing tests pass + lint clean + diff < 200 lines" |
| 3 | Baseline | Compared to what? | "vs. current implementation on master" or "no baseline" |
| 4 | Subject | Who/what is the context, persona, or target? | "senior Go dev reading this in 6 months" or "this codebase, Node 20" |
| 5 | Success criterion | When do you stop? | "When tests pass and I approve the diff" |
Detect domain from keywords in the draft, then apply the matching template's checklist on top of the 5-dimension skeleton.
| Domain | Trigger keywords (any language) | Extra checklist |
|---|---|---|
| Coding | implementa, testea, debug, refactoriza, fix, build, deploy, ship, write code, escribe función | + Target files/modules, + Test strategy (unit/integ/e2e), + DoD (Definition of Done) |
| Analysis | compara, analiza, evalúa, audita, revisa, observa, compare, audit, review | + Axes of comparison, + Weights/priority, + Output format (table/report/verdict) |
| Writing | escribe, redacta, paper, post, README, blog, documento, draft, write | + Audience, + Length/format, + Tone, + Caveats to include up front |
| Meta / discovery | cómo puedo, por qué, qué pasa si, how do I, what if, should we | + Decision being made, + Constraints, + Alternatives already considered |
| Default | none match | Skeleton only |
Same as Mode 1, then if user replies "ok" / "ejecuta" / "go", execute the improved version.
When the user accepts or refines the improved version, capture the pattern to memory:
~/.claude/memory/feedback_prompt_patterns.md (create if missing; append otherwise)After 5+ patterns saved, summarize the user's prompt style in ~/.claude/memory/user_prompt_style.md (overwrite each time with current synthesis).
## Diagnosis
| Dimension | Status | Gap |
|-----------|--------|-----|
| Scope | ✓ | — |
| Metric | ✗ | How is "works" measured? |
| Baseline | partial| Implicit: vs. master. Confirm? |
| Subject | ✓ | — |
| Success | ✗ | When do I stop? |
(+ domain checklist if applicable)
## Improved version
> [rewritten prompt with defaults filled in, defaults flagged with [DEFAULT: ...]]
## Confirmation
- Accept the flagged defaults?
- Execute the improved version, or iterate?
user_prompt_style.md, respect it (e.g. don't force caveats if user explicitly wants short prompts).When critiquing, watch for these recurring weaknesses:
diagnosis → 5 dimensions (✓/✗/partial)
+ domain checklist (coding/analysis/writing/meta)
+ anti-patterns flagged
improved version → rewrite with [DEFAULT: ...] markers
confirmation → 1-2 high-risk questions only
learning mode → save pattern on accept
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub stepcha/prompt-doctor --plugin prompt-doctor