galihcitta/dotclaudeskills/refining-requirements
- community
Checking that the SKILL.md file is still in the repository.
Use when PRD is prose-heavy, ambiguous, has scattered file paths, missing API contracts, or says "similar to X" without explanation. Transforms rough requirements into implementation-ready specs. Auto-detects tech stack, validates file paths (EXISTS/CREATE/VERIFY markers), handles greenfield and multi-stack projects. Do NOT use for simple bug fixes, typos, or already-structured Jira tickets with clear file paths and acceptance criteria.
Install
npx vskill@latest install galihcitta/dotclaudeskills/refining-requirementsSKILL.md
Requirements Refiner
Transform rough requirements into implementation-ready specifications optimized for Claude Code execution.
When to Use
- Received a PRD/spec that's prose-heavy and ambiguous
- Requirements scatter file paths throughout text
- Specs say "similar to X" without explaining X
- Missing API contracts, data models, or clear scope
- Before starting implementation on complex features
- Starting a new project from scratch (greenfield)
- Need to identify missing information before coding
- Architectural refactoring (e.g., session-based to JWT)
- Multi-service features spanning frontend/backend/database
When NOT to Use
Skip refinement for:
- Simple bug fixes with clear location (e.g., "fix typo in file X line Y")
- Well-structured Jira tickets that already have:
- Explicit file paths to modify
- Clear acceptance criteria
- Defined scope and deliverables
- Single-line changes or trivial updates
- Tasks where implementation path is obvious
Decision rule: If the task has specific file paths, clear acceptance criteria, and no ambiguity about what to build → execute directly, don't refine.
Workflow
Phase 0: Auto-Detect Project Context
Step 1: Detect tech stack automatically
Step 2: Read project conventions from CLAUDE.md
Extract and apply:
- Code style preferences
- Naming conventions
- Architecture patterns
- Testing requirements
- Documentation standards
Step 3: Detect project type
| Type | Indicators | Template | |
|---|---|---|---|
| Greenfield | "new project", "build from scratch", "new microservice", "from scratch", no existing code to reference | Use references/greenfield-patterns.md | |
| Feature | References existing code, adds to current system | Use standard templates | |
| Multi-stack | Monorepo with multiple languages, feature spans services | Create separate sections per stack |
Greenfield indicators (any of these = greenfield):
- "Build new service/microservice"
- "From scratch" or "brand new"
- "No existing code"
- "Deploy to Kubernetes" (new service)
- No file paths to validate (all CREATE, no EXISTS)
Multi-stack indicators (any of these = multi-stack):
- Monorepo structure mentioned (packages/, services/)
- Multiple languages listed (React + Go + Python)
- Cross-service feature (frontend + backend + database)
- Shared types/contracts between services
Phase 1: Check for Missing Information
Scan PRD for completeness. See references/edge-cases.md for checklist.
If critical info is missing, note the gaps for the interview phase.
Phase 1.5: Interactive Deep-Dive Interview
This is the core differentiator. Don't just identify gaps - actively probe for them.
Step 1: Offer Skip Option
If PRD appears comprehensive (all sections present, clear scope, explicit file paths):
If user chooses to proceed, skip to Phase 2.
Step 2: Conduct Interview
Use AskUserQuestion tool to probe deeply. Ask 1-4 questions per round.
Question Selection Priority:
- Blocking unknowns (can't proceed without answer)
- High-impact architectural decisions
- Failure modes and edge cases
- UX details and user segments
- Operational concerns
Question Categories (see references/interview-patterns.md for full templates):
| Category | Focus Areas | |
|---|---|---|
| Technical Edge Cases | Failure/recovery, concurrency, scaling, data integrity | |
| User Experience | Loading states, error presentation, multi-platform, accessibility | |
| Data & Security | PII handling, compliance, access control, audit trails | |
| Business Logic | Rule conflicts, state transitions, edge cases, dependencies | |
| Operations | Deployment strategy, monitoring, support tools | |
| Tradeoffs | Scope prioritization, quality attributes, build vs buy |
Question Quality Rules:
- Ask about WHAT HAPPENS WHEN, not WHAT IS
- Scenario-based > abstract
- Specific > general
- Probe edge cases, not happy paths
- Never ask obvious questions (database choice, endpoint names)
Example Good Questions:
Example Bad Questions (NEVER ask these):
Step 3: Iterate Until Complete
Always include an exit option in each question set:
- "That's enough, proceed with spec" as an option
- Or ask explicitly: "Continue probing or ready to generate spec?"
Step 4: Exit Conditions
Stop interviewing when ANY of these are true:
- User explicitly says "proceed" or "that's enough"
- All critical gaps are filled (no blocking unknowns)
- Questions become repetitive or hypothetical
- Answers converge to "standard approach" or "same as before"
Anti-rationalization: If you're unsure whether to continue, ask one more round. Better to over-interview than under-interview.
Step 5: Summarize Findings
Before proceeding, briefly summarize key decisions from interview:
Phase 2: Extract and Classify
Pull out: scope, file mappings, data models, API contracts, business logic, UI copy
Incorporate interview findings:
- Add discovered requirements from interview
- Update scope based on tradeoff decisions
- Include edge cases and failure modes discussed
- Add compliance/security requirements surfaced
- Note any constraints or limitations mentioned
Phase 3: Validate File Paths Against Codebase
Actually verify paths exist:
Read similar files to understand patterns:
Mark paths as:
✓ EXISTS— file found, will modify✗ CREATE— file doesn't exist, will create? VERIFY— path mentioned but needs confirmation
Include validation summary in output:
Phase 4: Structure
Apply template from references/templates.md
Adapt to detected tech stack using references/stack-patterns.md:
- File extensions and paths
- Migration format
- Naming conventions
- Test patterns
For multi-stack projects: Create SEPARATE file mapping sections per stack:
Include cross-service API contracts showing how services communicate.
Phase 5: Generate Test Scenarios
Derive tests from business logic. See references/test-patterns.md
Phase 6: Security & UI Copy
Security: Auto-generate checklist based on detected patterns. See references/security-checklist.md
UI Copy: Extract all user-facing text into bilingual table (ID/EN). See references/ui-copy-patterns.md
Phase 7: Verify Completeness
STOP before saving. Verify content and determine output format:
7a. Determine Output Format (Threshold-Based)
Estimate your total output line count using this heuristic:
| Feature Complexity | Typical Output | Format | |
|---|---|---|---|
| Simple (1-2 files, no API, no DB) | 50-100 lines | Single file | |
| Medium (3-5 files, some API or DB) | 100-200 lines | Depends on triggers | |
| Complex (6+ files, API + DB + external) | 200-400+ lines | Multi-file |
Threshold: < 150 lines = single file, ≥ 150 lines = multi-file
Always use multi-file for (regardless of line count):
- Greenfield projects (creating a new service/package from scratch)
- Multi-stack features (different language ecosystems, e.g., React + Go)
- Features with 3+ API endpoints
- Features with external API integrations (webhooks, third-party services)
- Features with ANY TWO of: database migrations, API changes, UI copy
Single file is fine for:
- Simple bug fixes with clear scope
- Small features affecting 1-2 files
- Quick refinements that fit on one screen
- Client-side only changes (no backend)
Anti-rationalization rule: If you're trying to "fit" content into single-file, use multi-file instead. When uncertain, multi-file is always acceptable.
7b. Verify Section Content
| Section | Required? | Check | |
|---|---|---|---|
| Scope (in/out) | Always | [ ] | |
| File Mappings with markers | Always | [ ] | |
| Data Model | If DB changes | [ ] | |
| API Contracts | If endpoints | [ ] | |
| Business Logic | Always | [ ] | |
| Test Scenarios | Always | [ ] | |
| Security Checklist | Always | [ ] | |
| UI Copy | If user-facing | [ ] | |
| Execution Checklist | Always | [ ] |
For greenfield: Verify ALL file paths are marked CREATE (no EXISTS).
For multi-stack: Verify separate sections exist for each stack.
If any required section is missing: Complete it before proceeding.
Phase 8: Save Output
Use the format determined in Phase 7a (threshold-based).
Option A: Single File (< 150 lines or simple features)
Naming: agent-workflow/requirements/YYYYMMDD-feature-name.md
Examples:
agent-workflow/requirements/20241127-add-email-field.mdagent-workflow/requirements/20241127-fix-validation-bug.md
Use the single-file template from Output Structure section below.
Option B: Multi-File Directory (≥ 150 lines or complex features)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/refining-requirements/SKILL.md
Popularity
- Repository stars
- 6
- 7-day trend score
- 10
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 11 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/galihcitta/dotclaudeskills/refining-requirements)