/prompt-audit:prompt-auditfrom prompt-audit
Audits prompts for coding AI completeness using 6 essential elements (goal, scope, patterns, constraints, verification, done definition). Flags gaps and produces improved rewrites.
Ships in prompt-audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Most AI-coding failures trace back to thin prompts. A prompt that takes 30 seconds to write and 2 minutes for Claude to "execute" produces code that takes 2 hours to fix. This skill catches that before it happens.
Use whenever the user is evaluating, drafting, or about to send a prompt for non-trivial coding work. Triggers include:
Don't audit:
A good coding prompt for non-trivial work has all six. Missing any one drops the success rate noticeably.
| # | Element | What it answers | Why it matters |
|---|---|---|---|
| 1 | Goal | What problem are we solving? Who uses the result? | Without a goal, Claude optimizes the wrong thing |
| 2 | Scope | Which files / modules can change? Which can't? | Without scope, Claude touches things it shouldn't |
| 3 | Existing patterns | What in the codebase should we mimic? | Without patterns, Claude reinvents conventions inconsistently |
| 4 | Constraints | Performance, dependencies, compatibility | Without constraints, Claude makes choices the user won't accept |
| 5 | Verification | What tests prove this is correct? | Without verification, "done" is undefined |
| 6 | Done definition | When can we mark this complete? | Without done, Claude over-builds or under-builds |
Read the prompt the user shared. Identify which of the 6 elements are present, partially present, or missing. Be honest — "we should follow good patterns" is not a real existing-pattern reference; an actual file path is.
For each element, classify as:
For each gap, explain to the user why this matters in the specific task at hand — not just generic best-practice scolding. Example:
"Your scope is missing — and because this prompt mentions
auth/, Claude will likely modify shared auth middleware that 30+ other endpoints depend on. That's a core-code change that needs explicit human ownership."
The opposite failure mode: a prompt that dictates every variable name, every line of pseudocode, every internal step. This makes the model worse, not better. If you see this, flag it:
"Your prompt over-constrains the implementation. The model performs best when given goals + constraints + patterns, then trusted to write the code. Treat the prompt like onboarding a junior — explain what matters, not what to type."
Always produce an improved version, even if the original was decent. Use this structure:
[Goal]
<Who uses this, what done means>
[Scope]
- Can modify: <list>
- Must not modify: <list>
[Existing patterns]
- Mirror <specific file or module>
- Convention: <e.g., service.ts + route.ts + *.test.ts>
[Constraints]
- <Performance, dependencies, compat>
[Verification]
- 3 e2e tests: <happy + 2 errors, described at user level>
- Manual: <if applicable>
[Done]
- <Concrete checklist>
If the user's task isn't big enough to need all six, drop the unused ones rather than padding with placeholders.
End the audit with a direct comparison so the user sees the gain. Example:
Before (6 words): "Add a user activity report endpoint."
After (~250 words): <full structured prompt>
Why the rewrite is better: scope is now explicit, existing pattern named, verification defined, done measurable.
When you spot any of these in the original prompt, surface them explicitly:
Use this structure for the audit:
## Audit summary
<1-2 sentences: overall verdict>
## Element check
| Element | Status | Notes |
|---|---|---|
| Goal | ✅ / ⚠️ / ❌ | <observation> |
| Scope | ✅ / ⚠️ / ❌ | <observation> |
| Existing patterns | ✅ / ⚠️ / ❌ | <observation> |
| Constraints | ✅ / ⚠️ / ❌ | <observation> |
| Verification | ✅ / ⚠️ / ❌ | <observation> |
| Done | ✅ / ⚠️ / ❌ | <observation> |
## Red flags
<bullet list, or "None">
## Improved version
<full rewrite>
## Why the rewrite is better
<2-3 specific gains>
End the skill when:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub appleboy/skills --plugin prompt-auditOther plugins' skills for the same job