refine-prompt
Skill0 starsChanged 17 days agoMITView on GitHub
This skill should be used when the user wants to "refine my prompt", "enhance this prompt", "make this a better prompt", "improve my prompt", "rewrite this prompt", or invokes /refine-prompt. Interviews the user with AskUserQuestion to fill gaps, picks the right prompt-engineering framework (RTF, RACE, RISEN, CO-STAR, CRISPE, BAB, TAG, CIDI, …) for the task, assembles a structured XML prompt, confirms it, then executes it in this session.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- zyeri/claude-refine-prompttheir own version, first seen Oct 17, 2026
- bigzhuodan/claude-skillstheir own version, first seen Oct 11, 2026
- penpot/penpottheir own version, first seen Oct 8, 2026
- axiom-wang/Axiom_Skills_Createdtheir own version, first seen Jul 18, 2026
- basuev/pi-prompt-refinertheir own version, first seen Jul 16, 2026
- knowingrohan/aitheir own version, first seen Jun 29, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- penpot/penpot★ 62ksame name
- zyeri/claude-refine-prompt★ 2same name
- basuev/pi-prompt-refiner★ 1same name
- axiom-wang/Axiom_Skills_Created★ 0same name
- bigzhuodan/claude-skills★ 0same name
- knowingrohan/ai★ 0same name
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
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
6
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 24
Capture the original prompt: Use the invocation argument as the rough prompt when present.
- Very specific: line 46
Interview only the gaps: Ask the missing or ambiguous slots with AskUserQuestion, batched at most four per call.
- Distinctive: line 73
If the user picks "Other" and asks to *start over*, return to step 2.
- Distinctive: line 119
Use exactly one structural framework per prompt.
- Distinctive: line 120
Add reasoning scaffolding only on demand, never as a default.
- Distinctive: line 121
Always confirm the assembled prompt before executing it.
- Distinctive: line 122
Always surface the chosen framework name so the decision is transparent.
“Common” is measured: kept by at least 6 in 10 of the 5 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
/refine-prompt — Interview-Style Prompt Refiner
Purpose
Turn a rough, under-specified request into a clear, well-structured prompt before any real work begins, then run that refined prompt. The skill diagnoses what the request is missing, asks only for what is genuinely unclear, picks a prompt-engineering framework that fits the task, assembles an XML-tagged prompt, confirms it with the user, and finally executes it in the same session.
The guiding principle: modern models reward clarity, structure, and context, not reasoning gimmicks. Default to a clean structural framework; add reasoning scaffolding (step-by-step, few-shot, retrieval) only when the task actually demands it.
Execution flow
- Capture the original prompt. Use the invocation argument as the rough prompt when present. When no argument is given, ask the user what they want done in one open question before continuing.
- Score the frameworks and select ONE. A large task with multiple
dependent stages is decomposed into a prompt chain first, and each smaller
prompt is scored on its own. Otherwise score every row of the selection
table below against the request: 0 when its signal is absent, 1 when it is
present, 2 when it defines the task. The highest score wins; on a tie,
prefer the framework with fewer slots; when every score is 0, use RACE.
Route on the task's shape, never its domain: in a coding agent nearly every
request is about code, so "it is technical" scores nothing. Read
references/frameworks.mdfor the full catalog, slot definitions, and the scoring rules. State the winner, the runner-up, and the signal that decided it to the user in one line (CIDI 2 · CRISPE 1 — the stack trace is most of the request), so the choice is transparent. - Diagnose gaps (adaptive). Map the original prompt onto the chosen framework's slots. Mark each slot as satisfied, missing, or ambiguous. When every slot is already satisfied, skip directly to step 5 — do not invent questions.
- Interview only the gaps. Ask the missing or ambiguous slots with
AskUserQuestion, batched at most four per call. Give each question two to four concrete, sensible default options (the user can always pick "Other" for free text). Never re-ask something the original prompt already answers. Run a second round only when an answer opens a new gap; otherwise proceed. - Assemble the refined prompt. Emit an XML-tagged prompt following the
chosen framework's slots (see Assembly rules). Always include explicit
success criteria, the desired output format, and an instruction to say so
when unsure rather than guess. Add a reasoning/technique layer ONLY when the
task needs it — never by default:
- strict output shape → add one or two few-shot examples;
- genuinely hard multi-step reasoning → ask the model to work step by step;
- fact-heavy or current-events task → request sources / retrieval and instruct against fabrication.
Confirm. Show the assembled prompt in a fenced code block, then ask via
AskUserQuestion.AskUserQuestionallows at most four options plus an automatic "Other", so present these four and let "Other" carry Start over:- Run it (Recommended) → go to step 7 and execute now.
- Run in /plan mode → enter plan mode (
EnterPlanMode) first, then carry out the refined prompt as a planning task — research and propose a plan for approval before making any changes. - Copy → output the final prompt in a fenced code block for the user to copy and stop. Do not execute it.
- Edit a section → collect the change, re-assemble (step 5), re-confirm.
If the user picks "Other" and asks to start over, return to step 2.
- Execute. Once approved, treat the refined prompt as the active instruction and carry out the task here in this session.
Framework selection heuristic
Decompose a large task with multiple dependent stages into a prompt chain first, and score each smaller prompt on its own. Otherwise score every row: 0 = signal absent, 1 = present, 2 = defines the task. Highest score wins; a tie goes to the framework with fewer slots; all zeros means RACE. Row order carries no priority.
| Signal in the request | Framework |
| Quick, single-step ask, almost no context | RTF (Role · Task · Format) |
| Persuasive or marketing copy | BAB (Before-After-Bridge) or AIDA |
| Content where voice, tone, audience matter | CO-STAR (Context · Objective · Style · Tone · Audience · Response) |
| Creative / exploratory / wants several options | CRISPE |
| Ordered steps, a defined end state, and explicit constraints that narrow scope (zero-downtime migration) | RISEN (Role · Instructions · Steps · End goal · Narrowing) |
| Goal with explicit ordered steps, nothing to narrow (CI setup, release checklist) | TAG (Task · Action · Goal) |
| Work over supplied input (logs, trace, diff, file, data) | CIDI (Context · Instruction · Detail · Input) |
| Every other row scores 0, including most feature, refactor, and investigation work | RACE (Role · Action · Context · Execute) — default, not scored |
An exact output format is not a row: pick by shape, then add few-shot examples in step 5.
Full slot definitions, "use when" notes, and the scoring rules live in
references/frameworks.md.
Assembly rules
- Wrap each section in descriptive XML tags — Claude parses them more reliably
than prose or markdown headers. Typical tags:
<role>,<context>,<objective>(or<task>),<instructions>,<constraints>,<output_format>,<success_criteria>, and<examples>when used. - Order matters: put
<role>and<context>first, then the objective, then instructions and output format. - Preserve the user's own wording wherever it is already specific and good; refine, do not rewrite for its own sake.
- Map the chosen framework's slots onto these tags rather than inventing a new structure per task.
Constraints
- Be adaptive, never badger. A complete prompt gets zero questions.
- Use exactly one structural framework per prompt.
- Add reasoning scaffolding only on demand, never as a default.
- Always confirm the assembled prompt before executing it.
- Always surface the chosen framework name so the decision is transparent.
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.

