by anombyte93
AI-powered PRD generation for Claude Code with taskmaster integration
# Add to your Claude Code skills
git clone https://github.com/anombyte93/prd-taskmastername: prd-taskmaster description: >- Smart PRD generator with TaskMaster integration. Detects existing PRDs and offers execute/update/replace options. Generates comprehensive technical PRDs optimized for task breakdown, validates with 13 automated checks, and optionally executes tasks autonomously with datetime tracking and rollback support. Use when user requests "PRD", "product requirements", or mentions task-driven development. Defaults to PRD generation with handoff to TaskMaster. Optionally supports autonomous execution with 4 modes. allowed-tools:
Smart PRD generation with deterministic operations handled by script.py.
AI handles judgment (questions, content, decisions); script handles mechanics.
Script location: ~/.claude/skills/prd-taskmaster/script.py
All script commands output JSON.
Activate when user says: PRD, product requirements, taskmaster, task-driven development. Do NOT activate for: API docs, test specs, project timelines, PDF creation.
python3 ~/.claude/skills/prd-taskmaster/script.py preflight
Returns JSON: has_taskmaster, prd_path, task_count, tasks_completed, tasks_pending, taskmaster_method, has_claude_md, has_crash_state, crash_state.
If has_crash_state is true: Present resume options to user:
Then proceed to Step 2.
Use preflight JSON: if prd_path is not null and task_count > 0, an existing PRD is found.
If existing PRD found, use AskUserQuestion:
script.py backup-prd --input <path>)If no PRD found: Proceed to Step 3.
Use preflight JSON field taskmaster_method: mcp, cli, or none.
If none: Block and show installation instructions:
npm install -g task-master-aiscript.py detect-taskmasterNo proceeding without taskmaster detected.
Ask detailed questions to build comprehensive PRD. Use AskUserQuestion for structured input.
Essential (5):
Technical (4): 6. Existing codebase or greenfield? 7. Tech stack? 8. Integration requirements? 9. Performance/scale requirements?
TaskMaster-specific (3): 10. Used taskmaster before? 11. Estimated complexity? (simple/typical/complex) 12. Timeline expectations?
Open-ended (1): 13. Anything else? (edge cases, constraints, context)
Smart defaults: If user provides minimal answers, use best guesses and document assumptions.
Only if .taskmaster/ doesn't exist (check preflight has_taskmaster).
python3 ~/.claude/skills/prd-taskmaster/script.py init-taskmaster --method <cli|mcp>
For MCP: use the returned params to call mcp__task-master-ai__initialize_project.
For CLI: script runs taskmaster init directly.
Load template:
python3 ~/.claude/skills/prd-taskmaster/script.py load-template --type <comprehensive|minimal>
Returns JSON with content field containing the template.
AI judgment: Fill template with user's answers from Step 4:
Write completed PRD to .taskmaster/docs/prd.md.
python3 ~/.claude/skills/prd-taskmaster/script.py validate-prd --input .taskmaster/docs/prd.md
Returns JSON: score, max_score, grade, checks (13 items), warnings.
Grading: EXCELLENT (91%+), GOOD (83-90%), ACCEPTABLE (75-82%), NEEDS_WORK (<75%).
AI judgment: If warnings exist, offer user three options:
If grade is NEEDS_WORK, strongly recommend fixing before proceeding.
Calculate task count:
python3 ~/.claude/skills/prd-taskmaster/script.py calc-tasks --requirements <count>
Returns recommended task count.
For MCP:
mcp__task-master-ai__parse_prd: input=".taskmaster/docs/prd.md", numTasks=<recommended>, research=true
mcp__task-master-ai__expand_all: research=true
For CLI:
taskmaster parse-prd --input .taskmaster/docs/prd.md --research --num-tasks <recommended>
taskmaster expand-all --research
python3 ~/.claude/skills/prd-taskmaster/script.py gen-test-tasks --total <task_count>
Returns array of USER-TEST task definitions with title, description, dependencies, template.
For each task in the array:
mcp__task-master-ai__add_task with title, description, details=template, dependencies, priority=hightaskmaster add-task --title="..." --description="..." --dependencies="..." --priority=highpython3 ~/.claude/skills/prd-taskmaster/script.py gen-scripts --output-dir .taskmaster/scripts
Creates 5 scripts: track-time.py, rollback.sh, learn-accuracy.py, security-audit.py, execution-state.py.
Pre-check: Use Glob to check if ./CLAUDE.md exists. If it exists, skip.
If generating:
script.py load-template won't work here -- use Read tool on ~/.claude/skills/prd-taskmaster/templates/CLAUDE.md.template{{PROJECT_NAME}}, {{TECH_STACK}}, {{ARCHITECTURE_OVERVIEW}}{{KEY_DEPENDENCIES}}, {{TESTING_FRAMEWORK}}, {{DEV_ENVIRONMENT}}, {{TEST_COMMAND}}./CLAUDE.mdcodex.md, write identical copyUse AskUserQuestion:
Question: "PRD and tasks ready. How to proceed?"
If Autonomous Execution selected, ask execution mode:
AI judgment: Recommend mode based on context:
If Handoff: Display PRD location, task counts, key requirements, validation score, task phases, user test checkpoints, and TaskMaster commands. Then exit skill.
If Autonomous: Display same summary plus execution mode, then begin execution using the selected mode's rules.
python3 .taskmaster/scripts/track-time.py start|complete <task_id> [subtask_id]python3 ~/.claude/skills/prd-taskmaster/script.py log-progress --task-id <id> --title "..." --duration "..." --subtasks "..." --tests "..." --issues "..."task-{id}-{slug}), sub-branch per subtask, merge to main with checkpoint tagbash .taskmaster/scripts/rollback.sh Xpython3 .taskmaster/scripts/execution-state.py start|complete|checkpoint <task_id>Execute tasks one-by-one. For each task:
Same as sequential but launch up to 3 concurrent independent tasks. Handle merge conflicts automatically. Stop at USER-TEST.
Maximum parallelization (up to 5 concurrent). Auto-complete USER-TEST tasks. Only stop when ALL tasks complete.
Wait for user commands: "next task", "task {id}", "status", "parallel {id1,id2}".
script.py validate-prd at any time to re-check PRD qualityComprehensive PRD generation optimized for AI-assisted development workflows
curl -fsSL https://raw.githubusercontent.com/anombyte93/prd-taskmaster/master/install.sh | bash
This installs the skill to ~/.claude/skills/prd-taskmaster/. Run the same command to upgrade -- the installer checks for updates and only overwrites when there are changes.
Check for updates:
bash ~/.claude/skills/prd-taskmaster/install.sh --check-update
A Claude Code skill that generates detailed, engineer-focused Product Requirements Documents (PRDs) designed to work seamlessly with AI task breakdown tools like Taskmaster.
Think of it as your AI product manager that asks the right questions, writes comprehensive specs, and sets you up for successful implementation.
You have an idea for a feature or product, but:
This skill:
Result: You go from "I have an idea" to "I have a complete, validated PRD ready for AI task generation" in minutes.
This skill works with Claude Code CLI and Codex (VS Code extension). Choose your tool below:
curl -fsSL https://raw.githubusercontent.com/anombyte93/prd-taskmaster/master/install.sh | bash
The installer handles everything: cloning, updating, and placing files in ~/.claude/skills/prd-taskmaster/.
cd ~/.claude/skills
git clone https://github.com/anombyte93/prd-taskmaster.git
Prerequisites:
Install the skill:
# Clone to where you want to run codex
cd ~/<wherever>
git clone https://github.com/anombyte93/prd-taskmaster.git
cd prd-taskmaster
Configure Codex to find the skill:
prd-taskmaster directory/initSKILL.md and understand how to generate PRDsUsing the generated codex.md:
When the skill generates a PRD for your project, it will ask if you're using Codex:
CLAUDE.md and codex.md in your project rootCLAUDE.mdThe codex.md file guides Codex to follow TDD workflow, use agents, and maintain quality gates throughout development.
Verify installation:
# Start Claude Code in any project
claude
# In the chat, type:
# "I want a PRD for adding dark mode"
Claude Code should recognize the skill and activate it automatically.
Troubleshooting:
~/.claude/skills/prd-taskmaster/SKILL.md exists in that directoryOnce installed, just tell Claude/Codex you want a PRD:
"I want a PRD for [your feature/product]"
Activation phrases:
The skill runs a 12-step workflow:
.taskmaster/ directory structureBe detailed in your answers! The more context you provide, the better the PRD.
Example good answer:
"We need 2FA because we're seeing 150 security incidents per month from compromised accounts. Target users are enterprise customers who require SOC2 compliance. Success = reduce incidents to <10/month and meet SOC2 requirements."
Example too-vague answer:
"We need 2FA for security."
Don't worry about perfect answers - the skill will ask follow-ups if needed!
A complete product requirements document with:
Automatically sets up:
.taskmaster/
├── docs/
│ ├── prd.md # Your generated PRD
│ └── architecture.md # Placeholder for architecture docs
├── tasks/
│ └── .gitkeep
├── scripts/
│ ├── track-time.py # DateTime tracking per task
│ ├── rollback.sh # Rollback to any checkpoint
│ ├── learn-accuracy.py # Estimate vs actual analysis
│ ├── security-audit.py # Auto-generated security checks
│ └── execution-state.py # Crash recovery state
├── notes/
│ └── .gitkeep
└── .gitignore # Updated to exclude taskmaster artifacts
Generates a comprehensive workflow file in your project root that guides Claude Code/Codex to:
File naming:
CLAUDE.md (read automatically by Claude Code)codex.md (read by Codex when initialized with /init)13 automated checks ensure:
Grading scale: EXCELLENT (91%+), GOOD (83-90%), ACCEPTABLE (75-82%), NEEDS_WORK (<75%).
PRD Created: .taskmaster/docs/prd.md
CLAUDE.md Generated: Project root (TDD workflow guide)
Overview:
- Feature: Two-Factor Authentication
- Complexity: Medium
- Estimated Effort: 26 tasks, ~119 hours
- Key Goal: Reduce security incidents from 150/month to <10/month
Key Requirements:
1. REQ-001: TOTP/SMS 2FA support
2. REQ-002: Backup codes for recovery
3. REQ-003: Login flow integration
Technical Highlights:
- Architecture: Auth service + Redis for sessions
- Integration: Twilio for SMS delivery
- Database: 2 new tables (user_2fa, backup_codes)
Quality Validation: 58/60 (EXCELLENT)
- All required elements present
- 1 minor warning (REQ-007 has vague language)
Suggested Task Breakdown:
- Phase 1: 3 tasks (foundation)
- Phase 2: 8 tasks (core features)
- Phase 3: 5 tasks (testing)
Next Steps:
1. Review PRD: .taskmaster/docs/prd.md
2. Generate tasks: taskmaster generate
3. Begin implementation: taskmaster next-task
No comments yet. Be the first to share your thoughts!