[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESM9ZFN126DQ3DWD15TSRR":3,"skill-same:01M6ESM9ZFN126DQ3DWD15TSRR":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":6,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6ESM9ZFN126DQ3DWD15TSRR","pair-programming",null,"AI-assisted pair programming with multiple modes (driver\u002Fnavigator\u002Fswitch), 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.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fpair-programming\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"pair","programming","Pair Programming","Optimization","switching","time","switch","scanning","refactoring","real-time","code review","navigator","monitoring","verification","code","debugging","performance","security","review","testing","2026-11-10 10:12:30",false,"---\nname: pair-programming\ndescription: AI-assisted pair programming with multiple modes (driver\u002Fnavigator\u002Fswitch), 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.\n---\n\n# Pair Programming\n\nCollaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.\n\n## What This Skill Does\n\nThis skill provides professional pair programming capabilities with AI assistance, supporting multiple collaboration modes, continuous verification, and integrated testing. It manages driver\u002Fnavigator roles, performs real-time code review, tracks quality metrics, and ensures high standards through truth-score verification.\n\n**Key Capabilities:**\n- **Multiple Modes**: Driver, Navigator, Switch, TDD, Review, Mentor, Debug\n- **Real-Time Verification**: Automatic quality scoring with rollback on failures\n- **Role Management**: Seamless switching between driver\u002Fnavigator roles\n- **Testing Integration**: Auto-generate tests, track coverage, continuous testing\n- **Code Review**: Security scanning, performance analysis, best practice enforcement\n- **Session Persistence**: Auto-save, recovery, export, and sharing\n\n## Prerequisites\n\n**Required:**\n- Claude Flow CLI installed (`npm install -g claude-flow@alpha`)\n- Git repository (optional but recommended)\n\n**Recommended:**\n- Testing framework (Jest, pytest, etc.)\n- Linter configured (ESLint, pylint, etc.)\n- Code formatter (Prettier, Black, etc.)\n\n## Quick Start\n\n### Basic Session\n```bash\n# Start simple pair programming\nclaude-flow pair --start\n```\n\n### TDD Session\n```bash\n# Test-driven development\nclaude-flow pair --start \\\n  --mode tdd \\\n  --test-first \\\n  --coverage 90\n```\n\n---\n\n## Complete Guide\n\n### Session Control Commands\n\n#### Starting Sessions\n```bash\n# 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```\n\n#### Session Management\n```bash\n# Check status\nclaude-flow pair --status\n\n# View history\nclaude-flow pair --history\n\n# Pause session\n\u002Fpause [--reason \u003Creason>]\n\n# Resume session\n\u002Fresume\n\n# End session\nclaude-flow pair --end [--save] [--report]\n```\n\n### Available Modes\n\n#### Driver Mode\nYou write code while AI provides guidance.\n\n```bash\nclaude-flow pair --start --mode driver\n```\n\n**Your Responsibilities:**\n- Write actual code\n- Implement solutions\n- Make immediate decisions\n- Handle syntax and structure\n\n**AI Navigator:**\n- Strategic guidance\n- Spot potential issues\n- Suggest improvements\n- Real-time review\n- Track overall direction\n\n**Best For:**\n- Learning new patterns\n- Implementing familiar features\n- Quick iterations\n- Hands-on debugging\n\n**Commands:**\n```\n\u002Fsuggest     - Get implementation suggestions\n\u002Freview      - Request code review\n\u002Fexplain     - Ask for explanations\n\u002Foptimize    - Request optimization ideas\n\u002Fpatterns    - Get pattern recommendations\n```\n\n#### Navigator Mode\nAI writes code while you provide direction.\n\n```bash\nclaude-flow pair --start --mode navigator\n```\n\n**Your Responsibilities:**\n- Provide high-level direction\n- Review generated code\n- Make architectural decisions\n- Ensure business requirements\n\n**AI Driver:**\n- Write implementation code\n- Handle syntax details\n- Implement your guidance\n- Manage boilerplate\n- Execute refactoring\n\n**Best For:**\n- Rapid prototyping\n- Boilerplate generation\n- Learning from AI patterns\n- Exploring solutions\n\n**Commands:**\n```\n\u002Fimplement   - Direct implementation\n\u002Frefactor    - Request refactoring\n\u002Ftest        - Generate tests\n\u002Fdocument    - Add documentation\n\u002Falternate   - See alternative approaches\n```\n\n#### Switch Mode\nAutomatically alternates roles at intervals.\n\n```bash\n# 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```\n\n**Handoff Process:**\n1. 30-second warning before switch\n2. Current driver completes thought\n3. Context summary generated\n4. Roles swap smoothly\n5. New driver continues\n\n**Best For:**\n- Balanced collaboration\n- Knowledge sharing\n- Complex features\n- Extended sessions\n\n#### Specialized Modes\n\n**TDD Mode** - Test-Driven Development:\n```bash\nclaude-flow pair --start \\\n  --mode tdd \\\n  --test-first \\\n  --coverage 100\n```\nWorkflow: Write failing test → Implement → Refactor → Repeat\n\n**Review Mode** - Continuous code review:\n```bash\nclaude-flow pair --start \\\n  --mode review \\\n  --strict \\\n  --security\n```\nFeatures: Real-time feedback, security scanning, performance analysis\n\n**Mentor Mode** - Learning-focused:\n```bash\nclaude-flow pair --start \\\n  --mode mentor \\\n  --explain-all \\\n  --pace slow\n```\nFeatures: Detailed explanations, step-by-step guidance, pattern teaching\n\n**Debug Mode** - Problem-solving:\n```bash\nclaude-flow pair --start \\\n  --mode debug \\\n  --verbose \\\n  --trace\n```\nFeatures: Issue identification, root cause analysis, fix suggestions\n\n### In-Session Commands\n\n#### Code Commands\n```\n\u002Fexplain [--level basic|detailed|expert]\n  Explain the current code or selection\n\n\u002Fsuggest [--type refactor|optimize|security|style]\n  Get improvement suggestions\n\n\u002Fimplement \u003Cdescription>\n  Request implementation (navigator mode)\n\n\u002Frefactor [--pattern \u003Cpattern>] [--scope function|file|module]\n  Refactor selected code\n\n\u002Foptimize [--target speed|memory|both]\n  Optimize code for performance\n\n\u002Fdocument [--format jsdoc|markdown|inline]\n  Add documentation to code\n\n\u002Fcomment [--verbose]\n  Add inline comments\n\n\u002Fpattern \u003Cpattern-name> [--example]\n  Apply a design pattern\n```\n\n#### Testing Commands\n```\n\u002Ftest [--watch] [--coverage] [--only \u003Cpattern>]\n  Run test suite\n\n\u002Ftest-gen [--type unit|integration|e2e]\n  Generate tests for current code\n\n\u002Fcoverage [--report html|json|terminal]\n  Check test coverage\n\n\u002Fmock \u003Ctarget> [--realistic]\n  Generate mock data or functions\n\n\u002Ftest-watch [--on-save]\n  Enable test watching\n\n\u002Fsnapshot [--update]\n  Create test snapshots\n```\n\n#### Review Commands\n```\n\u002Freview [--scope current|file|changes] [--strict]\n  Perform code review\n\n\u002Fsecurity [--deep] [--fix]\n  Security analysis\n\n\u002Fperf [--profile] [--suggestions]\n  Performance analysis\n\n\u002Fquality [--detailed]\n  Check code quality metrics\n\n\u002Flint [--fix] [--config \u003Cconfig>]\n  Run linters\n\n\u002Fcomplexity [--threshold \u003Cvalue>]\n  Analyze code complexity\n```\n\n#### Navigation Commands\n```\n\u002Fgoto \u003Cfile>[:line[:column]]\n  Navigate to file or location\n\n\u002Ffind \u003Cpattern> [--regex] [--case-sensitive]\n  Search in project\n\n\u002Frecent [--limit \u003Cn>]\n  Show recent files\n\n\u002Fbookmark [add|list|goto|remove] [\u003Cname>]\n  Manage bookmarks\n\n\u002Fhistory [--limit \u003Cn>] [--filter \u003Cpattern>]\n  Show command history\n\n\u002Ftree [--depth \u003Cn>] [--filter \u003Cpattern>]\n  Show project structure\n```\n\n#### Git Commands\n```\n\u002Fdiff [--staged] [--file \u003Cfile>]\n  Show git diff\n\n\u002Fcommit [--message \u003Cmsg>] [--amend]\n  Commit with verification\n\n\u002Fbranch [create|switch|delete|list] [\u003Cname>]\n  Branch operations\n\n\u002Fstash [save|pop|list|apply] [\u003Cmessage>]\n  Stash operations\n\n\u002Flog [--oneline] [--limit \u003Cn>]\n  View git log\n\n\u002Fblame [\u003Cfile>]\n  Show git blame\n```\n\n#### AI Partner Commands\n```\n\u002Fagent [switch|info|config] [\u003Cagent-name>]\n  Manage AI agent\n\n\u002Fteach \u003Cpreference>\n  Teach the AI your preferences\n\n\u002Ffeedback [positive|negative] \u003Cmessage>\n  Provide feedback to AI\n\n\u002Fpersonality [professional|friendly|concise|verbose]\n  Adjust AI personality\n\n\u002Fexpertise [add|remove|list] [\u003Cdomain>]\n  Set AI expertise focus\n```\n\n#### Metrics Commands\n```\n\u002Fmetrics [--period today|session|week|all]\n  Show session metrics\n\n\u002Fscore [--breakdown]\n  Show quality scores\n\n\u002Fproductivity [--chart]\n  Show productivity metrics\n\n\u002Fleaderboard [--personal|team]\n  Show improvement leaderboard\n```\n\n#### Role & Mode Commands\n```\n\u002Fswitch [--immediate]\n  Switch driver\u002Fnavigator roles\n\n\u002Fmode \u003Ctype>\n  Change mode (driver|navigator|switch|tdd|review|mentor|debug)\n\n\u002Frole\n  Show current role\n\n\u002Fhandoff\n  Prepare role handoff\n```\n\n### Command Shortcuts\n\n| Alias | Full Command |\n|-------|-------------|\n| `\u002Fs` | `\u002Fsuggest` |\n| `\u002Fe` | `\u002Fexplain` |\n| `\u002Ft` | `\u002Ftest` |\n| `\u002Fr` | `\u002Freview` |\n| `\u002Fc` | `\u002Fcommit` |\n| `\u002Fg` | `\u002Fgoto` |\n| `\u002Ff` | `\u002Ffind` |\n| `\u002Fh` | `\u002Fhelp` |\n| `\u002Fsw` | `\u002Fswitch` |\n| `\u002Fst` | `\u002Fstatus` |\n\n### Configuration\n\n#### Basic Configuration\nCreate `.claude-flow\u002Fpair-config.json`:\n\n```json\n{\n  \"pair\": {\n    \"enabled\": true,\n    \"defaultMode\": \"switch\",\n    \"defaultAgent\": \"auto\",\n    \"autoStart\": false,\n    \"theme\": \"professional\"\n  }\n}\n```\n\n#### Complete Configuration\n\n```json\n{\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```\n\n#### Built-in Agents\n\n```json\n{\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```\n\n#### CLI Configuration\n```bash\n# 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\u002FImport\nclaude-flow pair config export > config.json\nclaude-flow pair config import config.json\n\n# Reset\nclaude-flow pair config reset\n```\n\n#### Profile Management\n\nCreate reusable profiles:\n\n```bash\n# 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```\n\nProfile configuration:\n```json\n{\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```\n\n### Real-World Examples\n\n#### Example 1: Feature Implementation\n\nImplementing user authentication with JWT tokens:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode switch \\\n  --agent senior-dev \\\n  --focus implement \\\n  --verify \\\n  --test\n```\n\n**Session Flow:**\n```\n? Starting pair programming for authentication feature...\n\n[DRIVER: You - 10 minutes]\n\u002Fexplain JWT authentication flow\n> AI explains JWT concepts and best practices\n\n\u002Fsuggest implementation approach\n> 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\u002Fimplement JWT token generation with refresh tokens\n> AI generates secure token implementation\n\n\u002Ftest-gen\n> AI creates comprehensive test suite\n\n[SWITCH TO DRIVER]\n\n[DRIVER: You - 10 minutes]\n# You refine the implementation\n\u002Freview --security\n> AI performs security review, suggests improvements\n\n\u002Fcommit --message \"feat: JWT authentication with refresh tokens\"\n✅ Truth Score: 0.98 - Committed successfully\n```\n\n#### Example 2: Bug Fixing\n\nDebugging a memory leak in Node.js:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode navigator \\\n  --agent debugger-expert \\\n  --focus debug \\\n  --trace\n```\n\n**Session Flow:**\n```\n? Starting debugging session...\n\n\u002Fstatus\n> Analyzing application for memory issues...\n\n\u002Fperf --profile\n> Memory usage growing: 150MB → 450MB over 10 minutes\n\n\u002Ffind \"new EventEmitter\" --regex\n> Found 3 instances of EventEmitter creation\n\n\u002Finspect eventEmitters --deep\n> Discovering listeners not being removed\n\n\u002Fsuggest fix for memory leak\n> AI suggests: \"Add removeListener in cleanup functions\"\n\n\u002Fimplement cleanup functions for all event emitters\n> AI generates proper cleanup code\n\n\u002Ftest\n> Memory stable at 150MB ✅\n\n\u002Fcommit --message \"fix: memory leak in event emitters\"\n```\n\n#### Example 3: TDD Session\n\nBuilding shopping cart with test-driven development:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode tdd \\\n  --agent tdd-specialist \\\n  --test-first\n```\n\n**Session Flow:**\n```\n? TDD Session: Shopping Cart Feature\n\n[RED PHASE]\n\u002Ftest-gen \"add item to cart\"\n> 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\u002Fimplement minimal cart functionality\n> You write just enough code to pass tests\n\n\u002Ftest\n> Tests passing: 3\u002F3 ✅\n\n[REFACTOR PHASE]\n\u002Frefactor --pattern repository\n> AI refactors to repository pattern\n\n\u002Ftest\n> Tests still passing: 3\u002F3 ✅\n\n[NEXT CYCLE]\n\u002Ftest-gen \"remove item from cart\"\n> AI writes new failing tests...\n```\n\n#### Example 4: Code Refactoring\n\nModernizing legacy code:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode driver \\\n  --focus refactor \\\n  --verify \\\n  --threshold 0.98\n```\n\n**Session Flow:**\n```\n? Refactoring Session: Modernizing UserService\n\n\u002Fanalyze UserService.js\n> AI identifies:\n  - Callback hell (5 levels deep)\n  - No error handling\n  - Tight coupling\n  - No tests\n\n\u002Fsuggest refactoring plan\n> AI suggests:\n  1. Convert callbacks to async\u002Fawait\n  2. Add error boundaries\n  3. Extract dependencies\n  4. Add unit tests\n\n\u002Ftest-gen --before-refactor\n> AI generates tests for current behavior\n\n\u002Frefactor callbacks to async\u002Fawait\n# You refactor with AI guidance\n\n\u002Ftest\n> All tests passing ✅\n\n\u002Freview --compare\n> AI shows before\u002Fafter comparison\n> Code complexity: 35 → 12\n> Truth score: 0.99 ✅\n\n\u002Fcommit --message \"refactor: modernize UserService with async\u002Fawait\"\n```\n\n#### Example 5: Performance Optimization\n\nOptimizing slow React application:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode switch \\\n  --agent performance-expert \\\n  --focus optimize \\\n  --profile\n```\n\n**Session Flow:**\n```\n? Performance Optimization Session\n\n\u002Fperf --profile\n> React DevTools Profiler Results:\n  - ProductList: 450ms render\n  - CartSummary: 200ms render\n  - Unnecessary re-renders: 15\n\n\u002Fsuggest optimizations for ProductList\n> AI suggests:\n  1. Add React.memo\n  2. Use useMemo for expensive calculations\n  3. Implement virtualization for long lists\n\n\u002Fimplement React.memo and useMemo\n# You implement with AI guidance\n\n\u002Fperf --profile\n> ProductList: 45ms render (90% improvement!) ✅\n\n\u002Fimplement virtualization with react-window\n> AI implements virtual scrolling\n\n\u002Fperf --profile\n> ProductList: 12ms render (97% improvement!) ✅\n> FPS: 60 stable ✅\n\n\u002Fcommit --message \"perf: optimize ProductList with memoization and virtualization\"\n```\n\n#### Example 6: API Development\n\nBuilding RESTful API with Express:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode navigator \\\n  --agent backend-expert \\\n  --focus implement \\\n  --test\n```\n\n**Session Flow:**\n```\n? API Development Session\n\n\u002Fdesign REST API for blog platform\n> AI designs endpoints:\n  POST   \u002Fapi\u002Fposts\n  GET    \u002Fapi\u002Fposts\n  GET    \u002Fapi\u002Fposts\u002F:id\n  PUT    \u002Fapi\u002Fposts\u002F:id\n  DELETE \u002Fapi\u002Fposts\u002F:id\n\n\u002Fimplement CRUD endpoints with validation\n> AI implements with Express + Joi validation\n\n\u002Ftest-gen --integration\n> AI generates integration tests\n\n\u002Fsecurity --api\n> AI adds:\n  - Rate limiting\n  - Input sanitization\n  - JWT authentication\n  - CORS configuration\n\n\u002Fdocument --openapi\n> AI generates OpenAPI documentation\n\n\u002Ftest --integration\n> All endpoints tested: 15\u002F15 ✅\n```\n\n### Session Templates\n\n#### Quick Start Templates\n\n```bash\n# 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```\n\n### Session Management\n\n#### Session Status\n\n```bash\nclaude-flow pair --status\n```\n\n**Output:**\n```\n? 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? 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? Focus: Implementation\n? Current File: src\u002Fauth\u002Flogin.js\n```\n\n#### Session History\n\n```bash\nclaude-flow pair --history\n```\n\n**Output:**\n```\n? 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```\n\n#### Session Persistence\n\n```bash\n# Save session\nclaude-flow pair --save [--name \u003Cname>]\n\n# Load session\nclaude-flow pair --load \u003Csession-id>\n\n# Export session\nclaude-flow pair --export \u003Csession-id> [--format json|md]\n\n# Generate report\nclaude-flow pair --report \u003Csession-id>\n```\n\n#### Background Sessions\n\n```bash\n# 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 \u003Csession-id>\n\n# End background session\nclaude-flow pair --end \u003Csession-id>\n```\n\n### Advanced Features\n\n#### Custom Commands\n\nDefine in configuration:\n\n```json\n{\n  \"customCommands\": {\n    \"tdd\": \"\u002Ftest-gen && \u002Ftest --watch\",\n    \"full-review\": \"\u002Flint --fix && \u002Ftest && \u002Freview --strict\",\n    \"quick-fix\": \"\u002Fsuggest --type fix && \u002Fimplement && \u002Ftest\"\n  }\n}\n```\n\nUse custom commands:\n```\n\u002Fcustom tdd\n\u002Fcustom full-review\n```\n\n#### Command Chaining\n\n```\n\u002Ftest && \u002Fcommit && \u002Fpush\n\u002Flint --fix && \u002Ftest && \u002Freview --strict\n```\n\n#### Session Recording\n\n```bash\n# Start with recording\nclaude-flow pair --start --record\n\n# Replay session\nclaude-flow pair --replay \u003Csession-id>\n\n# Session analytics\nclaude-flow pair --analytics \u003Csession-id>\n```\n\n#### Integration Options\n\n**With Git:**\n```bash\nclaude-flow pair --start --git --auto-commit\n```\n\n**With CI\u002FCD:**\n```bash\nclaude-flow pair --start --ci --non-interactive\n```\n\n**With IDE:**\n```bash\nclaude-flow pair --start --ide vscode\n```\n\n### Best Practices\n\n#### Session Practices\n1. **Clear Goals** - Define session objectives upfront\n2. **Appropriate Mode** - Choose based on task type\n3. **Enable Verification** - For critical code paths\n4. **Regular Testing** - Maintain quality continuously\n5. **Session Notes** - Document important decisions\n6. **Regular Breaks** - Take breaks every 45-60 minutes\n\n#### Code Practices\n1. **Test Early** - Run tests after each change\n2. **Verify Before Commit** - Check truth scores\n3. **Review Security** - Always for sensitive code\n4. **Profile Performance** - Use `\u002Fperf` for optimization\n5. **Save Sessions** - For complex work\n6. **Learn from AI** - Ask questions frequently\n\n#### Mode Selection\n- **Driver Mode**: When learning, controlling implementation\n- **Navigator Mode**: For rapid prototyping, generation\n- **Switch Mode**: Long sessions, balanced collaboration\n- **TDD Mode**: Building with tests\n- **Review Mode**: Quality focus\n- **Mentor Mode**: Learning priority\n- **Debug Mode**: Fixing issues\n\n### Troubleshooting\n\n#### Session Won't Start\n- Check agent availability\n- Verify configuration file syntax\n- Ensure clean workspace\n- Review log files\n\n#### Session Disconnected\n- Use `--recover` to restore\n- Check network connection\n- Verify background processes\n- Review auto-save files\n\n#### Poor Performance\n- Reduce verification threshold\n- Disable continuous testing\n- Check system resources\n- Use lighter AI model\n\n#### Configuration Issues\n- Validate JSON syntax\n- Check file permissions\n- Review priority order (CLI > env > project > user > global)\n- Run `claude-flow pair config validate`\n\n### Quality Metrics\n\n#### Truth Score Thresholds\n```\nError:   \u003C 0.90 ❌\nWarning: 0.90 - 0.95 ⚠️\nGood:    0.95 - 0.98 ✅\nExcellent: > 0.98 ?\n```\n\n#### Coverage Thresholds\n```\nError:   \u003C 70% ❌\nWarning: 70% - 80% ⚠️\nGood:    80% - 90% ✅\nExcellent: > 90% ?\n```\n\n#### Complexity Thresholds\n```\nError:   > 15 ❌\nWarning: 10 - 15 ⚠️\nGood:    5 - 10 ✅\nExcellent: \u003C 5 ?\n```\n\n### Environment Variables\n\nOverride configuration via environment:\n\n```bash\nexport 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```\n\n### Command History\n\nNavigate history:\n- `↑\u002F↓` - Navigate through command history\n- `Ctrl+R` - Search command history\n- `!!` - Repeat last command\n- `!\u003Cn>` - Run command n from history\n\n### Keyboard Shortcuts (Configurable)\n\nDefault shortcuts:\n```json\n{\n  \"shortcuts\": {\n    \"switch\": \"ctrl+shift+s\",\n    \"suggest\": \"ctrl+space\",\n    \"review\": \"ctrl+r\",\n    \"test\": \"ctrl+t\"\n  }\n}\n```\n\n### Related Commands\n\n- `claude-flow pair --help` - Show help\n- `claude-flow pair config` - Manage configuration\n- `claude-flow pair profile` - Manage profiles\n- `claude-flow pair templates` - List templates\n- `claude-flow pair agents` - List available agents\n","# Pair Programming\n\nCollaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.\n\n## What This Skill Does\n\nThis skill provides professional pair programming capabilities with AI assistance, supporting multiple collaboration modes, continuous verification, and integrated testing. It manages driver\u002Fnavigator roles, performs real-time code review, tracks quality metrics, and ensures high standards through truth-score verification.\n\n**Key Capabilities:**\n- **Multiple Modes**: Driver, Navigator, Switch, TDD, Review, Mentor, Debug\n- **Real-Time Verification**: Automatic quality scoring with rollback on failures\n- **Role Management**: Seamless switching between driver\u002Fnavigator roles\n- **Testing Integration**: Auto-generate tests, track coverage, continuous testing\n- **Code Review**: Security scanning, performance analysis, best practice enforcement\n- **Session Persistence**: Auto-save, recovery, export, and sharing\n\n## Prerequisites\n\n**Required:**\n- Claude Flow CLI installed (`npm install -g claude-flow@alpha`)\n- Git repository (optional but recommended)\n\n**Recommended:**\n- Testing framework (Jest, pytest, etc.)\n- Linter configured (ESLint, pylint, etc.)\n- Code formatter (Prettier, Black, etc.)\n\n## Quick Start\n\n### Basic Session\n```bash\n# Start simple pair programming\nclaude-flow pair --start\n```\n\n### TDD Session\n```bash\n# Test-driven development\nclaude-flow pair --start \\\n  --mode tdd \\\n  --test-first \\\n  --coverage 90\n```\n\n---\n\n## Complete Guide\n\n### Session Control Commands\n\n#### Starting Sessions\n```bash\n# 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```\n\n#### Session Management\n```bash\n# Check status\nclaude-flow pair --status\n\n# View history\nclaude-flow pair --history\n\n# Pause session\n\u002Fpause [--reason \u003Creason>]\n\n# Resume session\n\u002Fresume\n\n# End session\nclaude-flow pair --end [--save] [--report]\n```\n\n### Available Modes\n\n#### Driver Mode\nYou write code while AI provides guidance.\n\n```bash\nclaude-flow pair --start --mode driver\n```\n\n**Your Responsibilities:**\n- Write actual code\n- Implement solutions\n- Make immediate decisions\n- Handle syntax and structure\n\n**AI Navigator:**\n- Strategic guidance\n- Spot potential issues\n- Suggest improvements\n- Real-time review\n- Track overall direction\n\n**Best For:**\n- Learning new patterns\n- Implementing familiar features\n- Quick iterations\n- Hands-on debugging\n\n**Commands:**\n```\n\u002Fsuggest     - Get implementation suggestions\n\u002Freview      - Request code review\n\u002Fexplain     - Ask for explanations\n\u002Foptimize    - Request optimization ideas\n\u002Fpatterns    - Get pattern recommendations\n```\n\n#### Navigator Mode\nAI writes code while you provide direction.\n\n```bash\nclaude-flow pair --start --mode navigator\n```\n\n**Your Responsibilities:**\n- Provide high-level direction\n- Review generated code\n- Make architectural decisions\n- Ensure business requirements\n\n**AI Driver:**\n- Write implementation code\n- Handle syntax details\n- Implement your guidance\n- Manage boilerplate\n- Execute refactoring\n\n**Best For:**\n- Rapid prototyping\n- Boilerplate generation\n- Learning from AI patterns\n- Exploring solutions\n\n**Commands:**\n```\n\u002Fimplement   - Direct implementation\n\u002Frefactor    - Request refactoring\n\u002Ftest        - Generate tests\n\u002Fdocument    - Add documentation\n\u002Falternate   - See alternative approaches\n```\n\n#### Switch Mode\nAutomatically alternates roles at intervals.\n\n```bash\n# 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```\n\n**Handoff Process:**\n1. 30-second warning before switch\n2. Current driver completes thought\n3. Context summary generated\n4. Roles swap smoothly\n5. New driver continues\n\n**Best For:**\n- Balanced collaboration\n- Knowledge sharing\n- Complex features\n- Extended sessions\n\n#### Specialized Modes\n\n**TDD Mode** - Test-Driven Development:\n```bash\nclaude-flow pair --start \\\n  --mode tdd \\\n  --test-first \\\n  --coverage 100\n```\nWorkflow: Write failing test → Implement → Refactor → Repeat\n\n**Review Mode** - Continuous code review:\n```bash\nclaude-flow pair --start \\\n  --mode review \\\n  --strict \\\n  --security\n```\nFeatures: Real-time feedback, security scanning, performance analysis\n\n**Mentor Mode** - Learning-focused:\n```bash\nclaude-flow pair --start \\\n  --mode mentor \\\n  --explain-all \\\n  --pace slow\n```\nFeatures: Detailed explanations, step-by-step guidance, pattern teaching\n\n**Debug Mode** - Problem-solving:\n```bash\nclaude-flow pair --start \\\n  --mode debug \\\n  --verbose \\\n  --trace\n```\nFeatures: Issue identification, root cause analysis, fix suggestions\n\n### In-Session Commands\n\n#### Code Commands\n```\n\u002Fexplain [--level basic|detailed|expert]\n  Explain the current code or selection\n\n\u002Fsuggest [--type refactor|optimize|security|style]\n  Get improvement suggestions\n\n\u002Fimplement \u003Cdescription>\n  Request implementation (navigator mode)\n\n\u002Frefactor [--pattern \u003Cpattern>] [--scope function|file|module]\n  Refactor selected code\n\n\u002Foptimize [--target speed|memory|both]\n  Optimize code for performance\n\n\u002Fdocument [--format jsdoc|markdown|inline]\n  Add documentation to code\n\n\u002Fcomment [--verbose]\n  Add inline comments\n\n\u002Fpattern \u003Cpattern-name> [--example]\n  Apply a design pattern\n```\n\n#### Testing Commands\n```\n\u002Ftest [--watch] [--coverage] [--only \u003Cpattern>]\n  Run test suite\n\n\u002Ftest-gen [--type unit|integration|e2e]\n  Generate tests for current code\n\n\u002Fcoverage [--report html|json|terminal]\n  Check test coverage\n\n\u002Fmock \u003Ctarget> [--realistic]\n  Generate mock data or functions\n\n\u002Ftest-watch [--on-save]\n  Enable test watching\n\n\u002Fsnapshot [--update]\n  Create test snapshots\n```\n\n#### Review Commands\n```\n\u002Freview [--scope current|file|changes] [--strict]\n  Perform code review\n\n\u002Fsecurity [--deep] [--fix]\n  Security analysis\n\n\u002Fperf [--profile] [--suggestions]\n  Performance analysis\n\n\u002Fquality [--detailed]\n  Check code quality metrics\n\n\u002Flint [--fix] [--config \u003Cconfig>]\n  Run linters\n\n\u002Fcomplexity [--threshold \u003Cvalue>]\n  Analyze code complexity\n```\n\n#### Navigation Commands\n```\n\u002Fgoto \u003Cfile>[:line[:column]]\n  Navigate to file or location\n\n\u002Ffind \u003Cpattern> [--regex] [--case-sensitive]\n  Search in project\n\n\u002Frecent [--limit \u003Cn>]\n  Show recent files\n\n\u002Fbookmark [add|list|goto|remove] [\u003Cname>]\n  Manage bookmarks\n\n\u002Fhistory [--limit \u003Cn>] [--filter \u003Cpattern>]\n  Show command history\n\n\u002Ftree [--depth \u003Cn>] [--filter \u003Cpattern>]\n  Show project structure\n```\n\n#### Git Commands\n```\n\u002Fdiff [--staged] [--file \u003Cfile>]\n  Show git diff\n\n\u002Fcommit [--message \u003Cmsg>] [--amend]\n  Commit with verification\n\n\u002Fbranch [create|switch|delete|list] [\u003Cname>]\n  Branch operations\n\n\u002Fstash [save|pop|list|apply] [\u003Cmessage>]\n  Stash operations\n\n\u002Flog [--oneline] [--limit \u003Cn>]\n  View git log\n\n\u002Fblame [\u003Cfile>]\n  Show git blame\n```\n\n#### AI Partner Commands\n```\n\u002Fagent [switch|info|config] [\u003Cagent-name>]\n  Manage AI agent\n\n\u002Fteach \u003Cpreference>\n  Teach the AI your preferences\n\n\u002Ffeedback [positive|negative] \u003Cmessage>\n  Provide feedback to AI\n\n\u002Fpersonality [professional|friendly|concise|verbose]\n  Adjust AI personality\n\n\u002Fexpertise [add|remove|list] [\u003Cdomain>]\n  Set AI expertise focus\n```\n\n#### Metrics Commands\n```\n\u002Fmetrics [--period today|session|week|all]\n  Show session metrics\n\n\u002Fscore [--breakdown]\n  Show quality scores\n\n\u002Fproductivity [--chart]\n  Show productivity metrics\n\n\u002Fleaderboard [--personal|team]\n  Show improvement leaderboard\n```\n\n#### Role & Mode Commands\n```\n\u002Fswitch [--immediate]\n  Switch driver\u002Fnavigator roles\n\n\u002Fmode \u003Ctype>\n  Change mode (driver|navigator|switch|tdd|review|mentor|debug)\n\n\u002Frole\n  Show current role\n\n\u002Fhandoff\n  Prepare role handoff\n```\n\n### Command Shortcuts\n\n| Alias | Full Command |\n|-------|-------------|\n| `\u002Fs` | `\u002Fsuggest` |\n| `\u002Fe` | `\u002Fexplain` |\n| `\u002Ft` | `\u002Ftest` |\n| `\u002Fr` | `\u002Freview` |\n| `\u002Fc` | `\u002Fcommit` |\n| `\u002Fg` | `\u002Fgoto` |\n| `\u002Ff` | `\u002Ffind` |\n| `\u002Fh` | `\u002Fhelp` |\n| `\u002Fsw` | `\u002Fswitch` |\n| `\u002Fst` | `\u002Fstatus` |\n\n### Configuration\n\n#### Basic Configuration\nCreate `.claude-flow\u002Fpair-config.json`:\n\n```json\n{\n  \"pair\": {\n    \"enabled\": true,\n    \"defaultMode\": \"switch\",\n    \"defaultAgent\": \"auto\",\n    \"autoStart\": false,\n    \"theme\": \"professional\"\n  }\n}\n```\n\n#### Complete Configuration\n\n```json\n{\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```\n\n#### Built-in Agents\n\n```json\n{\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```\n\n#### CLI Configuration\n```bash\n# 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\u002FImport\nclaude-flow pair config export > config.json\nclaude-flow pair config import config.json\n\n# Reset\nclaude-flow pair config reset\n```\n\n#### Profile Management\n\nCreate reusable profiles:\n\n```bash\n# 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```\n\nProfile configuration:\n```json\n{\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```\n\n### Real-World Examples\n\n#### Example 1: Feature Implementation\n\nImplementing user authentication with JWT tokens:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode switch \\\n  --agent senior-dev \\\n  --focus implement \\\n  --verify \\\n  --test\n```\n\n**Session Flow:**\n```\n? Starting pair programming for authentication feature...\n\n[DRIVER: You - 10 minutes]\n\u002Fexplain JWT authentication flow\n> AI explains JWT concepts and best practices\n\n\u002Fsuggest implementation approach\n> 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\u002Fimplement JWT token generation with refresh tokens\n> AI generates secure token implementation\n\n\u002Ftest-gen\n> AI creates comprehensive test suite\n\n[SWITCH TO DRIVER]\n\n[DRIVER: You - 10 minutes]\n# You refine the implementation\n\u002Freview --security\n> AI performs security review, suggests improvements\n\n\u002Fcommit --message \"feat: JWT authentication with refresh tokens\"\n✅ Truth Score: 0.98 - Committed successfully\n```\n\n#### Example 2: Bug Fixing\n\nDebugging a memory leak in Node.js:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode navigator \\\n  --agent debugger-expert \\\n  --focus debug \\\n  --trace\n```\n\n**Session Flow:**\n```\n? Starting debugging session...\n\n\u002Fstatus\n> Analyzing application for memory issues...\n\n\u002Fperf --profile\n> Memory usage growing: 150MB → 450MB over 10 minutes\n\n\u002Ffind \"new EventEmitter\" --regex\n> Found 3 instances of EventEmitter creation\n\n\u002Finspect eventEmitters --deep\n> Discovering listeners not being removed\n\n\u002Fsuggest fix for memory leak\n> AI suggests: \"Add removeListener in cleanup functions\"\n\n\u002Fimplement cleanup functions for all event emitters\n> AI generates proper cleanup code\n\n\u002Ftest\n> Memory stable at 150MB ✅\n\n\u002Fcommit --message \"fix: memory leak in event emitters\"\n```\n\n#### Example 3: TDD Session\n\nBuilding shopping cart with test-driven development:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode tdd \\\n  --agent tdd-specialist \\\n  --test-first\n```\n\n**Session Flow:**\n```\n? TDD Session: Shopping Cart Feature\n\n[RED PHASE]\n\u002Ftest-gen \"add item to cart\"\n> 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\u002Fimplement minimal cart functionality\n> You write just enough code to pass tests\n\n\u002Ftest\n> Tests passing: 3\u002F3 ✅\n\n[REFACTOR PHASE]\n\u002Frefactor --pattern repository\n> AI refactors to repository pattern\n\n\u002Ftest\n> Tests still passing: 3\u002F3 ✅\n\n[NEXT CYCLE]\n\u002Ftest-gen \"remove item from cart\"\n> AI writes new failing tests...\n```\n\n#### Example 4: Code Refactoring\n\nModernizing legacy code:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode driver \\\n  --focus refactor \\\n  --verify \\\n  --threshold 0.98\n```\n\n**Session Flow:**\n```\n? Refactoring Session: Modernizing UserService\n\n\u002Fanalyze UserService.js\n> AI identifies:\n  - Callback hell (5 levels deep)\n  - No error handling\n  - Tight coupling\n  - No tests\n\n\u002Fsuggest refactoring plan\n> AI suggests:\n  1. Convert callbacks to async\u002Fawait\n  2. Add error boundaries\n  3. Extract dependencies\n  4. Add unit tests\n\n\u002Ftest-gen --before-refactor\n> AI generates tests for current behavior\n\n\u002Frefactor callbacks to async\u002Fawait\n# You refactor with AI guidance\n\n\u002Ftest\n> All tests passing ✅\n\n\u002Freview --compare\n> AI shows before\u002Fafter comparison\n> Code complexity: 35 → 12\n> Truth score: 0.99 ✅\n\n\u002Fcommit --message \"refactor: modernize UserService with async\u002Fawait\"\n```\n\n#### Example 5: Performance Optimization\n\nOptimizing slow React application:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode switch \\\n  --agent performance-expert \\\n  --focus optimize \\\n  --profile\n```\n\n**Session Flow:**\n```\n? Performance Optimization Session\n\n\u002Fperf --profile\n> React DevTools Profiler Results:\n  - ProductList: 450ms render\n  - CartSummary: 200ms render\n  - Unnecessary re-renders: 15\n\n\u002Fsuggest optimizations for ProductList\n> AI suggests:\n  1. Add React.memo\n  2. Use useMemo for expensive calculations\n  3. Implement virtualization for long lists\n\n\u002Fimplement React.memo and useMemo\n# You implement with AI guidance\n\n\u002Fperf --profile\n> ProductList: 45ms render (90% improvement!) ✅\n\n\u002Fimplement virtualization with react-window\n> AI implements virtual scrolling\n\n\u002Fperf --profile\n> ProductList: 12ms render (97% improvement!) ✅\n> FPS: 60 stable ✅\n\n\u002Fcommit --message \"perf: optimize ProductList with memoization and virtualization\"\n```\n\n#### Example 6: API Development\n\nBuilding RESTful API with Express:\n\n```bash\n# Session setup\nclaude-flow pair --start \\\n  --mode navigator \\\n  --agent backend-expert \\\n  --focus implement \\\n  --test\n```\n\n**Session Flow:**\n```\n? API Development Session\n\n\u002Fdesign REST API for blog platform\n> AI designs endpoints:\n  POST   \u002Fapi\u002Fposts\n  GET    \u002Fapi\u002Fposts\n  GET    \u002Fapi\u002Fposts\u002F:id\n  PUT    \u002Fapi\u002Fposts\u002F:id\n  DELETE \u002Fapi\u002Fposts\u002F:id\n\n\u002Fimplement CRUD endpoints with validation\n> AI implements with Express + Joi validation\n\n\u002Ftest-gen --integration\n> AI generates integration tests\n\n\u002Fsecurity --api\n> AI adds:\n  - Rate limiting\n  - Input sanitization\n  - JWT authentication\n  - CORS configuration\n\n\u002Fdocument --openapi\n> AI generates OpenAPI documentation\n\n\u002Ftest --integration\n> All endpoints tested: 15\u002F15 ✅\n```\n\n### Session Templates\n\n#### Quick Start Templates\n\n```bash\n# 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```\n\n### Session Management\n\n#### Session Status\n\n```bash\nclaude-flow pair --status\n```\n\n**Output:**\n```\n? 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? 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? Focus: Implementation\n? Current File: src\u002Fauth\u002Flogin.js\n```\n\n#### Session History\n\n```bash\nclaude-flow pair --history\n```\n\n**Output:**\n```\n? 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```\n\n#### Session Persistence\n\n```bash\n# Save session\nclaude-flow pair --save [--name \u003Cname>]\n\n# Load session\nclaude-flow pair --load \u003Csession-id>\n\n# Export session\nclaude-flow pair --export \u003Csession-id> [--format json|md]\n\n# Generate report\nclaude-flow pair --report \u003Csession-id>\n```\n\n#### Background Sessions\n\n```bash\n# 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 \u003Csession-id>\n\n# End background session\nclaude-flow pair --end \u003Csession-id>\n```\n\n### Advanced Features\n\n#### Custom Commands\n\nDefine in configuration:\n\n```json\n{\n  \"customCommands\": {\n    \"tdd\": \"\u002Ftest-gen && \u002Ftest --watch\",\n    \"full-review\": \"\u002Flint --fix && \u002Ftest && \u002Freview --strict\",\n    \"quick-fix\": \"\u002Fsuggest --type fix && \u002Fimplement && \u002Ftest\"\n  }\n}\n```\n\nUse custom commands:\n```\n\u002Fcustom tdd\n\u002Fcustom full-review\n```\n\n#### Command Chaining\n\n```\n\u002Ftest && \u002Fcommit && \u002Fpush\n\u002Flint --fix && \u002Ftest && \u002Freview --strict\n```\n\n#### Session Recording\n\n```bash\n# Start with recording\nclaude-flow pair --start --record\n\n# Replay session\nclaude-flow pair --replay \u003Csession-id>\n\n# Session analytics\nclaude-flow pair --analytics \u003Csession-id>\n```\n\n#### Integration Options\n\n**With Git:**\n```bash\nclaude-flow pair --start --git --auto-commit\n```\n\n**With CI\u002FCD:**\n```bash\nclaude-flow pair --start --ci --non-interactive\n```\n\n**With IDE:**\n```bash\nclaude-flow pair --start --ide vscode\n```\n\n### Best Practices\n\n#### Session Practices\n1. **Clear Goals** - Define session objectives upfront\n2. **Appropriate Mode** - Choose based on task type\n3. **Enable Verification** - For critical code paths\n4. **Regular Testing** - Maintain quality continuously\n5. **Session Notes** - Document important decisions\n6. **Regular Breaks** - Take breaks every 45-60 minutes\n\n#### Code Practices\n1. **Test Early** - Run tests after each change\n2. **Verify Before Commit** - Check truth scores\n3. **Review Security** - Always for sensitive code\n4. **Profile Performance** - Use `\u002Fperf` for optimization\n5. **Save Sessions** - For complex work\n6. **Learn from AI** - Ask questions frequently\n\n#### Mode Selection\n- **Driver Mode**: When learning, controlling implementation\n- **Navigator Mode**: For rapid prototyping, generation\n- **Switch Mode**: Long sessions, balanced collaboration\n- **TDD Mode**: Building with tests\n- **Review Mode**: Quality focus\n- **Mentor Mode**: Learning priority\n- **Debug Mode**: Fixing issues\n\n### Troubleshooting\n\n#### Session Won't Start\n- Check agent availability\n- Verify configuration file syntax\n- Ensure clean workspace\n- Review log files\n\n#### Session Disconnected\n- Use `--recover` to restore\n- Check network connection\n- Verify background processes\n- Review auto-save files\n\n#### Poor Performance\n- Reduce verification threshold\n- Disable continuous testing\n- Check system resources\n- Use lighter AI model\n\n#### Configuration Issues\n- Validate JSON syntax\n- Check file permissions\n- Review priority order (CLI > env > project > user > global)\n- Run `claude-flow pair config validate`\n\n### Quality Metrics\n\n#### Truth Score Thresholds\n```\nError:   \u003C 0.90 ❌\nWarning: 0.90 - 0.95 ⚠️\nGood:    0.95 - 0.98 ✅\nExcellent: > 0.98 ?\n```\n\n#### Coverage Thresholds\n```\nError:   \u003C 70% ❌\nWarning: 70% - 80% ⚠️\nGood:    80% - 90% ✅\nExcellent: > 90% ?\n```\n\n#### Complexity Thresholds\n```\nError:   > 15 ❌\nWarning: 10 - 15 ⚠️\nGood:    5 - 10 ✅\nExcellent: \u003C 5 ?\n```\n\n### Environment Variables\n\nOverride configuration via environment:\n\n```bash\nexport 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```\n\n### Command History\n\nNavigate history:\n- `↑\u002F↓` - Navigate through command history\n- `Ctrl+R` - Search command history\n- `!!` - Repeat last command\n- `!\u003Cn>` - Run command n from history\n\n### Keyboard Shortcuts (Configurable)\n\nDefault shortcuts:\n```json\n{\n  \"shortcuts\": {\n    \"switch\": \"ctrl+shift+s\",\n    \"suggest\": \"ctrl+space\",\n    \"review\": \"ctrl+r\",\n    \"test\": \"ctrl+t\"\n  }\n}\n```\n\n### Related Commands\n\n- `claude-flow pair --help` - Show help\n- `claude-flow pair config` - Manage configuration\n- `claude-flow pair profile` - Manage profiles\n- `claude-flow pair templates` - List templates\n- `claude-flow pair agents` - List available agents\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fpair-programming",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill pair-programming",{"tool":72,"command":73},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill pair-programming",{"tool":75,"command":76},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill pair-programming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fpair-programming\u002FSKILL.md",true,[80],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"skill-report.json","REFERENCE","参考文档",25768,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdnyoussef\u002Fpair-programming\u002Fskill-report.json",[87,99,109,118,124,131],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":95,"publishedAt":52},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[96,97,98],"model","model hierarchy","model hierarchy skill",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":52},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[104],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},[106,107,108],"MCP","zoom","zoom mcp",{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":52},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[115,116,117,107],"sdk","zoom apps sdk","apps",{"skillNo":119,"name":120,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":52},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[120],{"skillNo":125,"name":126,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":130,"publishedAt":52},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[129],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},[126],{"skillNo":132,"name":133,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":52},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[133]]