Transform vague prompts into structured TCRO specifications with phase-specific clarification
/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.mdTransform 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/prompting/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.