enhance-prompt
Skill11 starsChanged 9 months agoMITView on GitHub
Transform raw prompts into professional-grade, codebase-aware instructions. Use when improving vague/incomplete prompts, adding codebase context to requests, rewriting instructions with structured sections, or crafting detailed prompts like a professional prompt engineer. Supports auto-category detection, prompt chain decomposition, iterative refinement, multilingual handling, monorepo detection, and includes 13 professional templates.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- ryanportfolio/Harness-Firmwaretheir own version, first seen Oct 3, 2026
- ryanportfolio/Corewise.Academytheir own version, first seen Oct 3, 2026
- delorenj/skillstheir own version, first seen Oct 2, 2026
- diodeme/Gold-Bandtheir own version, first seen Sep 30, 2026
- ryanportfolio/HarnessFirmware.comtheir own version, first seen Sep 29, 2026
- nate2022-ai/nate-ai-skillstheir own version, first seen Sep 21, 2026
Used with
Projects with it also use addskill, advocate and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ryanportfolioSkilladdskill
Create, import, update, or install repository or personal skills; includes runtime ownership, resources, and discovery validation.
Also in 3 projects that use this
ryanportfolioSkilladvocate
Use only when the user explicitly invokes $advocate to challenge a change just made before it lands. Do not trigger from natural-language requests.
Also in 3 projects that use this
- +10 more from ryanportfolio
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- diodeme/Gold-Band★ 143same name
- LegalQuants/lq-skills★ 63same name
- vobase/vobase★ 61same name
- delorenj/skills★ 15same name
- autohandai/community-skills★ 11same name
- nate2022-ai/nate-ai-skills★ 8same name
- nicholyx/ai-skills★ 6same name
- jhy0285/monofield★ 4same name
- OmyDaGreat/skills★ 1same name
- ryanportfolio/Corewise.Academy★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Do NOT output an enhanced prompt without first scanning the codebase for context.
- Distinctive: line 111
No tech stack or dependencies mentioned → Redo Layer 3
- Distinctive: line 113
No DO/DON'T constraints → Redo Layer 5
- Distinctive: line 114
No verification criteria → Redo Layer 7
- Distinctive: line 133
When prompt is not in English:
- Very specific: line 136
Use English for ALL technical terms (database, authentication, frontend)
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Enhance Prompt
Overview
Transform raw, vague, or incomplete prompts into professional-grade, context-rich instructions that produce optimal AI output.
Core principle: A bad prompt produces bad output. Every minute spent on prompt quality saves ten minutes of wrong output.
Announce at start: "I'm using the enhance-prompt skill to transform your prompt into a professional-grade instruction."
<HARD-GATE>
Do NOT output an enhanced prompt without first scanning the codebase for context. Even if the prompt seems clear, codebase context ALWAYS improves it. No exceptions.
</HARD-GATE>The Iron Law
NO ENHANCED PROMPT WITHOUT CODEBASE CONTEXTSkipping the codebase scan? The enhanced prompt will be generic. Generic prompts produce generic output. That defeats the purpose.
When to Use
Always:
- Prompt under 10 words
- Vague action verbs ("fix", "improve", "update", "optimize")
- Missing file paths, function names, or technical details
- Non-English prompt
- Code snippet with unclear instruction
Especially when:
- User pastes raw prompt and asks to improve it
/enhance-promptslash command is invoked- User says "write a prompt for..." or "prompt to..."
Checklist
You MUST complete these steps in order:
- Score the raw prompt — 7-dimension scorecard (see
references/prompt-patterns.md) - Auto-detect category — match intent to template (see
references/auto-detection.md) - Check for multi-intent — if 2+ concerns detected, trigger chain decomposition (see
references/prompt-chain.md) - Scan the codebase — follow
references/codebase-analysis.mdprocedure - Ask clarifying questions — MAX 2, only if critical ambiguity remains after scan
- Apply 7-Layer Enhancement — Clarity → Specificity → Context → Structure → Constraints → Output → Verification
- Format output — follow
references/output-format.mdtemplate - Present before/after — show scoring improvement and copy-ready version
- Support iteration — if user requests refinement, follow
references/iteration-mode.md
Process Flow
digraph enhance_prompt {
rankdir=TB;
receive [label="Receive\nraw prompt", shape=box];
score [label="Score\n7 dimensions", shape=box];
detect [label="Auto-Detect\ncategory", shape=box, style=filled, fillcolor="#ffffcc"];
multi [label="Multi-Intent?", shape=diamond];
chain [label="Chain\nDecomposition", shape=box, style=filled, fillcolor="#ffffcc"];
scan [label="Scan\ncodebase", shape=box, style=filled, fillcolor="#ccffcc"];
ambiguous [label="Critical\nambiguity?", shape=diamond];
ask [label="Ask MAX 2\nquestions", shape=box];
enhance [label="Apply 7-Layer\nEnhancement", shape=box, style=filled, fillcolor="#ccccff"];
format [label="Format\noutput", shape=box];
present [label="Present\nbefore/after", shape=doublecircle];
feedback [label="User\nfeedback?", shape=diamond];
iterate [label="Iteration\nMode", shape=box, style=filled, fillcolor="#ffccff"];
receive -> score;
score -> detect;
detect -> multi;
multi -> chain [label="yes (2+)"];
multi -> scan [label="no (1)"];
chain -> scan;
scan -> ambiguous;
ambiguous -> ask [label="yes"];
ambiguous -> enhance [label="no"];
ask -> enhance;
enhance -> format;
format -> present;
present -> feedback;
feedback -> iterate [label="refine"];
}The 7-Layer Enhancement
Each layer is mandatory. Skipping layers produces weak prompts.
| Layer | What | Red Flag If Missing |
| 1. Clarity | Remove ambiguity, define terms | Multiple interpretations possible |
| 2. Specificity | File paths, function names, line numbers | "Fix the thing" without WHERE |
| 3. Context | Tech stack, patterns, dependencies from scan | AI has to guess the project |
| 4. Structure | Context → Task → Constraints → Output sections | Wall of text |
| 5. Constraints | DO/DON'T rules, boundaries, edge cases | No guardrails = wrong output |
| 6. Output Format | Code block, diff, step-by-step, docs | AI chooses random format |
| 7. Verification | Testable success criteria | "Done" is subjective |
Details and examples: See references/prompt-patterns.md
Red Flags — STOP and Redo
- Enhanced prompt has no file paths → Redo Layer 2
- No tech stack or dependencies mentioned → Redo Layer 3
- Output is a wall of text without sections → Redo Layer 4
- No DO/DON'T constraints → Redo Layer 5
- No verification criteria → Redo Layer 7
- Prompt is longer than the solution → Over-engineered, simplify
- Enhanced prompt contradicts codebase patterns → Rescan codebase
- Same information repeated across sections → Consolidate, remove redundancy
- All "After" scores are 5/5 → Likely inflated, re-evaluate each dimension honestly
- Verification criteria are subjective ("works well", "looks good") → Replace with testable commands/thresholds
Common Rationalizations
| Excuse | Reality |
| "Prompt is clear enough" | If it were, you wouldn't need this skill |
| "Codebase scan takes too long" | 30 seconds of scanning saves 10 minutes of wrong output |
| "Context is obvious" | Obvious to you. Not to the AI reading it cold |
| "I'll add details later" | You won't. Enhanced prompt is the details |
| "Just make it longer" | Length ≠ quality. Specificity = quality |
Multilingual Handling
When prompt is not in English:
- Detect language automatically
- Preserve the user's intent — translate meaning, not words
- Use English for ALL technical terms (
database,authentication,frontend) - Output enhanced prompt in user's language with English technical terms
References
references/prompt-patterns.md— 7-Layer framework with examples and scoringreferences/codebase-analysis.md— Multi-level scanning with monorepo and framework detectionreferences/output-format.md— Structured output template with risk assessmentreferences/prompt-library.md— 6 core prompt templatesreferences/prompt-library-extended.md— 7 extended prompt templatesreferences/auto-detection.md— Auto-category detection and template selectionreferences/prompt-chain.md— Prompt chain decomposition for multi-intent promptsreferences/iteration-mode.md— Enhancement iteration and refinement tracking
Key Principles
- Codebase context is non-negotiable — Always scan before enhancing
- Auto-detect, don't assume — Use signal matching to identify prompt intent before selecting a template
- One concern per prompt — Multi-intent prompts get decomposed into focused chains
- Specificity beats length —
src/auth/login.ts:42> paragraph of description - Score before and after — Prove the enhancement worked
- Score honestly — Inflated "After" scores help no one; every 4-5 must be justified by specific content
- Iterate with precision — Apply targeted changes on feedback, don't rewrite everything; max 3 iterations
- One question at a time — Don't overwhelm with clarification requests
- Copy-ready output — End with clean version ready to paste anywhere
- Output efficiency — Enhanced prompt must be concise and non-redundant; if it's longer than 700 words for a simple task, trim it
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

