From gocallum-nextjs16-agent-skills
A skill that blends the wisdom of top industry experts, ensures token-efficient PRDs, and organizes outputs in a clear folder structure.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin gocallum-nextjs16-agent-skillsThis skill uses the workspace's default tool permissions.
**Status:** Production Ready
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Status: Production Ready
Package Manager: pnpm
Key Focus: Context-aware PRD creation, token efficiency, expert-driven guidance
Official References:
The PRD Mastery skill helps AI agents create high-quality, context-aware Product Requirements Documents (PRDs) that are:
✅ Automated repository reconnaissance to understand project context
✅ Adaptive questioning based on project stage
✅ Expert-guided user interviews to extract requirements
✅ Token-optimized output format
✅ Structured organization system for PRD management
✅ Reusable templates and examples
# Node.js 20.9+ for running reconnaissance scripts
node --version
# pnpm (recommended)
pnpm --version
Run Repository Reconnaissance
node .claude/skills/ba-prd-skills/repo_scan.js
Review Preliminary Findings
cat prelim_summary.md
Create Your First PRD Follow the workflow steps below to guide the PRD creation process.
Goal: Automatically determine if the project is new or existing, identify tech stack, and document context.
Process:
Run repo_scan.js to analyze:
Output is saved to prelim_summary.md with:
Example Output:
# Preliminary Project Summary
**Project Type**: Existing
**Tech Stack**: Next.js 16, React, TypeScript, Prisma ORM
**Architecture**: App Router with server components
**Key Observations**:
- Well-structured authentication system using Auth.js
- Vector database integration with Upstash
- MCP server pattern implementation
Goal: Understand where the project is in its lifecycle and whether architecture changes are needed.
Context-Aware Questions:
For New Projects:
For Existing Projects:
Adaptive Follow-ups:
Goal: Use proven questioning techniques to move from broad ideas to specific, outcome-focused PRDs.
Inspired by "Inspired", focus on outcomes over features:
Problem Definition
Discovery Validation
Value Proposition
Based on "Continuous Discovery Habits":
Opportunity Mapping
Assumption Testing
Customer Interviews
Focus on clarity and completeness:
Stakeholder Alignment
Technical Feasibility
Implementation Plan
Goal: Create a token-efficient PRD and organize it in a clear folder structure.
prds/
├── README.md # Index of all PRDs
├── prd-001-user-authentication/
│ ├── prd.md # Main PRD document
│ ├── research.md # User research findings
│ ├── technical-specs.md # Technical specifications
│ ├── mockups/ # Design mockups
│ └── decisions.md # Architecture decisions
├── prd-002-vector-search/
│ ├── prd.md
│ ├── research.md
│ ├── technical-specs.md
│ └── decisions.md
└── templates/
└── prd-template.md # Template for new PRDs
Each PRD follows a token-efficient format:
# [Feature Name] - PRD
**ID**: PRD-XXX
**Status**: Draft | In Review | Approved | Implemented
**Owner**: [Name]
**Created**: YYYY-MM-DD
**Last Updated**: YYYY-MM-DD
## Summary
[2-3 sentence overview optimized for AI parsing]
## Problem Statement
- User need: [Specific user problem]
- Business goal: [Why this matters]
- Success metric: [How we measure success]
## Target Users
- Primary: [Who benefits most]
- Secondary: [Additional users]
## Key Outcomes
1. [Outcome 1 - user benefit]
2. [Outcome 2 - business benefit]
3. [Outcome 3 - technical benefit]
## Requirements
### Must Have
- [ ] Requirement 1
- [ ] Requirement 2
### Should Have
- [ ] Requirement 3
### Could Have
- [ ] Requirement 4
## Technical Approach
- Stack: [Tech stack]
- Architecture: [High-level approach]
- Integration points: [Key integrations]
## Risks & Assumptions
- Risk: [Risk] | Mitigation: [Plan]
- Assumption: [Assumption] | Validation: [How to test]
## Success Criteria
- Metric 1: [Target]
- Metric 2: [Target]
## Implementation Plan
1. Phase 1: [Scope] - [Timeline]
2. Phase 2: [Scope] - [Timeline]
## Resources
- Design: [Link]
- Research: [Link]
- Technical specs: [Link]
Combine expert approaches into a cohesive discovery process:
Questions to Ask:
Output: Clear problem statement
Questions to Ask:
Output: Prioritized opportunities with testable assumptions
Questions to Ask:
Output: Scoped solution with clear success metrics
Use Structured Lists Over Paragraphs ❌ Avoid: "The authentication system needs to support multiple providers including Google OAuth, GitHub, and email/password authentication. It should also handle session management and provide secure token storage."
✅ Prefer:
**Authentication Requirements**:
- Providers: Google OAuth, GitHub, email/password
- Session management: Required
- Token storage: Secure, encrypted
Frontload Key Information
Use Semantic Markers
**Must Have**: Critical requirements**Should Have**: Important but not blocking**Could Have**: Nice to have**Won't Have**: Out of scopeEliminate Redundancy
Optimize for Scanning
## Requirements
**Auth**: Multi-provider (Google, GitHub, email)
**Session**: JWT, 24h expiry, refresh tokens
**Security**: HTTPS only, CSRF protection, rate limiting
**UX**: Social login buttons, password reset flow
This format is:
Create a dedicated PRD management system:
# Create PRD directory structure
mkdir -p prds/templates
mkdir -p prds/archive
# Initialize README
cat > prds/README.md << 'EOF'
# Product Requirements Documents
## Active PRDs
- [PRD-001: User Authentication](./prd-001-user-authentication/prd.md)
- [PRD-002: Vector Search](./prd-002-vector-search/prd.md)
## Status Legend
- 🟡 Draft
- 🔵 In Review
- 🟢 Approved
- ✅ Implemented
- 📦 Archived
EOF
prd-NNN-kebab-case-name/Each PRD should be:
See repo_scan.js for the full implementation. Key features:
// Detect project type
const isNewProject = !fs.existsSync('package.json');
// Identify tech stack
const techStack = {
framework: detectFramework(),
language: detectLanguage(),
database: detectDatabase(),
deployment: detectDeployment()
};
// Analyze architecture
const architecture = {
pattern: detectPattern(),
structure: analyzeStructure(),
integrations: findIntegrations()
};
# Use the helper script
node .claude/skills/ba-prd-skills/create_prd.js "User Authentication"
# Or manually
mkdir prds/prd-001-user-authentication
cp prds/templates/prd-template.md prds/prd-001-user-authentication/prd.md
PRD Template (templates/prd-template.md)
Research Template (templates/research-template.md)
Technical Specs Template (templates/technical-specs-template.md)
Marty Cagan:
Teresa Torres:
George Biddle:
The authentication system will need to support multiple authentication
providers to give users flexibility in how they log in. We should support
Google OAuth because many users have Google accounts, GitHub OAuth for
developers, and also traditional email and password authentication for
users who prefer not to use third-party providers.
Token count: ~60 tokens
**Auth Providers**:
- Google OAuth (most users have accounts)
- GitHub OAuth (developer audience)
- Email/password (privacy-conscious users)
Token count: ~25 tokens
Savings: ~58% reduction while maintaining clarity
When creating a new PRD:
repo_scan.js)prelim_summary.md)See examples/prd-example.md for a complete example of a token-efficient, expert-driven PRD following this framework.
Built with ❤️ by Callum Bir
Inspired by the product wisdom of Marty Cagan, Teresa Torres, and George Biddle