prompt-refinement
Skill8 starsChanged 17 days agoMITView on GitHub
This skill should be used when the user provides a vague request, asks to clarify requirements, structure a task, or refine a prompt for multi-agent orchestration.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agent-behavior-constraintsSkill
- agentsview-usageSkill
- evidence-driven-workSkill
- explainer-design-systemSkill
- exploration-strategySkill
- graphify-usageSkill
- personal-kb-usageSkill
- skill-agent-mappingSkill
- task-classificationSkill
- verification-gatesSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
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 15
Ensure tasks entering the orchestration pipeline have:
- Distinctive: line 32
Ask First, Act Second: When genuinely ambiguous, clarify before proceeding
- Distinctive: line 33
One Question at a Time: Never overwhelm users with multiple clarification requests
- Very specific: line 69
After capturing all five fields, the orchestrator classifies task_complexity (trivial/exploratory/implementation/complex/research) and …
- Distinctive: line 76
Test: Add or update tests
- Distinctive: line 203
Wait for response (max 2 rounds)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prompt Refinement
Overview
Prompt refinement transforms ambiguous or incomplete user requests into clear, structured task specifications suitable for multi-agent orchestration. This skill bridges natural language input and the precise specifications required by downstream agents.
Purpose
Ensure tasks entering the orchestration pipeline have:
- Clear Objectives: A single, well-defined goal that can be verified
- Actionable Steps: Concrete actions that agents can execute
- Measurable Outcomes: Success criteria that verification agents can check
- Appropriate Scope: Boundaries that prevent scope creep
When to Use This Skill
Apply prompt refinement when:
- User input contains ambiguous terms ("fix it", "make it better")
- The request lacks specific targets (files, components, systems)
- Multiple interpretations of the request are possible
- Pre-processing is required for
/orchestrateor/plancommands
Key Principles
- Ask First, Act Second: When genuinely ambiguous, clarify before proceeding
- One Question at a Time: Never overwhelm users with multiple clarification requests
- Provide Options: Give concrete choices to speed up clarification
- Default Gracefully: Make reasonable assumptions when users don't respond
- Preserve Intent: Refinement should clarify, not change the user's goal
Refinement Template
Standard Format
**Goal**: <one-sentence objective stating what will be accomplished>
**Description**: <2-3 sentences providing context and scope>
**Actions**:
1. <specific, atomic action with clear target>
2. <specific, atomic action with clear target>
3. ...
**Constraints**: <what must not be broken, changed, or violated>
**Assumptions**: <what is taken for granted — surfaces risks early>Template Guidelines
| Field | Requirements | Example |
| Goal | Single sentence, verb-first, specific outcome | "Implement rate limiting on /api/users endpoint" |
| Description | Context, scope boundaries | "Add rate limiting to prevent API abuse. Limit to 100 req/min per IP." |
| Actions | Numbered, ordered, atomic steps | "1. Explore existing middleware patterns" |
| Constraints | Non-negotiable requirements; what must stay intact | "Must not alter existing auth cookie format" |
| Assumptions | Preconditions taken for granted | "Redis is already provisioned" |
After capturing all five fields, the orchestrator classifies task_complexity (trivial/exploratory/implementation/complex/research) and persists the structured intent to the state file via --set-intent-goal, --set-intent-description, --set-intent-actions, --set-intent-constraints, --set-intent-assumptions, and --set-task-complexity. These values are passed verbatim (no re-summarization) to all downstream agents.
Action Step Pattern
- Explore: Investigate existing code, patterns, dependencies
- Plan: Design approach based on exploration
- Implement: Execute the core changes
- Test: Add or update tests
- Verify: Confirm implementation meets requirements
Ambiguity Detection
Quick Detection Checklist
A prompt likely needs clarification if:
- No identifiable action (what to do)
- No specific target (where to do it)
- No expected outcome (success criteria)
- Insufficient context (constraints, environment)
Ambiguity Signals
| Signal | Example | Issue |
| Missing scope | "fix the bug" | Which bug? Where? |
| Vague outcome | "make it better" | Better how? |
| Multiple meanings | "update the API" | Which endpoint? What change? |
| Implicit assumptions | "deploy it" | Where? How? |
For detailed ambiguity detection, see references/ambiguity-detection.md.
Clarification Strategy
Question Format
Before I proceed, I need to clarify:
<single focused question>
Options:
A) <most likely option>
B) <second most likely>
C) <third option if applicable>
D) Something else (please specify)Clarification Rules
| Rule | Rationale |
| Single question | Reduces cognitive load |
| Concrete options | Speeds up response |
| Max two rounds | Avoids frustration |
| Include escape hatch | Prevents forced incorrect choice |
When to Clarify vs. Assume
Always Clarify:
- Could cause data loss
- Affects security
- Mutually exclusive interpretations
- Production system impact
Safe to Assume:
- Obvious default exists
- Context suggests intent
- Low-risk, reversible operations
For detailed clarification strategies, see references/clarification-strategies.md.
Orchestration Detection
Prompts Requiring Orchestration
| Category | Example |
| Multi-file changes | "Add authentication to all routes" |
| Feature implementations | "Implement dark mode" |
| Bug investigation | "Fix the login issue" |
| Refactoring | "Refactor user service" |
| Integration | "Integrate Stripe" |
Pass-Through Prompts
| Category | Example |
| Questions | "What does this function do?" |
| Single-file edits | "Add comment to line 42" |
| Git operations | "Commit these changes" |
| Documentation lookups | "Show API endpoints" |
Quick Decision
Is it a question about existing code? -> Pass through
Does it require code changes? -> If no, pass through
Is target explicit AND single file? -> Pass through
Otherwise -> Refine for orchestrationFor detailed orchestration detection, see references/orchestration-detection.md.
Refinement Process
Step 1: Classify Prompt
Is it orchestration-related?
├── NO -> Pass through unchanged
└── YES -> Continue to Step 2Step 2: Detect Ambiguity
Check ambiguity signals
├── High ambiguity -> Go to Step 3 (Clarify)
└── Low ambiguity -> Go to Step 4 (Refine)Step 3: Request Clarification
- Identify primary ambiguity
- Formulate single focused question
- Provide 3-4 concrete options
- Wait for response (max 2 rounds)
Step 4: Apply Template
- Extract Goal (single sentence, specific)
- Build Description (context, scope, constraints)
- Decompose Actions (atomic, ordered steps)
- Validate completeness
Quick Reference
Ambiguity Score Quick Guide
| Score | Action |
| 0-2 | Proceed with refinement |
| 3-4 | State assumption and proceed |
| 5+ | Ask clarifying question |
Short imperative with a concrete target → state assumption and proceed, do not ask.
Refinement Decision Matrix
| Prompt Type | Action |
| Clear + orchestration | Refine to template |
| Ambiguous + orchestration | Clarify then refine |
| Clear + non-orchestration | Pass through |
| Ambiguous + non-orchestration | Minimal clarification |
Additional Resources
Reference Files
- references/ambiguity-detection.md - Detecting ambiguous prompts
- references/clarification-strategies.md - Clarification question strategies
- references/orchestration-detection.md - Orchestration eligibility detection
- references/refinement-techniques.md - Advanced refinement techniques
Examples
- examples/refinement-scenarios.md - Worked refinement examples
Related Skills
- task-classification: Receives refined prompts for complexity assessment
- agent-behavior-constraints: Ensures refinement stays within agent boundaries
- verification-gates: Uses refined specifications for verification criteria
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.

