Transform prompts into structured TCRO format with phase-specific clarification. Automatically invoked by /ai-eng/research, /ai-eng/plan, /ai-eng/work, and /ai-eng/specify commands. Use when refining vague prompts, structuring requirements, or enhancing user input quality before execution.
Transforms vague prompts into structured TCRO format (Task, Context, Requirements, Output) with phase-specific clarification. Automatically invoked by `/ai-eng/research`, `/ai-eng/plan`, `/ai-eng/work`, and `/ai-eng/specify` commands to extract requirements and enhance prompt quality before execution.
/plugin marketplace add v1truv1us/ai-eng-system/plugin install v1truv1us-ferg-engineering-2@v1truv1us/ai-eng-systemThis skill inherits all available tools. When active, it can use any tool Claude has access to.
templates/plan.mdtemplates/research.mdtemplates/specify.mdtemplates/work.mdProper prompt refinement is critical for achieving optimal AI response quality. Vague or ambiguous prompts lead to inconsistent results, wasted iterations, and frustration. A well-structured prompt with clear task definition, rich context, explicit requirements, and specific output format dramatically improves AI performance. Each refinement iteration compounds the quality improvement—investing time upfront saves countless back-and-forth cycles later. Poor prompt quality is the #1 cause of unsatisfactory AI interactions.
Take a deep breath and approach prompt refinement systematically. Prompt refinement requires active listening, clarifying questions, and structured thinking. Don't assume understanding—ask targeted questions to uncover implicit requirements, constraints, and expectations. Use the TCRO framework as your organizing principle: Task (what), Context (why), Requirements (how), Output (what it looks like). Iterate until all four elements are clear, specific, and actionable. Patience in refinement pays off in execution.
I bet you can't transform vague user input into perfectly structured prompts without over-constraining creativity or missing the true intent, but if you can:
The challenge is extracting enough detail to guide the AI without boxing in the solution or asking too many exhausting questions. Can you find the sweet spot between clarity and efficiency?
After refining a prompt, rate your confidence from 0.0 to 1.0:
Identify uncertainty areas: What aspects of the task are still unclear? Which requirements are assumed rather than explicit? What could go wrong based on the current prompt structure?
Transform messy, incomplete prompts into well-structured specifications using the TCRO framework (Task, Context, Requirements, Output) with phase-specific clarifying questions. This skill ensures all user prompts to ai-eng-system commands are properly structured before execution, reducing ambiguity, increasing reproducibility, and improving AI response quality.
This skill is ALWAYS invoked at the start of:
/ai-eng/research/ai-eng/specify/ai-eng/plan/ai-eng/workCommands should include this directive:
Use skill: prompt-refinement
Phase: [research|specify|plan|work]
| Element | Purpose | Key Question |
|---|---|---|
| Task | What's the job to be done? | "What specific outcome do you need?" |
| Context | Why does this matter? | "What's the broader system/goal?" |
| Requirements | What are the constraints? | "What are the must-haves vs nice-to-haves?" |
| Output | What format is needed? | "What should the deliverable look like?" |
Load CLAUDE.md from the project root to understand:
Determine which phase based on:
Based on detected phase, load the appropriate template:
templates/research.md for /ai-eng/researchtemplates/specify.md for /ai-eng/specifytemplates/plan.md for /ai-eng/plantemplates/work.md for /ai-eng/workUse phase-specific questions from the loaded template.
Minimum required questions:
Present questions interactively:
Format the refined prompt using the TCRO structure:
Task: [Specific, actionable task statement]
Context: [Broader system, goals, constraints from CLAUDE.md]
Requirements:
- [Must-have requirement 1]
- [Must-have requirement 2]
- [Nice-to-have if mentioned]
Output: [Expected deliverable format and location]
Enhance the TCRO-structured prompt with techniques from the incentive-prompting skill:
Display the refined prompt and ask for confirmation:
## Refined Prompt
[The TCRO-structured, incentive-enhanced prompt]
Proceed with this refined prompt? (y/n/edit)
Commands should reference this skill with:
---
name: ai-eng/[command-name]
description: [Description]
agent: [agent]
---
Use skill: prompt-refinement
Phase: [research|specify|plan|work]
# [Command Name]
[Rest of command definition...]
Phase-specific templates are located in templates/:
skills/prompt-refinement/
├── SKILL.md
└── templates/
├── research.md
├── specify.md
├── plan.md
└── work.md
Each template includes:
"need auth"
Detected phase: specify (feature request)
Task: What type of authentication capability do you need?
Context: What's the broader system this fits into?
Requirements: What are the must-have requirements?
Output: What should the specification include?
Task: Create specification for JWT-based user authentication system
Context:
Adding to existing Next.js application with PostgreSQL database.
Project follows CLAUDE.md philosophy of simplicity and pragmatism.
Existing authentication middleware pattern in src/lib/auth/ can be extended.
Requirements:
Must-have:
- Email/password login with secure password hashing (bcrypt, cost factor 12)
- JWT token-based session management with configurable expiry
- Password reset flow via email delivery
- Rate limiting on authentication endpoints (5 attempts/minute)
Nice-to-have:
- Email verification for new accounts
- Session persistence across device reboots
Non-functional:
- Security: Tokens must be cryptographically secure, single-use for reset flows
- Performance: Authentication requests should complete within 200ms (p95)
- Compliance: GDPR-compliant data handling, no passwords in logs
Output:
Full specification with user stories, acceptance criteria, and non-functional
requirements saved to specs/auth/spec.md in Spec Kit compatible format.
You are a senior security engineer and product owner with 15+ years of experience
building production authentication systems at companies like Stripe and Auth0.
Task: Create a comprehensive specification for JWT-based user authentication system
Context:
Adding to existing Next.js application with PostgreSQL database.
Project follows CLAUDE.md philosophy of simplicity and pragmatism.
Existing authentication middleware pattern in src/lib/auth/ can be extended.
Requirements:
Must-have:
- Email/password login with secure password hashing (bcrypt, cost factor 12)
- JWT token-based session management with configurable expiry
- Password reset flow via email delivery
- Rate limiting on authentication endpoints (5 attempts/minute)
Nice-to-have:
- Email verification for new accounts
- Session persistence across device reboots
Non-functional:
- Security: Tokens must be cryptographically secure, single-use for reset flows
- Performance: Authentication requests should complete within 200ms (p95)
- Compliance: GDPR-compliant data handling, no passwords in logs
Output:
Full specification with user stories, acceptance criteria, and non-functional
requirements saved to specs/auth/spec.md in Spec Kit compatible format.
Take a deep breath and think through this specification systematically. Consider all
security implications, edge cases, and user experience flows before finalizing.
Rate your confidence in this specification from 0-1 after completion.
If user input is already well-structured:
If user declines clarifying questions:
[NEEDS CLARIFICATION: ...] markers for ambiguous itemsIf CLAUDE.md doesn't exist or is incomplete:
Before finalizing refined prompt, verify:
This skill builds on the incentive-prompting skill. Always load both skills together when refining prompts:
Use skill: incentive-prompting
Use skill: prompt-refinement
The incentive-prompting skill provides the enhancement techniques
(Expert Persona, Stakes Language, Step-by-Step, Self-Evaluation).
This skill provides the structuring framework (TCRO) and phase-specific clarification questions.
Together they produce prompts that are both well-structured and enhanced for maximum AI response quality.