pair-programming
Provides AI navigator for pair programming sessions with real-time code review, TDD guidance, and quality monitoring. Use when pair programming with AI assistance, practicing TDD with a navigator, debugging collaboratively, or refactoring with real-time verification.
What this skill does
# Pair Programming Collaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows. ## What This Skill Does This skill provides professional pair programming capabilities with AI assistance, supporting multiple collaboration modes, continuous verification, and integrated testing. It manages driver/navigator roles, performs real-time code review, tracks quality metrics, and ensures high standards through truth-score verification. **Key Capabilities:** - **Multiple Modes**: Driver, Navigator, Switch, TDD, Review, Mentor, Debug - **Real-Time Verification**: Automatic quality scoring with rollback on failures - **Role Management**: Seamless switching between driver/navigator roles - **Testing Integration**: Auto-generate tests, track coverage, continuous testing - **Code Review**: Security scanning, performance analysis, best practice enforcement - **Session Persistence**: Auto-save, recovery, export, and sharing ## Prerequisites **Required:** - Claude Flow CLI installed (`npm install -g claude-flow@alpha`) - Git repository (optional but recommended) **Recommended:** - Testing framework (Jest, pytest, etc.) - Linter configured (ESLint, pylint, etc.) - Code formatter (Prettier, Black, etc.) ## Quick Start ### Basic Session ```bash # Start simple pair programming claude-flow pair --start ``` ### TDD Session ```bash # Test-driven development claude-flow pair --start \ --mode tdd \ --test-first \ --coverage 90 ``` --- ## Complete Guide ### Session Control Commands #### Starting Sessions ```bash # Basic start claude-flow pair --start # Expert refactoring session claude-flow pair --start \ --agent senior-dev \ --focus refactor \ --verify \ --threshold 0.98 # Debugging session claude-flow pair --start \ --agent debugger-expert \ --focus debug \ --review # Learning session claude-flow pair --start \ --mode mentor \ --pace slow \ --examples ``` #### Session Management ```bash # Check status claude-flow pair --status # View history claude-flow pair --history # Pause session /pause [--reason <reason>] # Resume session /resume # End session claude-flow pair --end [--save] [--report] ``` ### Available Modes #### Driver Mode You write code while AI provides guidance. ```bash claude-flow pair --start --mode driver ``` **Your Responsibilities:** - Write actual code - Implement solutions - Make immediate decisions - Handle syntax and structure **AI Navigator:** - Strategic guidance - Spot potential issues - Suggest improvements - Real-time review - Track overall direction **Best For:** - Learning new patterns - Implementing familiar features - Quick iterations - Hands-on debugging **Commands:** ``` /suggest - Get implementation suggestions /review - Request code review /explain - Ask for explanations /optimize - Request optimization ideas /patterns - Get pattern recommendations ``` #### Navigator Mode AI writes code while you provide direction. ```bash claude-flow pair --start --mode navigator ``` **Your Responsibilities:** - Provide high-level direction - Review generated code - Make architectural decisions - Ensure business requirements **AI Driver:** - Write implementation code - Handle syntax details - Implement your guidance - Manage boilerplate - Execute refactoring **Best For:** - Rapid prototyping - Boilerplate generation - Learning from AI patterns - Exploring solutions **Commands:** ``` /implement - Direct implementation /refactor - Request refactoring /test - Generate tests /document - Add documentation /alternate - See alternative approaches ``` #### Switch Mode Automatically alternates roles at intervals. ```bash # Default 10-minute intervals claude-flow pair --start --mode switch # 5-minute intervals (rapid) claude-flow pair --start --mode switch --interval 5m # 15-minute intervals (deep focus) claude-flow pair --start --mode switch --interval 15m ``` **Handoff Process:** 1. 30-second warning before switch 2. Current driver completes thought 3. Context summary generated 4. Roles swap smoothly 5. New driver continues **Best For:** - Balanced collaboration - Knowledge sharing - Complex features - Extended sessions #### Specialized Modes **TDD Mode** - Test-Driven Development: ```bash claude-flow pair --start \ --mode tdd \ --test-first \ --coverage 100 ``` Workflow: Write failing test → Implement → Refactor → Repeat **Review Mode** - Continuous code review: ```bash claude-flow pair --start \ --mode review \ --strict \ --security ``` Features: Real-time feedback, security scanning, performance analysis **Mentor Mode** - Learning-focused: ```bash claude-flow pair --start \ --mode mentor \ --explain-all \ --pace slow ``` Features: Detailed explanations, step-by-step guidance, pattern teaching **Debug Mode** - Problem-solving: ```bash claude-flow pair --start \ --mode debug \ --verbose \ --trace ``` Features: Issue identification, root cause analysis, fix suggestions ### In-Session Commands #### Code Commands ``` /explain [--level basic|detailed|expert] Explain the current code or selection /suggest [--type refactor|optimize|security|style] Get improvement suggestions /implement <description> Request implementation (navigator mode) /refactor [--pattern <pattern>] [--scope function|file|module] Refactor selected code /optimize [--target speed|memory|both] Optimize code for performance /document [--format jsdoc|markdown|inline] Add documentation to code /comment [--verbose] Add inline comments /pattern <pattern-name> [--example] Apply a design pattern ``` #### Testing Commands ``` /test [--watch] [--coverage] [--only <pattern>] Run test suite /test-gen [--type unit|integration|e2e] Generate tests for current code /coverage [--report html|json|terminal] Check test coverage /mock <target> [--realistic] Generate mock data or functions /test-watch [--on-save] Enable test watching /snapshot [--update] Create test snapshots ``` #### Review Commands ``` /review [--scope current|file|changes] [--strict] Perform code review /security [--deep] [--fix] Security analysis /perf [--profile] [--suggestions] Performance analysis /quality [--detailed] Check code quality metrics /lint [--fix] [--config <config>] Run linters /complexity [--threshold <value>] Analyze code complexity ``` #### Navigation Commands ``` /goto <file>[:line[:column]] Navigate to file or location /find <pattern> [--regex] [--case-sensitive] Search in project /recent [--limit <n>] Show recent files /bookmark [add|list|goto|remove] [<name>] Manage bookmarks /history [--limit <n>] [--filter <pattern>] Show command history /tree [--depth <n>] [--filter <pattern>] Show project structure ``` #### Git Commands ``` /diff [--staged] [--file <file>] Show git diff /commit [--message <msg>] [--amend] Commit with verification /branch [create|switch|delete|list] [<name>] Branch operations /stash [save|pop|list|apply] [<message>] Stash operations /log [--oneline] [--limit <n>] View git log /blame [<file>] Show git blame ``` #### AI Partner Commands ``` /agent [switch|info|config] [<agent-name>] Manage AI agent /teach <preference> Teach the AI your preferences /feedback [positive|negative] <message> Provide feedback to AI /personality [professional|friendly|concise|verbose] Adjust AI personality /expertise [add|remove|list] [<domain>] Set AI expertise focus ``` #### Metrics Commands ``` /metrics [--period today|session|week|all] Show session metrics /score [--breakdown] Show quality scores /productivity [--chart] Show productivity metrics /leaderboard [--personal|team] Show improvement leaderboard ``` #### Role & Mode Commands ``` /switch [--immediate] Switch driver/navigator roles /mode <type> Change mode (driver|navigator|switch|tdd|review|mentor|debug) /role Show current role /handoff
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.