Agent skill

ai-pair-programming

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/ai-pair-programming

SKILL.md

🀝 AI Pair Programming Skill


name: ai-pair-programming description: Collaborate with AI in real-time pair programming sessions for enhanced productivity

🎯 Purpose

ΰΈ—ΰΈ³ΰΈ‡ΰΈ²ΰΈ™ΰΈ£ΰΉˆΰΈ§ΰΈ‘ΰΈΰΈ±ΰΈš AI แบบ pair programming ΰΉ€ΰΈžΰΈ·ΰΉˆΰΈ­ΰΉ€ΰΈžΰΈ΄ΰΉˆΰΈ‘ productivity แΰΈ₯ΰΈ° code quality

πŸ“‹ When to Use

  • ΰΈ—ΰΈ³ΰΈ‡ΰΈ²ΰΈ™ complex features
  • Need second opinion
  • Learning new technology
  • Debugging difficult issues
  • Code review in real-time

πŸ”§ Pair Programming Modes

1. Driver-Navigator Mode

Human = Driver (writes code)
AI = Navigator (reviews, suggests, catches errors)

Flow:
1. Human writes code
2. AI reviews each change
3. AI suggests improvements
4. Human decides to accept/modify

2. Ping-Pong Mode

Alternate writing code:

1. Human writes test
2. AI writes code to pass
3. Human refactors
4. AI suggests improvements

3. AI-First Mode

AI = Driver (writes code)
Human = Navigator (reviews, directs)

Flow:
1. Human describes what's needed
2. AI writes code
3. Human reviews and provides feedback
4. AI refines code

πŸ“ Session Flow

START SESSION
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Define Goal     β”‚ ← What are we building?
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Discuss Approachβ”‚ ← How will we build it?
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Write Code      β”‚ ← Collaborate on implementation
β”‚ (iterative)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Review Together β”‚ ← Check quality, bugs
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Refine          β”‚ ← Improve based on feedback
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
    COMPLETE βœ…

🎯 Best Practices

Communication

Do Don't
Be specific about goals Give vague instructions
Ask for alternatives Accept first solution
Explain context Assume AI knows everything
Give feedback Silently reject

Code Quality

Practice Description
Review all AI code Don't blindly accept
Test suggestions Verify they work
Understand changes Ask for explanations
Keep it simple Avoid over-engineering

πŸ“‹ Session Template

markdown
## 🀝 Pair Programming Session

### Goal
{What we're building}

### Approach
{How we'll build it}

### Progress
- [x] Step 1: Setup
- [ ] Step 2: Core logic
- [ ] Step 3: Testing

### Decisions Made
- Decision 1: Why
- Decision 2: Why

### Questions/Blockers
- Question 1?

βœ… Session Checklist

  • Goal clearly defined
  • Approach agreed
  • Code reviewed
  • Tests written
  • Documentation updated
  • Knowledge shared

πŸ”— Related Skills

  • code-review - Review code quality
  • debugging - Debug issues together
  • testing - Write tests together

Didn't find tool you were looking for?

Be as detailed as possible for better results