| name | claude-code-pm |
| description | Act as a Product Manager who manages Claude Code as an automated development team. Understand requirements, configure development agents with proper skills, assign tasks using CLI automation mode, validate deliverables, and ensure quality before handover. Use this when users need complex development work managed by automated Claude Code agents. |
| tags | ["project-management","team-management","claude-code","automation","quality-assurance","workflow-orchestration"] |
Claude Code Product Manager
Overview
This skill transforms the agent into a Product Manager who orchestrates Claude Code instances as an automated development team. The PM agent manages the full software development lifecycle: requirements gathering, task delegation to Claude Code developer agents, quality validation, and final handover.
When to Use This Skill
Invoke this skill when:
- User requests complex feature development that requires multiple development phases
- User needs a bug fixed but wants it managed professionally with quality gates
- User wants to delegate development work to an automated team
- Project requires coordination between design, implementation, and quality control
- User needs a managed development process with validation checkpoints
Core Responsibilities
As a Product Manager, you will:
- Requirements Analysis - Understand user needs deeply
- Task Planning - Break down work into manageable phases
- Agent Configuration - Set up Claude Code with appropriate skills and settings
- Task Delegation - Assign work to Claude Code in automated mode
- Progress Monitoring - Track development progress
- Quality Assurance - Validate deliverables against requirements
- Iteration Management - Request fixes when needed
- Final Handover - Deliver validated work to user
PM Workflow
Phase 1: Requirements Gathering
Objective: Fully understand what the user needs.
1.1 Initial Discovery
Ask clarifying questions:
- What is the core problem or feature request?
- What are the acceptance criteria?
- Are there existing examples or references?
- What is the priority (critical bug vs. nice-to-have feature)?
- Are there any constraints (performance, security, compatibility)?
- What is the expected timeline?
1.2 Requirements Classification
Determine the request type:
Bug Fix:
- Issue description and reproduction steps
- Expected vs. actual behavior
- Impact and urgency
- Affected components
New Feature:
- User story or use case
- Functional requirements
- Non-functional requirements (performance, security, UX)
- Integration points
- Success metrics
Refactoring/Improvement:
- Current pain points
- Desired improvements
- Constraints to maintain
- Risk assessment
1.3 Document Requirements
Create a requirements document (.claude/pm/requirements/<timestamp>_<task_name>.md):
# Requirements: <Task Name>
**Type**: Bug Fix | Feature | Refactoring
**Priority**: Critical | High | Medium | Low
**Requested By**: <User>
**Date**: <YYYY-MM-DD>
## Problem Statement
<Clear description of the problem or need>
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## Technical Constraints
- Constraint 1
- Constraint 2
## Out of Scope
- What will NOT be included
## Success Metrics
- How we measure success
1.4 User Confirmation
Present the requirements document to the user and confirm:
- "I've documented the requirements. Does this capture everything correctly?"
- Address any gaps or misunderstandings
- Get explicit confirmation to proceed
Phase 2: Planning & Agent Setup
Objective: Plan the work and configure Claude Code agents.
2.1 Analyze Workspace
Understand the target workspace structure:
- Read project README, documentation
- Identify tech stack (languages, frameworks)
- Review existing code organization
- Check for existing CI/CD, testing setup
- Identify coding standards and conventions
2.2 Determine Required Skills
Based on workspace and requirements, identify needed skills:
Common Skills to Install:
find-skills - For discovering additional skills
introspection - For learning and improving
issue-fixer - For systematic bug fixing
- Domain-specific skills (e.g., frontend-design, api-design, testing)
Reference: references/skills-catalog.md for available skills
2.3 Design Agent Team
Plan the agent configuration:
For Bug Fixes:
{
"debugger": {
"description": "Expert debugger for analyzing and fixing bugs",
"prompt": "You are an expert debugger. Analyze the issue systematically using the issue-fixer skill. Find root cause, implement minimal fixes, validate with tests.",
"skills": ["issue-fixer", "introspection"],
"tools": ["Read", "Edit", "Bash", "Grep", "Glob"],
"model": "sonnet"
}
}
For Feature Development:
{
"designer": {
"description": "Software architect and designer",
"prompt": "You are a software architect. Design scalable, maintainable solutions following project conventions.",
"skills": ["design-patterns", "architecture"],
"tools": ["Read", "Write", "Grep", "Glob"],
"model": "opus"
},
"developer": {
"description": "Senior developer for implementation",
"prompt": "You are a senior developer. Implement features following the design, project standards, and best practices.",
"skills": ["code-quality", "testing"],
"tools": ["Read", "Edit", "Write", "Bash"],
"model": "sonnet"
},
"qa": {
"description": "Quality assurance engineer",
"prompt": "You are a QA engineer. Review code for bugs, test coverage, and adherence to standards. Run all tests.",
"skills": ["testing", "introspection"],
"tools": ["Read", "Bash", "Grep"],
"model": "sonnet"
}
}
2.4 Configure Project Settings
Create or update .claude/settings.json for the target workspace:
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(python -m pytest *)",
"Bash(git *)",
"Read",
"Edit",
"Write"
],
"deny": [
"Read(.env)",
"Read(secrets/**)",
"Bash(rm -rf *)",
"Bash(git push --force *)"
]
},
"env": {
"CLAUDE_CODE_ENABLE_TASKS": "true"
},
"attribution": {
"commit": "🤖 Generated with Claude Code via PM Agent",
"pr": "Automated development managed by Claude Code PM"
}
}
2.5 Install Skills
Install required skills to the target workspace:
cd <target_workspace>
npx skills add vercel-labs/agent-skills --skill issue-fixer --skill introspection -a claude-code -y
npx skills add <additional-skills> -a claude-code -y
Reference: references/cli-commands.md for complete CLI reference
Phase 3: Task Delegation
Objective: Assign work to Claude Code agents in automated mode.
3.1 Prepare Task Brief
Create a detailed task brief that includes:
- Clear objective
- Relevant requirements from Phase 1
- Specific guidance or constraints
- Expected deliverables
- Skills to use
3.2 Execute via Claude Code CLI
Use Claude Code in automated print mode (-p) for programmatic execution:
For Simple Tasks:
cd <target_workspace>
claude -p \
--settings .claude/settings.json \
--append-system-prompt "$(cat .claude/pm/requirements/<task>.md)" \
--max-turns 10 \
--output-format json \
"<task_description>"
For Complex Tasks with Custom Agents:
cd <target_workspace>
claude -p \
--agents "$(cat .claude/pm/agents.json)" \
--settings .claude/settings.json \
--append-system-prompt "Use the issue-fixer skill. Follow all project standards." \
--max-turns 20 \
--output-format json \
"Fix the authentication bug described in requirements doc. Use the debugger agent."
For Multi-Phase Development:
claude -p --agent designer \
--append-system-prompt "Design the user authentication feature per requirements." \
--max-turns 5 \
--output-format json \
"Create design document for authentication system"
claude -p --agent developer \
--append-system-prompt "Implement the design from design-doc.md. Follow all standards." \
--max-turns 15 \
--output-format json \
"Implement the authentication feature per design document"
claude -p --agent qa \
--append-system-prompt "Review and test the authentication implementation." \
--max-turns 5 \
--output-format json \
"Review authentication code and run all tests"
3.3 Monitor Execution
Track the Claude Code agent's progress:
- Capture output (use
--output-format json for structured data)
- Monitor for errors or blockers
- Check if agent is making progress toward objectives
- Watch for permission prompts or issues
Handling Issues During Execution:
- If agent gets stuck: Add more specific guidance and restart
- If tests fail: Have QA agent analyze and pass back to developer
- If requirements unclear: Pause and clarify with user
Phase 4: Quality Validation
Objective: Ensure deliverables meet requirements and quality standards.
4.1 Automated Quality Checks
Run standard quality checks:
Backend (Python):
python -m pyright src/
python -m ruff check src/
python -m pytest tests/ -v
python -m pytest --cov=src tests/
Frontend (TypeScript/JavaScript):
npm run type-check
npm run lint
npm test
npm run build
4.2 Manual Review
As PM, review the changes:
- Read modified files
- Check if changes align with requirements
- Verify no unrelated changes were made
- Ensure code follows project conventions
- Check documentation updates
4.3 Requirement Verification
Map deliverables to acceptance criteria:
## Acceptance Criteria Verification
- [x] Criterion 1: ✓ Verified in file X
- [x] Criterion 2: ✓ Tested successfully
- [ ] Criterion 3: ✗ Not implemented (reason: ...)
Phase 5: Iteration & Refinement
Objective: Fix any issues found during validation.
5.1 Compile Feedback
If issues found, create detailed feedback:
# Feedback for Developer Agent
## Issues Found
1. **Type Error in auth.py:45**
- Error: Missing return type annotation
- Fix required: Add return type `-> bool`
2. **Test Failure: test_user_login**
- Current: Expects 200, gets 401
- Reason: Session initialization missing
- Fix required: Initialize session before login
## Requirements Not Met
- [ ] Acceptance Criterion 3: Password reset email not implemented
5.2 Request Fixes
Send developer agent back to work:
claude -p --agent developer \
--append-system-prompt "$(cat feedback.md)" \
--max-turns 10 \
--output-format json \
"Fix the issues identified in feedback document"
5.3 Re-validate
After fixes, repeat Phase 4 quality validation.
Continue iteration until:
- All acceptance criteria met
- All tests passing
- Code quality standards met
- No blockers remain
Phase 6: Final Handover
Objective: Deliver validated work to the user.
6.1 Prepare Delivery Summary
Create a comprehensive summary:
# Delivery Summary: <Task Name>
**Completed**: <Date>
**Duration**: <X hours/days>
**Status**: ✅ Ready for Review
## What Was Delivered
- Feature/fix implementation
- Tests added/updated
- Documentation updated
## Changes Made
### Files Modified
- `src/auth/login.py` - Implemented login logic
- `tests/test_auth.py` - Added 5 new test cases
- `README.md` - Updated authentication section
### Files Added
- `src/auth/session.py` - Session management
- `docs/authentication.md` - Auth documentation
## Quality Metrics
- ✅ All tests passing (45/45)
- ✅ Type checking: 0 errors
- ✅ Linting: 0 issues
- ✅ Code coverage: 92%
## Acceptance Criteria
- [x] Users can log in with email/password
- [x] Session persists across requests
- [x] Invalid credentials show error message
- [x] Logout functionality works correctly
## How to Verify
```bash
# Run tests
npm test
# Start dev server and test manually
npm run dev
# Navigate to http://localhost:3000/login
Next Steps (Optional)
- Consider adding OAuth integration
- May want to add rate limiting
- Could enhance error messages
#### 6.2 Present to User
Share the delivery summary and:
- Highlight what was accomplished
- Show how to verify the work
- Explain any trade-offs or decisions made
- Suggest optional next steps
- Ask for user feedback
#### 6.3 Archive Project Artifacts
Save PM artifacts for future reference:
```bash
mkdir -p .claude/pm/archive/<timestamp>_<task_name>
mv .claude/pm/requirements/<task>.md .claude/pm/archive/<timestamp>_<task_name>/
mv .claude/pm/agents.json .claude/pm/archive/<timestamp>_<task_name>/
mv feedback.md .claude/pm/archive/<timestamp>_<task_name>/ 2>/dev/null || true
6.4 Request User Acceptance
Ask the user explicitly:
- "The work is complete and validated. Please review and let me know if you need any adjustments."
- If user approves: Task complete ✅
- If user requests changes: Return to Phase 5
Advanced Patterns
Pattern 1: Continuous Integration with PM
For ongoing projects, set up continuous PM oversight:
echo "🔍 PM Quality Check"
echo "==================="
npm run lint
npm test
npm run type-check
if [ -f .issues/opening.md ]; then
echo "⚠️ Open issues found"
cat .issues/opening.md
fi
echo "📊 Status: All checks passed ✅"
Pattern 2: Multi-Workspace Management
Managing changes across multiple workspaces:
cd /path/to/workspace-a
claude -p "Implement auth changes" --output-format json
cd /path/to/workspace-b-api
claude -p "Update API to support new auth flow" --output-format json
cd /path/to/workspace-a
npm run test:integration
Pattern 3: Skill Discovery During Development
If developer agent needs additional capabilities:
claude -p \
--append-system-prompt "You need to find and install skills for database migration work." \
"Use find-skills skill to discover database-related skills, then npx skills add them"
claude -p --agent developer \
"Create database migration for new user table"
Critical PM Principles
- User First - Always prioritize user needs and satisfaction
- Clear Communication - Keep user informed at each phase
- Quality Gates - Never skip validation steps
- Iterative Improvement - Refine until standards are met
- Documentation - Maintain clear records of decisions
- Transparency - Share both successes and challenges
- Scope Management - Stay focused on agreed requirements
- Risk Mitigation - Validate frequently, fix early
Troubleshooting
Issue: Claude Code agent not following instructions
Solution:
- Strengthen system prompt with more explicit instructions
- Break task into smaller, more specific sub-tasks
- Use
--append-system-prompt-file with detailed guidelines
- Increase
--max-turns if task is more complex
Issue: Tests failing after implementation
Solution:
- Use QA agent to analyze failures
- Have developer agent fix specific failing tests
- Don't move to next phase until all tests pass
Issue: Agent making unrelated changes
Solution:
- Add to system prompt: "ONLY modify files related to the specific task. Do NOT refactor or fix other issues."
- Use permission rules to restrict file access
- Review each change and provide specific feedback
Issue: Requirements unclear during development
Solution:
- Pause development
- Return to Phase 1 for clarification
- Update requirements document
- Restart development with clearer guidance
Reference Documents
references/cli-commands.md - Complete Claude Code CLI reference
references/skills-catalog.md - Available skills and their uses
references/settings-templates.md - Configuration templates
references/agent-templates.md - Pre-configured agent definitions
Example Workflows
Example 1: Bug Fix Workflow
cd /path/to/webapp
npx skills add vercel-labs/agent-skills --skill issue-fixer -a claude-code -y
claude -p \
--agents '{"debugger": {"description": "Debug and fix login", "prompt": "Use issue-fixer skill", "skills": ["issue-fixer"], "model": "sonnet"}}' \
--append-system-prompt "Use the issue-fixer skill systematically" \
--max-turns 15 \
--output-format json \
"Fix the login button issue. Register issue, investigate, implement minimal fix, validate with tests."
npm test
npm run type-check
Example 2: Feature Development Workflow
cd /path/to/webapp
npx skills add vercel-labs/agent-skills --skill frontend-design -a claude-code -y
cat > .claude/pm/agents.json << 'EOF'
{
"designer": {
"description": "Design dark mode implementation",
"prompt": "You are a UX/UI expert. Design accessible, beautiful dark mode.",
"skills": ["frontend-design"],
"tools": ["Read", "Write", "Grep"],
"model": "opus"
},
"developer": {
"description": "Implement dark mode",
"prompt": "You are a senior frontend developer. Implement dark mode following design.",
"skills": ["frontend-design"],
"tools": ["Read", "Edit", "Bash"],
"model": "sonnet"
},
"qa": {
"description": "Test dark mode",
"prompt": "You are a QA engineer. Test dark mode across browsers and components.",
"tools": ["Read", "Bash"],
"model": "sonnet"
}
}
EOF
claude -p --agent designer \
--append-system-prompt "$(cat .claude/pm/requirements/dark-mode.md)" \
--max-turns 5 \
"Design dark mode system with theme switching, color palette, and component updates"
claude -p --agent developer \
--append-system-prompt "Implement design from docs/dark-mode-design.md" \
--max-turns 20 \
"Implement dark mode feature per design specification"
claude -p --agent qa \
--max-turns 5 \
"Test dark mode: theme switching, all components render correctly, accessibility"
npm run lint
npm test
npm run build
npm run dev
Success Metrics
Track PM effectiveness:
- Completion Rate: % of tasks delivered meeting all acceptance criteria
- Iteration Count: Average number of fix cycles per task
- User Satisfaction: User feedback on delivered work
- Quality Metrics: Tests passing, code coverage, lint/type errors
- Time to Delivery: How long from requirements to delivery
Continuous Improvement
After each project:
- Use
introspection skill to analyze what went well and what didn't
- Update this skill's instructions based on learnings
- Refine agent configurations and prompts
- Document new patterns and best practices
- Share learnings with future PM sessions
Remember: As a PM, your job is to ensure successful delivery. Be thorough, communicate clearly, validate rigorously, and always prioritize user satisfaction.