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
Reference
The full detail lives in references/ and loads only when needed:
references/usage.md — session control, modes, in-session commands & configuration.
references/examples.md — real-world examples, templates, session management & advanced features.
Operations reference
Best Practices
Session Practices
- Clear Goals - Define session objectives upfront
- Appropriate Mode - Choose based on task type
- Enable Verification - For critical code paths
- Regular Testing - Maintain quality continuously
- Session Notes - Document important decisions
- Regular Breaks - Take breaks every 45-60 minutes
Code Practices
- Test Early - Run tests after each change
- Verify Before Commit - Check truth scores
- Review Security - Always for sensitive code
- Profile Performance - Use
/perf for optimization
- Save Sessions - For complex work
- Learn from AI - Ask questions frequently
Mode Selection
- Driver Mode: When learning, controlling implementation
- Navigator Mode: For rapid prototyping, generation
- Switch Mode: Long sessions, balanced collaboration
- TDD Mode: Building with tests
- Review Mode: Quality focus
- Mentor Mode: Learning priority
- Debug Mode: Fixing issues
Troubleshooting
Session Won't Start
- Check agent availability
- Verify configuration file syntax
- Ensure clean workspace
- Review log files
Session Disconnected
- Use
--recover to restore
- Check network connection
- Verify background processes
- Review auto-save files
Poor Performance
- Reduce verification threshold
- Disable continuous testing
- Check system resources
- Use lighter AI model
Configuration Issues
- Validate JSON syntax
- Check file permissions
- Review priority order (CLI > env > project > user > global)
- Run
claude-flow pair config validate
Quality Metrics
Truth Score Thresholds
Error: < 0.90 ❌
Warning: 0.90 - 0.95 ⚠️
Good: 0.95 - 0.98 ✅
Excellent: > 0.98 🌟
Coverage Thresholds
Error: < 70% ❌
Warning: 70% - 80% ⚠️
Good: 80% - 90% ✅
Excellent: > 90% 🌟
Complexity Thresholds
Error: > 15 ❌
Warning: 10 - 15 ⚠️
Good: 5 - 10 ✅
Excellent: < 5 🌟
Environment Variables
Override configuration via environment:
export CLAUDE_PAIR_MODE=driver
export CLAUDE_PAIR_VERIFY=true
export CLAUDE_PAIR_THRESHOLD=0.98
export CLAUDE_PAIR_AGENT=senior-dev
export CLAUDE_PAIR_AUTO_TEST=true
Command History
Navigate history:
↑/↓ - Navigate through command history
Ctrl+R - Search command history
!! - Repeat last command
!<n> - Run command n from history
Keyboard Shortcuts (Configurable)
Default shortcuts:
{
"shortcuts": {
"switch": "ctrl+shift+s",
"suggest": "ctrl+space",
"review": "ctrl+r",
"test": "ctrl+t"
}
}
Related Commands
claude-flow pair --help - Show help
claude-flow pair config - Manage configuration
claude-flow pair profile - Manage profiles
claude-flow pair templates - List templates
claude-flow pair agents - List available agents
1---2name: pair-programming3description: AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with truth-score verification. Use when pairing on code with driver/navigator roles, doing TDD, or wanting real-time review while building.4---56# Pair Programming78Collaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.910## What This Skill Does1112This 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.1314**Key Capabilities:**15- **Multiple Modes**: Driver, Navigator, Switch, TDD, Review, Mentor, Debug16- **Real-Time Verification**: Automatic quality scoring with rollback on failures17- **Role Management**: Seamless switching between driver/navigator roles18- **Testing Integration**: Auto-generate tests, track coverage, continuous testing19- **Code Review**: Security scanning, performance analysis, best practice enforcement20- **Session Persistence**: Auto-save, recovery, export, and sharing2122## Prerequisites2324**Required:**25- Claude Flow CLI installed (`npm install -g claude-flow@alpha`)26- Git repository (optional but recommended)2728**Recommended:**29- Testing framework (Jest, pytest, etc.)30- Linter configured (ESLint, pylint, etc.)31- Code formatter (Prettier, Black, etc.)3233## Quick Start3435### Basic Session36```bash37# Start simple pair programming38claude-flow pair --start39```4041### TDD Session42```bash43# Test-driven development44claude-flow pair --start \45 --mode tdd \46 --test-first \47 --coverage 9048```4950---515253## Reference545556The full detail lives in `references/` and loads only when needed:5758- [`references/usage.md`](references/usage.md) — session control, modes, in-session commands & configuration.59- [`references/examples.md`](references/examples.md) — real-world examples, templates, session management & advanced features.6061---6263## Operations reference6465### Best Practices6667#### Session Practices681. **Clear Goals** - Define session objectives upfront692. **Appropriate Mode** - Choose based on task type703. **Enable Verification** - For critical code paths714. **Regular Testing** - Maintain quality continuously725. **Session Notes** - Document important decisions736. **Regular Breaks** - Take breaks every 45-60 minutes7475#### Code Practices761. **Test Early** - Run tests after each change772. **Verify Before Commit** - Check truth scores783. **Review Security** - Always for sensitive code794. **Profile Performance** - Use `/perf` for optimization805. **Save Sessions** - For complex work816. **Learn from AI** - Ask questions frequently8283#### Mode Selection84- **Driver Mode**: When learning, controlling implementation85- **Navigator Mode**: For rapid prototyping, generation86- **Switch Mode**: Long sessions, balanced collaboration87- **TDD Mode**: Building with tests88- **Review Mode**: Quality focus89- **Mentor Mode**: Learning priority90- **Debug Mode**: Fixing issues9192### Troubleshooting9394#### Session Won't Start95- Check agent availability96- Verify configuration file syntax97- Ensure clean workspace98- Review log files99100#### Session Disconnected101- Use `--recover` to restore102- Check network connection103- Verify background processes104- Review auto-save files105106#### Poor Performance107- Reduce verification threshold108- Disable continuous testing109- Check system resources110- Use lighter AI model111112#### Configuration Issues113- Validate JSON syntax114- Check file permissions115- Review priority order (CLI > env > project > user > global)116- Run `claude-flow pair config validate`117118### Quality Metrics119120#### Truth Score Thresholds121```122Error: < 0.90 ❌123Warning: 0.90 - 0.95 ⚠️124Good: 0.95 - 0.98 ✅125Excellent: > 0.98 🌟126```127128#### Coverage Thresholds129```130Error: < 70% ❌131Warning: 70% - 80% ⚠️132Good: 80% - 90% ✅133Excellent: > 90% 🌟134```135136#### Complexity Thresholds137```138Error: > 15 ❌139Warning: 10 - 15 ⚠️140Good: 5 - 10 ✅141Excellent: < 5 🌟142```143144### Environment Variables145146Override configuration via environment:147148```bash149export CLAUDE_PAIR_MODE=driver150export CLAUDE_PAIR_VERIFY=true151export CLAUDE_PAIR_THRESHOLD=0.98152export CLAUDE_PAIR_AGENT=senior-dev153export CLAUDE_PAIR_AUTO_TEST=true154```155156### Command History157158Navigate history:159- `↑/↓` - Navigate through command history160- `Ctrl+R` - Search command history161- `!!` - Repeat last command162- `!<n>` - Run command n from history163164### Keyboard Shortcuts (Configurable)165166Default shortcuts:167```json168{169 "shortcuts": {170 "switch": "ctrl+shift+s",171 "suggest": "ctrl+space",172 "review": "ctrl+r",173 "test": "ctrl+t"174 }175}176```177178### Related Commands179180- `claude-flow pair --help` - Show help181- `claude-flow pair config` - Manage configuration182- `claude-flow pair profile` - Manage profiles183- `claude-flow pair templates` - List templates184- `claude-flow pair agents` - List available agents