pair

A pair-programming command that makes the developer and coding agent work through a task together. Pair programming means discussing the work, agreeing on decisions, and implementing it step by step with regular confirmation.

In plain words
What is it for?
Use it for learning a technology, design discussions, code reviews, complex debugging, requirement clarification, database migrations, or production deployment. It helps confirm the task, choose an approach, implement incrementally, and review each important step.
Why use it?
It reduces the risk of misunderstandings when the task is unfamiliar, sensitive, or has unclear boundaries. The developer stays involved in architecture choices, implementation direction, debugging, and review.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/xiaobei930/cc-best/pair
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,826 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.01826
Opus 5 $0.00005 $0.00913
Sonnet 5 $0.00002 $0.00365
Haiku 4.5 $0.00001 $0.00183

Measured 2d ago against content hash 1ba4b3d56f9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pair scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/pair.md · 260 lines

How it starts

The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/pair - 结对编程模式

核心理念: 人机协作,每个关键节点确认后再继续。

与 /cc-best:iterate 的区别

维度 /cc-best:pair /cc-best:iterate
决策方式 询问用户确认 自主推断
用户参与 持续参与 仅在阻塞时
适用场景 学习、讨论、敏感操作 明确任务的批量执行
风险控制 高(每步确认) 中(事后检查)

适用场景

推荐使用 /cc-best:pair

  • 🎓 学习新技术 - 需要理解每个步骤
  • 💬 设计讨论 - 架构决策需要权衡
  • ⚠️ 敏感操作 - 数据库迁移、生产部署
  • 🔍 代码审查 - 需要解释和讨论
  • 🐛 复杂调试 - 需要人工判断方向
  • 📝 需求澄清 - 边界不清晰的任务

推荐使用 /cc-best:iterate

  • ✅ 任务清单明确
  • ✅ 完成标准清晰
  • ✅ 风险可控
  • ✅ 不需要频繁决策

工作流程

┌─────────────────────────────────────────────────────────────────┐
│                     结对编程工作流                               │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  1. 理解任务                                                    │
│     └─ 读取需求 → 向用户确认理解是否正确                         │
│                                                                 │
│  2. 方案设计                                                    │
│     └─ 提出方案 → 询问用户选择 → 确认后继续                      │
│                                                                 │
│  3. 逐步实现                                                    │
│     └─ 每个关键步骤 → 展示计划 → 确认后执行                      │
│                                                                 │
│  4. 验证结果                                                    │
│     └─ 展示结果 → 询问是否满意 → 调整或继续                      │
│                                                                 │
│  5. 总结提交                                                    │
│     └─ 总结变更 → 确认提交信息 → 执行提交                        │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

确认节点

必须确认的节点

节点 确认内容 示例问题
需求理解 理解是否正确 "我理解你需要...,对吗?"
方案选择 多个方案时 "方案 A/B/C,你倾向哪个?"
破坏性操作 删除、重置等 "即将删除 X,确认吗?"
外部调用 API、数据库 "即将调用生产 API,确认吗?"
提交代码 commit 内容 "提交信息:...,确认吗?"

Read the full file on GitHub · 260 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 260 lines · 10 tokens per session scan A 1ba4b3d56f9e

Subscribe to this mod's changes

pair is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 10 tokens to every session and 1,826 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.