{"slug":"pair-programming","title":"Pair Programming","summary":"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 scan","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-31T17:34:58.563754Z","repo":{"url":"https://github.com/spencermarx/open-code-review","stars":389,"forks":39,"license":"Apache-2.0","updatedAt":"2026-11-11T10:30:36Z"},"bodyHtml":"<hr>\n<h2>name: Pair Programming\ndescription: 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.</h2>\n<h1>Pair Programming</h1>\n<p>Collaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.</p>\n<h2>What This Skill Does</h2>\n<p>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.</p>\n<p><strong>Key Capabilities:</strong></p>\n<ul>\n<li><strong>Multiple Modes</strong>: Driver, Navigator, Switch, TDD, Review, Mentor, Debug</li>\n<li><strong>Real-Time Verification</strong>: Automatic quality scoring with rollback on failures</li>\n<li><strong>Role Management</strong>: Seamless switching between driver/navigator roles</li>\n<li><strong>Testing Integration</strong>: Auto-generate tests, track coverage, continuous testing</li>\n<li><strong>Code Review</strong>: Security scanning, performance analysis, best practice enforcement</li>\n<li><strong>Session Persistence</strong>: Auto-save, recovery, export, and sharing</li>\n</ul>\n<h2>Prerequisites</h2>\n<p><strong>Required:</strong></p>\n<ul>\n<li>Claude Flow CLI installed (<code>npm install -g claude-flow@alpha</code>)</li>\n<li>Git repository (optional but recommended)</li>\n</ul>\n<p><strong>Recommended:</strong></p>\n<ul>\n<li>Testing framework (Jest, pytest, etc.)</li>\n<li>Linter configured (ESLint, pylint, etc.)</li>\n<li>Code formatter (Prettier, Black, etc.)</li>\n</ul>\n<h2>Quick Start</h2>\n<h3>Basic Session</h3>\n<pre><code># Start simple pair programming\nclaude-flow pair --start\n</code></pre>\n<h3>TDD Session</h3>\n<pre><code># Test-driven development\nclaude-flow pair --start \\\n  --mode tdd \\\n  --test-first \\\n  --coverage 90\n</code></pre>\n<hr>\n<h2>Complete Guide</h2>\n<h3>Session Control Commands</h3>\n<h4>Starting Sessions</h4>\n<pre><code># Basic start\nclaude-flow pair --start\n\n# Expert refactoring session\nclaude-flow pair --start \\\n  --agent senior-dev \\\n  --focus refactor \\\n  --verify \\\n  --threshold 0.98\n\n# Debugging session\nclaude-flow pair --start \\\n  --agent debugger-expert \\\n  --focus debug \\\n  --review\n\n# Learning session\nclaude-flow pair --start \\\n  --mode mentor \\\n  --pace slow \\\n  --examples\n</code></pre>\n<h4>Session Management</h4>\n<pre><code># Check status\nclaude-flow pair --status\n\n# View history\nclaude-flow pair --history\n\n# Pause session\n/pause [--reason &lt;reason&gt;]\n\n# Resume session\n/resume\n\n# End session\nclaude-flow pair --end [--save] [--report]\n</code></pre>\n<h3>Available Modes</h3>\n<h4>Driver Mode</h4>\n<p>You write code while AI provides guidance.</p>\n<pre><code>claude-flow pair --start --mode driver\n</code></pre>\n<p><strong>Your Responsibilities:</strong></p>\n<ul>\n<li>Write actual code</li>\n<li>Implement solutions</li>\n<li>Make immediate decisions</li>\n<li>Handle syntax and structure</li>\n</ul>\n<p><strong>AI Navigator:</strong></p>\n<ul>\n<li>Strategic guidance</li>\n<li>Spot potential issues</li>\n<li>Suggest improvements</li>\n<li>Real-time review</li>\n<li>Track overall direction</li>\n</ul>\n<p><strong>Best For:</strong></p>\n<ul>\n<li>Learning new patterns</li>\n<li>Implementing familiar features</li>\n<li>Quick iterations</li>\n<li>Hands-on debugging</li>\n</ul>\n<p><strong>Commands:</strong></p>\n<pre><code>/suggest     - Get implementation suggestions\n/review      - Request code review\n/explain     - Ask for explanations\n/optimize    - Request optimization ideas\n/patterns    - Get pattern recommendations\n</code></pre>\n<h4>Navigator Mode</h4>\n<p>AI writes code while you provide direction.</p>\n<pre><code>claude-flow pair --start --mode navigator\n</code></pre>\n<p><strong>Your Responsibilities:</strong></p>\n<ul>\n<li>Provide high-level direction</li>\n<li>Review generated code</li>\n<li>Make architectural decisions</li>\n<li>Ensure business requirements</li>\n</ul>\n<p><strong>AI Driver:</strong></p>\n<ul>\n<li>Write implementation code</li>\n<li>Handle syntax details</li>\n<li>Implement your guidance</li>\n<li>Manage boilerplate</li>\n<li>Execute refactoring</li>\n</ul>\n<p><strong>Best For:</strong></p>\n<ul>\n<li>Rapid prototyping</li>\n<li>Boilerplate generation</li>\n<li>Learning from AI patterns</li>\n<li>Exploring solutions</li>\n</ul>\n<p><strong>Commands:</strong></p>\n<pre><code>/implement   - Direct implementation\n/refactor    - Request refactoring\n/test        - Generate tests\n/document    - Add documentation\n/alternate   - See alternative approaches\n</code></pre>\n<h4>Switch Mode</h4>\n<p>Automatically alternates roles at intervals.</p>\n<pre><code># Default 10-minute intervals\nclaude-flow pair --start --mode switch\n\n# 5-minute intervals (rapid)\nclaude-flow pair --start --mode switch --interval 5m\n\n# 15-minute intervals (deep focus)\nclaude-flow pair --start --mode switch --interval 15m\n</code></pre>\n<p><strong>Handoff Process:</strong></p>\n<ol>\n<li>30-second warning before switch</li>\n<li>Current driver completes thought</li>\n<li>Context summary generated</li>\n<li>Roles swap smoothly</li>\n<li>New driver continues</li>\n</ol>\n<p><strong>Best For:</strong></p>\n<ul>\n<li>Balanced collaboration</li>\n<li>Knowledge sharing</li>\n<li>Complex features</li>\n<li>Extended sessions</li>\n</ul>\n<h4>Specialized Modes</h4>\n<p><strong>TDD Mode</strong> - Test-Driven Development:</p>\n<pre><code>claude-flow pair --start \\\n  --mode tdd \\\n  --test-first \\\n  --coverage 100\n</code></pre>\n<p>Workflow: Write failing test → Implement → Refactor → Repeat</p>\n<p><strong>Review Mode</strong> - Continuous code review:</p>\n<pre><code>claude-flow pair --start \\\n  --mode review \\\n  --strict \\\n  --security\n</code></pre>\n<p>Features: Real-time feedback, security scanning, performance analysis</p>\n<p><strong>Mentor Mode</strong> - Learning-focused:</p>\n<pre><code>claude-flow pair --start \\\n  --mode mentor \\\n  --explain-all \\\n  --pace slow\n</code></pre>\n<p>Features: Detailed explanations, step-by-step guidance, pattern teaching</p>\n<p><strong>Debug Mode</strong> - Problem-solving:</p>\n<pre><code>claude-flow pair --start \\\n  --mode debug \\\n  --verbose \\\n  --trace\n</code></pre>\n<p>Features: Issue identification, root cause analysis, fix suggestions</p>\n<h3>In-Session Commands</h3>\n<h4>Code Commands</h4>\n<pre><code>/explain [--level basic|detailed|expert]\n  Explain the current code or selection\n\n/suggest [--type refactor|optimize|security|style]\n  Get improvement suggestions\n\n/implement &lt;description&gt;\n  Request implementation (navigator mode)\n\n/refactor [--pattern &lt;pattern&gt;] [--scope function|file|module]\n  Refactor selected code\n\n/optimize [--target speed|memory|both]\n  Optimize code for performance\n\n/document [--format jsdoc|markdown|inline]\n  Add documentation to code\n\n/comment [--verbose]\n  Add inline comments\n\n/pattern &lt;pattern-name&gt; [--example]\n  Apply a design pattern\n</code></pre>\n<h4>Testing Commands</h4>\n<pre><code>/test [--watch] [--coverage] [--only &lt;pattern&gt;]\n  Run test suite\n\n/test-gen [--type unit|integration|e2e]\n  Generate tests for current code\n\n/coverage [--report html|json|terminal]\n  Check test coverage\n\n/mock &lt;target&gt; [--realistic]\n  Generate mock data or functions\n\n/test-watch [--on-save]\n  Enable test watching\n\n/snapshot [--update]\n  Create test snapshots\n</code></pre>\n<h4>Review Commands</h4>\n<pre><code>/review [--scope current|file|changes] [--strict]\n  Perform code review\n\n/security [--deep] [--fix]\n  Security analysis\n\n/perf [--profile] [--suggestions]\n  Performance analysis\n\n/quality [--detailed]\n  Check code quality metrics\n\n/lint [--fix] [--config &lt;config&gt;]\n  Run linters\n\n/complexity [--threshold &lt;value&gt;]\n  Analyze code complexity\n</code></pre>\n<h4>Navigation Commands</h4>\n<pre><code>/goto &lt;file&gt;[:line[:column]]\n  Navigate to file or location\n\n/find &lt;pattern&gt; [--regex] [--case-sensitive]\n  Search in project\n\n/recent [--limit &lt;n&gt;]\n  Show recent files\n\n/bookmark [add|list|goto|remove] [&lt;name&gt;]\n  Manage bookmarks\n\n/history [--limit &lt;n&gt;] [--filter &lt;pattern&gt;]\n  Show command history\n\n/tree [--depth &lt;n&gt;] [--filter &lt;pattern&gt;]\n  Show project structure\n</code></pre>\n<h4>Git Commands</h4>\n<pre><code>/diff [--staged] [--file &lt;file&gt;]\n  Show git diff\n\n/commit [--message &lt;msg&gt;] [--amend]\n  Commit with verification\n\n/branch [create|switch|delete|list] [&lt;name&gt;]\n  Branch operations\n\n/stash [save|pop|list|apply] [&lt;message&gt;]\n  Stash operations\n\n/log [--oneline] [--limit &lt;n&gt;]\n  View git log\n\n/blame [&lt;file&gt;]\n  Show git blame\n</code></pre>\n<h4>AI Partner Commands</h4>\n<pre><code>/agent [switch|info|config] [&lt;agent-name&gt;]\n  Manage AI agent\n\n/teach &lt;preference&gt;\n  Teach the AI your preferences\n\n/feedback [positive|negative] &lt;message&gt;\n  Provide feedback to AI\n\n/personality [professional|friendly|concise|verbose]\n  Adjust AI personality\n\n/expertise [add|remove|list] [&lt;domain&gt;]\n  Set AI expertise focus\n</code></pre>\n<h4>Metrics Commands</h4>\n<pre><code>/metrics [--period today|session|week|all]\n  Show session metrics\n\n/score [--breakdown]\n  Show quality scores\n\n/productivity [--chart]\n  Show productivity metrics\n\n/leaderboard [--personal|team]\n  Show improvement leaderboard\n</code></pre>\n<h4>Role &amp; Mode Commands</h4>\n<pre><code>/switch [--immediate]\n  Switch driver/navigator roles\n\n/mode &lt;type&gt;\n  Change mode (driver|navigator|switch|tdd|review|mentor|debug)\n\n/role\n  Show current role\n\n/handoff\n  Prepare role handoff\n</code></pre>\n<h3>Command Shortcuts</h3>\n<table>\n<thead>\n<tr>\n<th>Alias</th>\n<th>Full Command</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>/s</code></td>\n<td><code>/suggest</code></td>\n</tr>\n<tr>\n<td><code>/e</code></td>\n<td><code>/explain</code></td>\n</tr>\n<tr>\n<td><code>/t</code></td>\n<td><code>/test</code></td>\n</tr>\n<tr>\n<td><code>/r</code></td>\n<td><code>/review</code></td>\n</tr>\n<tr>\n<td><code>/c</code></td>\n<td><code>/commit</code></td>\n</tr>\n<tr>\n<td><code>/g</code></td>\n<td><code>/goto</code></td>\n</tr>\n<tr>\n<td><code>/f</code></td>\n<td><code>/find</code></td>\n</tr>\n<tr>\n<td><code>/h</code></td>\n<td><code>/help</code></td>\n</tr>\n<tr>\n<td><code>/sw</code></td>\n<td><code>/switch</code></td>\n</tr>\n<tr>\n<td><code>/st</code></td>\n<td><code>/status</code></td>\n</tr>\n</tbody>\n</table>\n<h3>Configuration</h3>\n<h4>Basic Configuration</h4>\n<p>Create <code>.claude-flow/pair-config.json</code>:</p>\n<pre><code>{\n  \"pair\": {\n    \"enabled\": true,\n    \"defaultMode\": \"switch\",\n    \"defaultAgent\": \"auto\",\n    \"autoStart\": false,\n    \"theme\": \"professional\"\n  }\n}\n</code></pre>\n<h4>Complete Configuration</h4>\n<pre><code>{\n  \"pair\": {\n    \"general\": {\n      \"enabled\": true,\n      \"defaultMode\": \"switch\",\n      \"defaultAgent\": \"senior-dev\",\n      \"language\": \"javascript\",\n      \"timezone\": \"UTC\"\n    },\n\n    \"modes\": {\n      \"driver\": {\n        \"enabled\": true,\n        \"suggestions\": true,\n        \"realTimeReview\": true,\n        \"autoComplete\": false\n      },\n      \"navigator\": {\n        \"enabled\": true,\n        \"codeGeneration\": true,\n        \"explanations\": true,\n        \"alternatives\": true\n      },\n      \"switch\": {\n        \"enabled\": true,\n        \"interval\": \"10m\",\n        \"warning\": \"30s\",\n        \"autoSwitch\": true,\n        \"pauseOnIdle\": true\n      }\n    },\n\n    \"verification\": {\n      \"enabled\": true,\n      \"threshold\": 0.95,\n      \"autoRollback\": true,\n      \"preCommitCheck\": true,\n      \"continuousMonitoring\": true,\n      \"blockOnFailure\": true\n    },\n\n    \"testing\": {\n      \"enabled\": true,\n      \"autoRun\": true,\n      \"framework\": \"jest\",\n      \"onSave\": true,\n      \"coverage\": {\n        \"enabled\": true,\n        \"minimum\": 80,\n        \"enforce\": true,\n        \"reportFormat\": \"html\"\n      }\n    },\n\n    \"review\": {\n      \"enabled\": true,\n      \"continuous\": true,\n      \"preCommit\": true,\n      \"security\": true,\n      \"performance\": true,\n      \"style\": true,\n      \"complexity\": {\n        \"maxComplexity\": 10,\n        \"maxDepth\": 4,\n        \"maxLines\": 100\n      }\n    },\n\n    \"git\": {\n      \"enabled\": true,\n      \"autoCommit\": false,\n      \"commitTemplate\": \"feat: {message}\",\n      \"signCommits\": false,\n      \"pushOnEnd\": false,\n      \"branchProtection\": true\n    },\n\n    \"session\": {\n      \"autoSave\": true,\n      \"saveInterval\": \"5m\",\n      \"maxDuration\": \"4h\",\n      \"idleTimeout\": \"15m\",\n      \"breakReminder\": \"45m\",\n      \"metricsInterval\": \"1m\"\n    },\n\n    \"ai\": {\n      \"model\": \"advanced\",\n      \"temperature\": 0.7,\n      \"maxTokens\": 4000,\n      \"personality\": \"professional\",\n      \"expertise\": [\"backend\", \"testing\", \"security\"],\n      \"learningEnabled\": true\n    }\n  }\n}\n</code></pre>\n<h4>Built-in Agents</h4>\n<pre><code>{\n  \"agents\": {\n    \"senior-dev\": {\n      \"expertise\": [\"architecture\", \"patterns\", \"optimization\"],\n      \"style\": \"thorough\",\n      \"reviewLevel\": \"strict\"\n    },\n    \"tdd-specialist\": {\n      \"expertise\": [\"testing\", \"mocks\", \"coverage\"],\n      \"style\": \"test-first\",\n      \"reviewLevel\": \"comprehensive\"\n    },\n    \"debugger-expert\": {\n      \"expertise\": [\"debugging\", \"profiling\", \"tracing\"],\n      \"style\": \"analytical\",\n      \"reviewLevel\": \"focused\"\n    },\n    \"junior-dev\": {\n      \"expertise\": [\"learning\", \"basics\", \"documentation\"],\n      \"style\": \"questioning\",\n      \"reviewLevel\": \"educational\"\n    }\n  }\n}\n</code></pre>\n<h4>CLI Configuration</h4>\n<pre><code># Set configuration\nclaude-flow pair config set defaultMode switch\nclaude-flow pair config set verification.threshold 0.98\n\n# Get configuration\nclaude-flow pair config get\nclaude-flow pair config get defaultMode\n\n# Export/Import\nclaude-flow pair config export &gt; config.json\nclaude-flow pair config import config.json\n\n# Reset\nclaude-flow pair config reset\n</code></pre>\n<h4>Profile Management</h4>\n<p>Create reusable profiles:</p>\n<pre><code># Create profile\nclaude-flow pair profile create refactoring \\\n  --mode driver \\\n  --verify true \\\n  --threshold 0.98 \\\n  --focus refactor\n\n# Use profile\nclaude-flow pair --start --profile refactoring\n\n# List profiles\nclaude-flow pair profile list\n</code></pre>\n<p>Profile configuration:</p>\n<pre><code>{\n  \"profiles\": {\n    \"refactoring\": {\n      \"mode\": \"driver\",\n      \"verification\": {\n        \"enabled\": true,\n        \"threshold\": 0.98\n      },\n      \"focus\": \"refactor\"\n    },\n    \"debugging\": {\n      \"mode\": \"navigator\",\n      \"agent\": \"debugger-expert\",\n      \"trace\": true,\n      \"verbose\": true\n    },\n    \"learning\": {\n      \"mode\": \"mentor\",\n      \"pace\": \"slow\",\n      \"explanations\": \"detailed\",\n      \"examples\": true\n    }\n  }\n}\n</code></pre>\n<h3>Real-World Examples</h3>\n<h4>Example 1: Feature Implementation</h4>\n<p>Implementing user authentication with JWT tokens:</p>\n<pre><code># Session setup\nclaude-flow pair --start \\\n  --mode switch \\\n  --agent senior-dev \\\n  --focus implement \\\n  --verify \\\n  --test\n</code></pre>\n<p><strong>Session Flow:</strong></p>\n<pre><code>\uD83D\uDC65 Starting pair programming for authentication feature...\n\n[DRIVER: You - 10 minutes]\n/explain JWT authentication flow\n&gt; AI explains JWT concepts and best practices\n\n/suggest implementation approach\n&gt; AI suggests using middleware pattern with refresh tokens\n\n# You write the basic auth middleware structure\n\n[SWITCH TO NAVIGATOR]\n\n[NAVIGATOR: AI - 10 minutes]\n/implement JWT token generation with refresh tokens\n&gt; AI generates secure token implementation\n\n/test-gen\n&gt; AI creates comprehensive test suite\n\n[SWITCH TO DRIVER]\n\n[DRIVER: You - 10 minutes]\n# You refine the implementation\n/review --security\n&gt; AI performs security review, suggests improvements\n\n/commit --message \"feat: JWT authentication with refresh tokens\"\n✅ Truth Score: 0.98 - Committed successfully\n</code></pre>\n<h4>Example 2: Bug Fixing</h4>\n<p>Debugging a memory leak in Node.js:</p>\n<pre><code># Session setup\nclaude-flow pair --start \\\n  --mode navigator \\\n  --agent debugger-expert \\\n  --focus debug \\\n  --trace\n</code></pre>\n<p><strong>Session Flow:</strong></p>\n<pre><code>\uD83D\uDC65 Starting debugging session...\n\n/status\n&gt; Analyzing application for memory issues...\n\n/perf --profile\n&gt; Memory usage growing: 150MB → 450MB over 10 minutes\n\n/find \"new EventEmitter\" --regex\n&gt; Found 3 instances of EventEmitter creation\n\n/inspect eventEmitters --deep\n&gt; Discovering listeners not being removed\n\n/suggest fix for memory leak\n&gt; AI suggests: \"Add removeListener in cleanup functions\"\n\n/implement cleanup functions for all event emitters\n&gt; AI generates proper cleanup code\n\n/test\n&gt; Memory stable at 150MB ✅\n\n/commit --message \"fix: memory leak in event emitters\"\n</code></pre>\n<h4>Example 3: TDD Session</h4>\n<p>Building shopping cart with test-driven development:</p>\n<pre><code># Session setup\nclaude-flow pair --start \\\n  --mode tdd \\\n  --agent tdd-specialist \\\n  --test-first\n</code></pre>\n<p><strong>Session Flow:</strong></p>\n<pre><code>\uD83D\uDC65 TDD Session: Shopping Cart Feature\n\n[RED PHASE]\n/test-gen \"add item to cart\"\n&gt; AI writes failing test:\n  ✗ should add item to cart\n  ✗ should update quantity for existing item\n  ✗ should calculate total price\n\n[GREEN PHASE]\n/implement minimal cart functionality\n&gt; You write just enough code to pass tests\n\n/test\n&gt; Tests passing: 3/3 ✅\n\n[REFACTOR PHASE]\n/refactor --pattern repository\n&gt; AI refactors to repository pattern\n\n/test\n&gt; Tests still passing: 3/3 ✅\n\n[NEXT CYCLE]\n/test-gen \"remove item from cart\"\n&gt; AI writes new failing tests...\n</code></pre>\n<h4>Example 4: Code Refactoring</h4>\n<p>Modernizing legacy code:</p>\n<pre><code># Session setup\nclaude-flow pair --start \\\n  --mode driver \\\n  --focus refactor \\\n  --verify \\\n  --threshold 0.98\n</code></pre>\n<p><strong>Session Flow:</strong></p>\n<pre><code>\uD83D\uDC65 Refactoring Session: Modernizing UserService\n\n/analyze UserService.js\n&gt; AI identifies:\n  - Callback hell (5 levels deep)\n  - No error handling\n  - Tight coupling\n  - No tests\n\n/suggest refactoring plan\n&gt; AI suggests:\n  1. Convert callbacks to async/await\n  2. Add error boundaries\n  3. Extract dependencies\n  4. Add unit tests\n\n/test-gen --before-refactor\n&gt; AI generates tests for current behavior\n\n/refactor callbacks to async/await\n# You refactor with AI guidance\n\n/test\n&gt; All tests passing ✅\n\n/review --compare\n&gt; AI shows before/after comparison\n&gt; Code complexity: 35 → 12\n&gt; Truth score: 0.99 ✅\n\n/commit --message \"refactor: modernize UserService with async/await\"\n</code></pre>\n<h4>Example 5: Performance Optimization</h4>\n<p>Optimizing slow React application:</p>\n<pre><code># Session setup\nclaude-flow pair --start \\\n  --mode switch \\\n  --agent performance-expert \\\n  --focus optimize \\\n  --profile\n</code></pre>\n<p><strong>Session Flow:</strong></p>\n<pre><code>\uD83D\uDC65 Performance Optimization Session\n\n/perf --profile\n&gt; React DevTools Profiler Results:\n  - ProductList: 450ms render\n  - CartSummary: 200ms render\n  - Unnecessary re-renders: 15\n\n/suggest optimizations for ProductList\n&gt; AI suggests:\n  1. Add React.memo\n  2. Use useMemo for expensive calculations\n  3. Implement virtualization for long lists\n\n/implement React.memo and useMemo\n# You implement with AI guidance\n\n/perf --profile\n&gt; ProductList: 45ms render (90% improvement!) ✅\n\n/implement virtualization with react-window\n&gt; AI implements virtual scrolling\n\n/perf --profile\n&gt; ProductList: 12ms render (97% improvement!) ✅\n&gt; FPS: 60 stable ✅\n\n/commit --message \"perf: optimize ProductList with memoization and virtualization\"\n</code></pre>\n<h4>Example 6: API Development</h4>\n<p>Building RESTful API with Express:</p>\n<pre><code># Session setup\nclaude-flow pair --start \\\n  --mode navigator \\\n  --agent backend-expert \\\n  --focus implement \\\n  --test\n</code></pre>\n<p><strong>Session Flow:</strong></p>\n<pre><code>\uD83D\uDC65 API Development Session\n\n/design REST API for blog platform\n&gt; AI designs endpoints:\n  POST   /api/posts\n  GET    /api/posts\n  GET    /api/posts/:id\n  PUT    /api/posts/:id\n  DELETE /api/posts/:id\n\n/implement CRUD endpoints with validation\n&gt; AI implements with Express + Joi validation\n\n/test-gen --integration\n&gt; AI generates integration tests\n\n/security --api\n&gt; AI adds:\n  - Rate limiting\n  - Input sanitization\n  - JWT authentication\n  - CORS configuration\n\n/document --openapi\n&gt; AI generates OpenAPI documentation\n\n/test --integration\n&gt; All endpoints tested: 15/15 ✅\n</code></pre>\n<h3>Session Templates</h3>\n<h4>Quick Start Templates</h4>\n<pre><code># Refactoring template\nclaude-flow pair --template refactor\n# Focus: Code improvement\n# Verification: High (0.98)\n# Testing: After each change\n# Review: Continuous\n\n# Feature template\nclaude-flow pair --template feature\n# Focus: Implementation\n# Verification: Standard (0.95)\n# Testing: On completion\n# Review: Pre-commit\n\n# Debug template\nclaude-flow pair --template debug\n# Focus: Problem solving\n# Verification: Moderate (0.90)\n# Testing: Regression tests\n# Review: Root cause\n\n# Learning template\nclaude-flow pair --template learn\n# Mode: Mentor\n# Pace: Slow\n# Explanations: Detailed\n# Examples: Many\n</code></pre>\n<h3>Session Management</h3>\n<h4>Session Status</h4>\n<pre><code>claude-flow pair --status\n</code></pre>\n<p><strong>Output:</strong></p>\n<pre><code>\uD83D\uDC65 Pair Programming Session\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nSession ID: pair_1755021234567\nDuration: 45 minutes\nStatus: Active\n\nPartner: senior-dev\nCurrent Role: DRIVER (you)\nMode: Switch (10m intervals)\nNext Switch: in 3 minutes\n\n\uD83D\uDCCA Metrics:\n├── Truth Score: 0.982 ✅\n├── Lines Changed: 234\n├── Files Modified: 5\n├── Tests Added: 12\n├── Coverage: 87% ↑3%\n└── Commits: 3\n\n\uD83C\uDFAF Focus: Implementation\n\uD83D\uDCDD Current File: src/auth/login.js\n</code></pre>\n<h4>Session History</h4>\n<pre><code>claude-flow pair --history\n</code></pre>\n<p><strong>Output:</strong></p>\n<pre><code>\uD83D\uDCDA Session History\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n1. 2024-01-15 14:30 - 16:45 (2h 15m)\n   Partner: expert-coder\n   Focus: Refactoring\n   Truth Score: 0.975\n   Changes: +340 -125 lines\n\n2. 2024-01-14 10:00 - 11:30 (1h 30m)\n   Partner: tdd-specialist\n   Focus: Testing\n   Truth Score: 0.991\n   Tests Added: 24\n\n3. 2024-01-13 15:00 - 17:00 (2h)\n   Partner: debugger-expert\n   Focus: Bug Fixing\n   Truth Score: 0.968\n   Issues Fixed: 5\n</code></pre>\n<h4>Session Persistence</h4>\n<pre><code># Save session\nclaude-flow pair --save [--name &lt;name&gt;]\n\n# Load session\nclaude-flow pair --load &lt;session-id&gt;\n\n# Export session\nclaude-flow pair --export &lt;session-id&gt; [--format json|md]\n\n# Generate report\nclaude-flow pair --report &lt;session-id&gt;\n</code></pre>\n<h4>Background Sessions</h4>\n<pre><code># Start in background\nclaude-flow pair --start --background\n\n# Monitor background session\nclaude-flow pair --monitor\n\n# Attach to background session\nclaude-flow pair --attach &lt;session-id&gt;\n\n# End background session\nclaude-flow pair --end &lt;session-id&gt;\n</code></pre>\n<h3>Advanced Features</h3>\n<h4>Custom Commands</h4>\n<p>Define in configuration:</p>\n<pre><code>{\n  \"customCommands\": {\n    \"tdd\": \"/test-gen &amp;&amp; /test --watch\",\n    \"full-review\": \"/lint --fix &amp;&amp; /test &amp;&amp; /review --strict\",\n    \"quick-fix\": \"/suggest --type fix &amp;&amp; /implement &amp;&amp; /test\"\n  }\n}\n</code></pre>\n<p>Use custom commands:</p>\n<pre><code>/custom tdd\n/custom full-review\n</code></pre>\n<h4>Command Chaining</h4>\n<pre><code>/test &amp;&amp; /commit &amp;&amp; /push\n/lint --fix &amp;&amp; /test &amp;&amp; /review --strict\n</code></pre>\n<h4>Session Recording</h4>\n<pre><code># Start with recording\nclaude-flow pair --start --record\n\n# Replay session\nclaude-flow pair --replay &lt;session-id&gt;\n\n# Session analytics\nclaude-flow pair --analytics &lt;session-id&gt;\n</code></pre>\n<h4>Integration Options</h4>\n<p><strong>With Git:</strong></p>\n<pre><code>claude-flow pair --start --git --auto-commit\n</code></pre>\n<p><strong>With CI/CD:</strong></p>\n<pre><code>claude-flow pair --start --ci --non-interactive\n</code></pre>\n<p><strong>With IDE:</strong></p>\n<pre><code>claude-flow pair --start --ide vscode\n</code></pre>\n<h3>Best Practices</h3>\n<h4>Session Practices</h4>\n<ol>\n<li><strong>Clear Goals</strong> - Define session objectives upfront</li>\n<li><strong>Appropriate Mode</strong> - Choose based on task type</li>\n<li><strong>Enable Verification</strong> - For critical code paths</li>\n<li><strong>Regular Testing</strong> - Maintain quality continuously</li>\n<li><strong>Session Notes</strong> - Document important decisions</li>\n<li><strong>Regular Breaks</strong> - Take breaks every 45-60 minutes</li>\n</ol>\n<h4>Code Practices</h4>\n<ol>\n<li><strong>Test Early</strong> - Run tests after each change</li>\n<li><strong>Verify Before Commit</strong> - Check truth scores</li>\n<li><strong>Review Security</strong> - Always for sensitive code</li>\n<li><strong>Profile Performance</strong> - Use <code>/perf</code> for optimization</li>\n<li><strong>Save Sessions</strong> - For complex work</li>\n<li><strong>Learn from AI</strong> - Ask questions frequently</li>\n</ol>\n<h4>Mode Selection</h4>\n<ul>\n<li><strong>Driver Mode</strong>: When learning, controlling implementation</li>\n<li><strong>Navigator Mode</strong>: For rapid prototyping, generation</li>\n<li><strong>Switch Mode</strong>: Long sessions, balanced collaboration</li>\n<li><strong>TDD Mode</strong>: Building with tests</li>\n<li><strong>Review Mode</strong>: Quality focus</li>\n<li><strong>Mentor Mode</strong>: Learning priority</li>\n<li><strong>Debug Mode</strong>: Fixing issues</li>\n</ul>\n<h3>Troubleshooting</h3>\n<h4>Session Won't Start</h4>\n<ul>\n<li>Check agent availability</li>\n<li>Verify configuration file syntax</li>\n<li>Ensure clean workspace</li>\n<li>Review log files</li>\n</ul>\n<h4>Session Disconnected</h4>\n<ul>\n<li>Use <code>--recover</code> to restore</li>\n<li>Check network connection</li>\n<li>Verify background processes</li>\n<li>Review auto-save files</li>\n</ul>\n<h4>Poor Performance</h4>\n<ul>\n<li>Reduce verification threshold</li>\n<li>Disable continuous testing</li>\n<li>Check system resources</li>\n<li>Use lighter AI model</li>\n</ul>\n<h4>Configuration Issues</h4>\n<ul>\n<li>Validate JSON syntax</li>\n<li>Check file permissions</li>\n<li>Review priority order (CLI &gt; env &gt; project &gt; user &gt; global)</li>\n<li>Run <code>claude-flow pair config validate</code></li>\n</ul>\n<h3>Quality Metrics</h3>\n<h4>Truth Score Thresholds</h4>\n<pre><code>Error:   &lt; 0.90 ❌\nWarning: 0.90 - 0.95 ⚠️\nGood:    0.95 - 0.98 ✅\nExcellent: &gt; 0.98 \uD83C\uDF1F\n</code></pre>\n<h4>Coverage Thresholds</h4>\n<pre><code>Error:   &lt; 70% ❌\nWarning: 70% - 80% ⚠️\nGood:    80% - 90% ✅\nExcellent: &gt; 90% \uD83C\uDF1F\n</code></pre>\n<h4>Complexity Thresholds</h4>\n<pre><code>Error:   &gt; 15 ❌\nWarning: 10 - 15 ⚠️\nGood:    5 - 10 ✅\nExcellent: &lt; 5 \uD83C\uDF1F\n</code></pre>\n<h3>Environment Variables</h3>\n<p>Override configuration via environment:</p>\n<pre><code>export CLAUDE_PAIR_MODE=driver\nexport CLAUDE_PAIR_VERIFY=true\nexport CLAUDE_PAIR_THRESHOLD=0.98\nexport CLAUDE_PAIR_AGENT=senior-dev\nexport CLAUDE_PAIR_AUTO_TEST=true\n</code></pre>\n<h3>Command History</h3>\n<p>Navigate history:</p>\n<ul>\n<li><code>↑/↓</code> - Navigate through command history</li>\n<li><code>Ctrl+R</code> - Search command history</li>\n<li><code>!!</code> - Repeat last command</li>\n<li><code>!&lt;n&gt;</code> - Run command n from history</li>\n</ul>\n<h3>Keyboard Shortcuts (Configurable)</h3>\n<p>Default shortcuts:</p>\n<pre><code>{\n  \"shortcuts\": {\n    \"switch\": \"ctrl+shift+s\",\n    \"suggest\": \"ctrl+space\",\n    \"review\": \"ctrl+r\",\n    \"test\": \"ctrl+t\"\n  }\n}\n</code></pre>\n<h3>Related Commands</h3>\n<ul>\n<li><code>claude-flow pair --help</code> - Show help</li>\n<li><code>claude-flow pair config</code> - Manage configuration</li>\n<li><code>claude-flow pair profile</code> - Manage profiles</li>\n<li><code>claude-flow pair templates</code> - List templates</li>\n<li><code>claude-flow pair agents</code> - List available agents</li>\n</ul>\n","files":[{"path":"SKILL.md","sizeBytes":24466,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-31T17:35:27.418992Z","sha256":"E6EF039E2FA74142B65D41BADA3430195F11AD4B02810D709923F4C8C49C1591","sizeBytes":8370},"review":null,"source":{"repositoryUrl":"https://github.com/spencermarx/open-code-review","path":".claude/skills/pair-programming","license":"Apache-2.0","commit":"373a6c340312c86a6b42ded368f86f12570c34c5","subtreeSha":"E0CB3094BFB60007126419780F57518A2636068E9456BD75A07CF157B3EAC8CE","lastSyncedAt":"2026-11-19T20:53:19.287432Z"},"reviewedAt":"2026-10-31T17:36:13.731251Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/spencermarx/open-code-review/tree/main/.claude/skills/pair-programming"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install spencermarx-open-code-review@llmmart"},{"target":"git","command":"git clone https://github.com/spencermarx/open-code-review.git"}]}