.agents/skills/claude-code-pm/SKILL.md
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.
npx skillsauth add cyberelf/agent_skills claude-code-pmInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Invoke this skill when:
As a Product Manager, you will:
Objective: Fully understand what the user needs.
Ask clarifying questions:
Determine the request type:
Bug Fix:
New Feature:
Refactoring/Improvement:
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
Present the requirements document to the user and confirm:
Objective: Plan the work and configure Claude Code agents.
Understand the target workspace structure:
Based on workspace and requirements, identify needed skills:
Common Skills to Install:
find-skills - For discovering additional skillsintrospection - For learning and improvingissue-fixer - For systematic bug fixingReference: references/skills-catalog.md for available skills
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"
}
}
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"
}
}
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
Objective: Assign work to Claude Code agents in automated mode.
Create a detailed task brief that includes:
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:
# Phase 1: Design
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"
# Phase 2: Implementation
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"
# Phase 3: QA
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"
Track the Claude Code agent's progress:
--output-format json for structured data)Handling Issues During Execution:
Objective: Ensure deliverables meet requirements and quality standards.
Run standard quality checks:
Backend (Python):
# Type checking
python -m pyright src/
# Linting
python -m ruff check src/
# Tests
python -m pytest tests/ -v
# Coverage
python -m pytest --cov=src tests/
Frontend (TypeScript/JavaScript):
# Type checking
npm run type-check
# Linting
npm run lint
# Tests
npm test
# Build verification
npm run build
As PM, review the changes:
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: ...)
Objective: Fix any issues found during validation.
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
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"
After fixes, repeat Phase 4 quality validation.
Continue iteration until:
Objective: Deliver validated work to the user.
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
#### 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
Ask the user explicitly:
For ongoing projects, set up continuous PM oversight:
# .claude/pm/ci-check.sh
#!/bin/bash
# Run by PM agent periodically to check quality
echo "🔍 PM Quality Check"
echo "==================="
# Run all quality checks
npm run lint
npm test
npm run type-check
# Check for open issues
if [ -f .issues/opening.md ]; then
echo "⚠️ Open issues found"
cat .issues/opening.md
fi
# Generate status report
echo "📊 Status: All checks passed ✅"
Managing changes across multiple workspaces:
# Execute in workspace A
cd /path/to/workspace-a
claude -p "Implement auth changes" --output-format json
# Execute in workspace B (API)
cd /path/to/workspace-b-api
claude -p "Update API to support new auth flow" --output-format json
# Verify integration
cd /path/to/workspace-a
npm run test:integration
If developer agent needs additional capabilities:
# PM discovers and installs needed skills
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"
# Then delegate task
claude -p --agent developer \
"Create database migration for new user table"
Solution:
--append-system-prompt-file with detailed guidelines--max-turns if task is more complexSolution:
Solution:
Solution:
references/cli-commands.md - Complete Claude Code CLI referencereferences/skills-catalog.md - Available skills and their usesreferences/settings-templates.md - Configuration templatesreferences/agent-templates.md - Pre-configured agent definitions# User reports: "Login button not working"
# PM Phase 1: Requirements
# Create requirements doc, confirm with user
# PM Phase 2: Setup
cd /path/to/webapp
npx skills add vercel-labs/agent-skills --skill issue-fixer -a claude-code -y
# PM Phase 3: Delegate
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."
# PM Phase 4: Validate
npm test
npm run type-check
# PM Phase 5: Iterate if needed
# If issues found, send back with feedback
# PM Phase 6: Deliver
# Create summary, present to user
# User requests: "Add dark mode to the app"
# PM Phase 1: Requirements
# Document feature requirements, get confirmation
# PM Phase 2: Setup
cd /path/to/webapp
npx skills add vercel-labs/agent-skills --skill frontend-design -a claude-code -y
# Configure agents
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
# PM Phase 3: Delegate
# Step 1: Design
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"
# Step 2: Implement
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"
# Step 3: QA
claude -p --agent qa \
--max-turns 5 \
"Test dark mode: theme switching, all components render correctly, accessibility"
# PM Phase 4: Validate
npm run lint
npm test
npm run build
# Manual testing
npm run dev
# Test dark mode toggle, verify all pages
# PM Phase 5: Iterate if needed
# PM Phase 6: Deliver
# Create delivery summary with screenshots, present to user
Track PM effectiveness:
After each project:
introspection skill to analyze what went well and what didn'tRemember: As a PM, your job is to ensure successful delivery. Be thorough, communicate clearly, validate rigorously, and always prioritize user satisfaction.
tools
Agent-first graph-backed knowledge wiki builder with a self-contained CLI. Use for Graphwiki init/build/ingest/update, source indexing, semantic entity and relationship extraction, generated wiki pages, graph JSON/HTML explorer, evidence line ranges, query/explain question answering, synthesis pages, HTML reports, adding confirmed entity types, applying patches, cleanup, validation, tasks, and SQLite cache generation.
development
Use when the user asks to export a local HTML file, web page, or invitation page to a single-page PDF, a no-pagination PDF, a long PDF with auto-calculated height, or a PDF without headers and footers. Trigger on phrases like 单页 PDF, 不分页, 自动计算长度, 长图 PDF, 去掉页眉页脚, export HTML to single-page PDF, or print page to one PDF page.
development
Build and expand an insight-ready raw-material layer by discovering page-level sources, deduplicating them with an internal pre-crawl link index, capturing raw Markdown, verifying metadata in place, and keeping ingest/register state aligned. Use for additive source harvesting, raw webpage capture, source registry maintenance, source/ingest tracking, source/raw downloads, and in-place verification rather than final synthesis.
development
Generate a structured, illustrated Q&A HTML document from the current conversation. Scans the conversation for conceptual questions the user asked and Claude's answers, then produces a self-contained HTML file with styled cards and SVG diagrams for technical/architectural topics. If a Q&A HTML file already exists in the current project directory, appends the new Q&As to it instead of creating a new file. Trigger this skill whenever the user asks to "generate Q&A", "create Q&A from conversation", "save Q&A", "document our Q&A", "turn this chat into Q&A", or anything suggesting they want the conversation's questions and answers captured as a document — even if they don't use the exact phrase "Q&A skill".