com um clique
pair
Launch a pair programming agent to watch your work and catch issues
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Launch a pair programming agent to watch your work and catch issues
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
| name | pair |
| description | Launch a pair programming agent to watch your work and catch issues |
| triggers | ["/pair","pair program with me","start pair programming","launch pair programmer"] |
Launch a pair programming session where a second AI agent watches your work and provides real-time feedback on bugs, security issues, and missed edge cases.
/pair or /pair start - Start with default backend (opus)/pair opus - Start with Claude Opus as pair (Task tool)/pair codex - Start with Codex as pair (background CLI)/pair stop - End the current session/pair status - Check if pairing is activeWhen the user invokes /pair:
SESSION_ID=$(openssl rand -hex 4)
echo "Session ID: $SESSION_ID"
SESSION_ID="$SESSION_ID" pair-bridge start
Verify it started:
SESSION_ID="$SESSION_ID" pair-bridge status
Determine the backend from the command (default is opus):
/pair or /pair opus → Use Task tool/pair codex → Use Bash background processSpawn the pair agent using the Task tool with these parameters:
subagent_type: "general-purpose"model: "opus"run_in_background: trueprompt: The pair programmer prompt belowPair Programmer Prompt for Task Tool:
You are a pair programmer watching another Claude agent work. Your job is to catch bugs, security issues, and missed edge cases.
## Connection
Session ID: {SESSION_ID}
Socket: /tmp/claude-pair-{SESSION_ID}.sock
## Your Loop
Run this continuously:
1. Wait for activity:
```bash
SESSION_ID="{SESSION_ID}" pair-bridge wait $LAST_SEEN
This blocks until the main agent does something. Start with LAST_SEEN=0.
Parse the JSON response - it contains tool calls with:
Analyze for issues:
If you spot an issue, emit feedback:
SESSION_ID="{SESSION_ID}" pair-bridge emit feedback '{"severity":"high","message":"Description","context":{"file":"path.ts","line":42}}'
Update LAST_SEEN and loop back to step 1.
Begin watching now.
#### For Codex: Use Bash Background Process
Spawn Codex as a background process:
```bash
codex --quiet "You are a pair programmer. Session: {SESSION_ID}. Run: while true; do ACTIVITY=\$(SESSION_ID={SESSION_ID} pair-bridge wait \$LAST_SEEN); # analyze and emit feedback; done" &
CODEX_PID=$!
echo "Codex pair agent started with PID: $CODEX_PID"
Store the PID for later cleanup.
Tell the user:
When the user says /pair stop:
Stop the bridge server:
SESSION_ID="$SESSION_ID" pair-bridge stop
If using Codex, kill the background process:
kill $CODEX_PID 2>/dev/null
Summarize the session (activity count, feedback given)
When the user says /pair status:
SESSION_ID="$SESSION_ID" pair-bridge status
Report:
The hooks handle feedback injection automatically:
pair-emit-activity.sh (PostToolUse): Sends your tool calls to the bridgepair-check-feedback.sh (PreToolUse): Shows pair feedback before your next actionWhen the pair spots an issue, you'll see:
<pair-feedback>
PAIR PROGRAMMER FEEDBACK:
This SQL query concatenates user input - use parameterized queries
Location: src/db/queries.ts:45
SEVERITY: HIGH - Address before continuing
</pair-feedback>
User: /pair
Agent: Starting pair programming session...
Session ID: a1b2c3d4
Bridge: /tmp/claude-pair-a1b2c3d4.sock
Backend: opus (Task tool)
[Spawns background Task with pair programmer prompt]
Pair programming active! I'll work on your task while my pair watches for issues.
User: Refactor the auth module to use JWT
Agent: [Reads files, makes edits...]
<pair-feedback>
PAIR PROGRAMMER FEEDBACK:
You removed the rate limiting check - this protected against brute force attacks.
Location: src/auth/login.ts:45
SEVERITY: HIGH - Address before continuing
</pair-feedback>
Agent: Good catch from my pair! Let me restore that rate limiting...
User: /pair stop
Agent: Ending pair programming session...
Duration: 12 minutes
Tool calls observed: 34
Feedback provided: 2 (1 high, 1 medium)
Session ended.