Install
$ agentstack add skill-spencermarx-open-code-review-pair-programming ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Pair Programming
Collaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.
What This Skill Does
This skill provides professional pair programming capabilities with AI assistance, supporting multiple collaboration modes, continuous verification, and integrated testing. It manages driver/navigator roles, performs real-time code review, tracks quality metrics, and ensures high standards through truth-score verification.
Key Capabilities:
- Multiple Modes: Driver, Navigator, Switch, TDD, Review, Mentor, Debug
- Real-Time Verification: Automatic quality scoring with rollback on failures
- Role Management: Seamless switching between driver/navigator roles
- Testing Integration: Auto-generate tests, track coverage, continuous testing
- Code Review: Security scanning, performance analysis, best practice enforcement
- Session Persistence: Auto-save, recovery, export, and sharing
Prerequisites
Required:
- Claude Flow CLI installed (
npm install -g claude-flow@alpha) - Git repository (optional but recommended)
Recommended:
- Testing framework (Jest, pytest, etc.)
- Linter configured (ESLint, pylint, etc.)
- Code formatter (Prettier, Black, etc.)
Quick Start
Basic Session
# Start simple pair programming
claude-flow pair --start
TDD Session
# Test-driven development
claude-flow pair --start \
--mode tdd \
--test-first \
--coverage 90
Complete Guide
Session Control Commands
Starting Sessions
# Basic start
claude-flow pair --start
# Expert refactoring session
claude-flow pair --start \
--agent senior-dev \
--focus refactor \
--verify \
--threshold 0.98
# Debugging session
claude-flow pair --start \
--agent debugger-expert \
--focus debug \
--review
# Learning session
claude-flow pair --start \
--mode mentor \
--pace slow \
--examples
Session Management
# Check status
claude-flow pair --status
# View history
claude-flow pair --history
# Pause session
/pause [--reason ]
# Resume session
/resume
# End session
claude-flow pair --end [--save] [--report]
Available Modes
Driver Mode
You write code while AI provides guidance.
claude-flow pair --start --mode driver
Your Responsibilities:
- Write actual code
- Implement solutions
- Make immediate decisions
- Handle syntax and structure
AI Navigator:
- Strategic guidance
- Spot potential issues
- Suggest improvements
- Real-time review
- Track overall direction
Best For:
- Learning new patterns
- Implementing familiar features
- Quick iterations
- Hands-on debugging
Commands:
/suggest - Get implementation suggestions
/review - Request code review
/explain - Ask for explanations
/optimize - Request optimization ideas
/patterns - Get pattern recommendations
Navigator Mode
AI writes code while you provide direction.
claude-flow pair --start --mode navigator
Your Responsibilities:
- Provide high-level direction
- Review generated code
- Make architectural decisions
- Ensure business requirements
AI Driver:
- Write implementation code
- Handle syntax details
- Implement your guidance
- Manage boilerplate
- Execute refactoring
Best For:
- Rapid prototyping
- Boilerplate generation
- Learning from AI patterns
- Exploring solutions
Commands:
/implement - Direct implementation
/refactor - Request refactoring
/test - Generate tests
/document - Add documentation
/alternate - See alternative approaches
Switch Mode
Automatically alternates roles at intervals.
# Default 10-minute intervals
claude-flow pair --start --mode switch
# 5-minute intervals (rapid)
claude-flow pair --start --mode switch --interval 5m
# 15-minute intervals (deep focus)
claude-flow pair --start --mode switch --interval 15m
Handoff Process:
- 30-second warning before switch
- Current driver completes thought
- Context summary generated
- Roles swap smoothly
- New driver continues
Best For:
- Balanced collaboration
- Knowledge sharing
- Complex features
- Extended sessions
Specialized Modes
TDD Mode - Test-Driven Development:
claude-flow pair --start \
--mode tdd \
--test-first \
--coverage 100
Workflow: Write failing test → Implement → Refactor → Repeat
Review Mode - Continuous code review:
claude-flow pair --start \
--mode review \
--strict \
--security
Features: Real-time feedback, security scanning, performance analysis
Mentor Mode - Learning-focused:
claude-flow pair --start \
--mode mentor \
--explain-all \
--pace slow
Features: Detailed explanations, step-by-step guidance, pattern teaching
Debug Mode - Problem-solving:
claude-flow pair --start \
--mode debug \
--verbose \
--trace
Features: Issue identification, root cause analysis, fix suggestions
In-Session Commands
Code Commands
/explain [--level basic|detailed|expert]
Explain the current code or selection
/suggest [--type refactor|optimize|security|style]
Get improvement suggestions
/implement
Request implementation (navigator mode)
/refactor [--pattern ] [--scope function|file|module]
Refactor selected code
/optimize [--target speed|memory|both]
Optimize code for performance
/document [--format jsdoc|markdown|inline]
Add documentation to code
/comment [--verbose]
Add inline comments
/pattern [--example]
Apply a design pattern
Testing Commands
/test [--watch] [--coverage] [--only ]
Run test suite
/test-gen [--type unit|integration|e2e]
Generate tests for current code
/coverage [--report html|json|terminal]
Check test coverage
/mock [--realistic]
Generate mock data or functions
/test-watch [--on-save]
Enable test watching
/snapshot [--update]
Create test snapshots
Review Commands
/review [--scope current|file|changes] [--strict]
Perform code review
/security [--deep] [--fix]
Security analysis
/perf [--profile] [--suggestions]
Performance analysis
/quality [--detailed]
Check code quality metrics
/lint [--fix] [--config ]
Run linters
/complexity [--threshold ]
Analyze code complexity
Navigation Commands
/goto [:line[:column]]
Navigate to file or location
/find [--regex] [--case-sensitive]
Search in project
/recent [--limit ]
Show recent files
/bookmark [add|list|goto|remove] []
Manage bookmarks
/history [--limit ] [--filter ]
Show command history
/tree [--depth ] [--filter ]
Show project structure
Git Commands
/diff [--staged] [--file ]
Show git diff
/commit [--message ] [--amend]
Commit with verification
/branch [create|switch|delete|list] []
Branch operations
/stash [save|pop|list|apply] []
Stash operations
/log [--oneline] [--limit ]
View git log
/blame []
Show git blame
AI Partner Commands
/agent [switch|info|config] []
Manage AI agent
/teach
Teach the AI your preferences
/feedback [positive|negative]
Provide feedback to AI
/personality [professional|friendly|concise|verbose]
Adjust AI personality
/expertise [add|remove|list] []
Set AI expertise focus
Metrics Commands
/metrics [--period today|session|week|all]
Show session metrics
/score [--breakdown]
Show quality scores
/productivity [--chart]
Show productivity metrics
/leaderboard [--personal|team]
Show improvement leaderboard
Role & Mode Commands
/switch [--immediate]
Switch driver/navigator roles
/mode
Change mode (driver|navigator|switch|tdd|review|mentor|debug)
/role
Show current role
/handoff
Prepare role handoff
Command Shortcuts
| Alias | Full Command | |-------|-------------| | /s | /suggest | | /e | /explain | | /t | /test | | /r | /review | | /c | /commit | | /g | /goto | | /f | /find | | /h | /help | | /sw | /switch | | /st | /status |
Configuration
Basic Configuration
Create .claude-flow/pair-config.json:
{
"pair": {
"enabled": true,
"defaultMode": "switch",
"defaultAgent": "auto",
"autoStart": false,
"theme": "professional"
}
}
Complete Configuration
{
"pair": {
"general": {
"enabled": true,
"defaultMode": "switch",
"defaultAgent": "senior-dev",
"language": "javascript",
"timezone": "UTC"
},
"modes": {
"driver": {
"enabled": true,
"suggestions": true,
"realTimeReview": true,
"autoComplete": false
},
"navigator": {
"enabled": true,
"codeGeneration": true,
"explanations": true,
"alternatives": true
},
"switch": {
"enabled": true,
"interval": "10m",
"warning": "30s",
"autoSwitch": true,
"pauseOnIdle": true
}
},
"verification": {
"enabled": true,
"threshold": 0.95,
"autoRollback": true,
"preCommitCheck": true,
"continuousMonitoring": true,
"blockOnFailure": true
},
"testing": {
"enabled": true,
"autoRun": true,
"framework": "jest",
"onSave": true,
"coverage": {
"enabled": true,
"minimum": 80,
"enforce": true,
"reportFormat": "html"
}
},
"review": {
"enabled": true,
"continuous": true,
"preCommit": true,
"security": true,
"performance": true,
"style": true,
"complexity": {
"maxComplexity": 10,
"maxDepth": 4,
"maxLines": 100
}
},
"git": {
"enabled": true,
"autoCommit": false,
"commitTemplate": "feat: {message}",
"signCommits": false,
"pushOnEnd": false,
"branchProtection": true
},
"session": {
"autoSave": true,
"saveInterval": "5m",
"maxDuration": "4h",
"idleTimeout": "15m",
"breakReminder": "45m",
"metricsInterval": "1m"
},
"ai": {
"model": "advanced",
"temperature": 0.7,
"maxTokens": 4000,
"personality": "professional",
"expertise": ["backend", "testing", "security"],
"learningEnabled": true
}
}
}
Built-in Agents
{
"agents": {
"senior-dev": {
"expertise": ["architecture", "patterns", "optimization"],
"style": "thorough",
"reviewLevel": "strict"
},
"tdd-specialist": {
"expertise": ["testing", "mocks", "coverage"],
"style": "test-first",
"reviewLevel": "comprehensive"
},
"debugger-expert": {
"expertise": ["debugging", "profiling", "tracing"],
"style": "analytical",
"reviewLevel": "focused"
},
"junior-dev": {
"expertise": ["learning", "basics", "documentation"],
"style": "questioning",
"reviewLevel": "educational"
}
}
}
CLI Configuration
# Set configuration
claude-flow pair config set defaultMode switch
claude-flow pair config set verification.threshold 0.98
# Get configuration
claude-flow pair config get
claude-flow pair config get defaultMode
# Export/Import
claude-flow pair config export > config.json
claude-flow pair config import config.json
# Reset
claude-flow pair config reset
Profile Management
Create reusable profiles:
# Create profile
claude-flow pair profile create refactoring \
--mode driver \
--verify true \
--threshold 0.98 \
--focus refactor
# Use profile
claude-flow pair --start --profile refactoring
# List profiles
claude-flow pair profile list
Profile configuration:
{
"profiles": {
"refactoring": {
"mode": "driver",
"verification": {
"enabled": true,
"threshold": 0.98
},
"focus": "refactor"
},
"debugging": {
"mode": "navigator",
"agent": "debugger-expert",
"trace": true,
"verbose": true
},
"learning": {
"mode": "mentor",
"pace": "slow",
"explanations": "detailed",
"examples": true
}
}
}
Real-World Examples
Example 1: Feature Implementation
Implementing user authentication with JWT tokens:
# Session setup
claude-flow pair --start \
--mode switch \
--agent senior-dev \
--focus implement \
--verify \
--test
Session Flow:
👥 Starting pair programming for authentication feature...
[DRIVER: You - 10 minutes]
/explain JWT authentication flow
> AI explains JWT concepts and best practices
/suggest implementation approach
> AI suggests using middleware pattern with refresh tokens
# You write the basic auth middleware structure
[SWITCH TO NAVIGATOR]
[NAVIGATOR: AI - 10 minutes]
/implement JWT token generation with refresh tokens
> AI generates secure token implementation
/test-gen
> AI creates comprehensive test suite
[SWITCH TO DRIVER]
[DRIVER: You - 10 minutes]
# You refine the implementation
/review --security
> AI performs security review, suggests improvements
/commit --message "feat: JWT authentication with refresh tokens"
✅ Truth Score: 0.98 - Committed successfully
Example 2: Bug Fixing
Debugging a memory leak in Node.js:
# Session setup
claude-flow pair --start \
--mode navigator \
--agent debugger-expert \
--focus debug \
--trace
Session Flow:
👥 Starting debugging session...
/status
> Analyzing application for memory issues...
/perf --profile
> Memory usage growing: 150MB → 450MB over 10 minutes
/find "new EventEmitter" --regex
> Found 3 instances of EventEmitter creation
/inspect eventEmitters --deep
> Discovering listeners not being removed
/suggest fix for memory leak
> AI suggests: "Add removeListener in cleanup functions"
/implement cleanup functions for all event emitters
> AI generates proper cleanup code
/test
> Memory stable at 150MB ✅
/commit --message "fix: memory leak in event emitters"
Example 3: TDD Session
Building shopping cart with test-driven development:
# Session setup
claude-flow pair --start \
--mode tdd \
--agent tdd-specialist \
--test-first
Session Flow:
👥 TDD Session: Shopping Cart Feature
[RED PHASE]
/test-gen "add item to cart"
> AI writes failing test:
✗ should add item to cart
✗ should update quantity for existing item
✗ should calculate total price
[GREEN PHASE]
/implement minimal cart functionality
> You write just enough code to pass tests
/test
> Tests passing: 3/3 ✅
[REFACTOR PHASE]
/refactor --pattern repository
> AI refactors to repository pattern
/test
> Tests still passing: 3/3 ✅
[NEXT CYCLE]
/test-gen "remove item from cart"
> AI writes new failing tests...
Example 4: Code Refactoring
Modernizing legacy code:
# Session setup
claude-flow pair --start \
--mode driver \
--focus refactor \
--verify \
--threshold 0.98
Session Flow:
👥 Refactoring Session: Modernizing UserService
/analyze UserService.js
> AI identifies:
- Callback hell (5 levels deep)
- No error handling
- Tight coupling
- No tests
/suggest refactoring plan
> AI suggests:
1. Convert callbacks to async/await
2. Add error boundaries
3. Extract dependencies
4. Add unit tests
/test-gen --before-refactor
> AI generates tests for current behavior
/refactor callbacks to async/await
# You refactor with AI guidance
/test
> All tests passing ✅
/review --compare
> AI shows before/after comparison
> Code complexity: 35 → 12
> Truth score: 0.99 ✅
/commit --message "refactor: modernize UserService with async/await"
Example 5: Performance Optimization
Optimizing slow React application:
# Session setup
claude-flow pair --start \
--mode switch \
--agent performance-expert \
--focus optimize \
--profile
Session Flow:
👥 Performance Optimization S
…
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [spencermarx](https://github.com/spencermarx)
- **Source:** [spencermarx/open-code-review](https://github.com/spencermarx/open-code-review)
- **License:** Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.