Skip to content
Back to search

ai-pair

AI Pair Collaboration Skill. Coordinate multiple AI models to work together: one creates (Author/Developer), two others review (Codex + Gemini). Works for code, articles, video scripts, and any creative task. Trigger: /ai-pair, ai pair, dev-team, content-team, team-stop

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/axtonliu-ai-pair/badge.svg)](/listings/axtonliu-ai-pair)

HTML

<a href="/listings/axtonliu-ai-pair"><img src="/api/listings/axtonliu-ai-pair/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Option A: Direct Install (Recommended) | 直接安装(推荐)

# Clone to your global Claude Code skills directory
# 克隆到 Claude Code 全局 skills 目录
git clone https://github.com/axtonliu/ai-pair.git ~/.claude/skills/ai-pair

For project-level installation, clone into `.claude/skills/ai-pair` within your project directory instead.

如需项目级安装,克隆到项目目录下的 `.claude/skills/ai-pair`。

Option B: Manual | 手动安装

1. Download `SKILL.md` from this repo | 下载本仓库的 `SKILL.md` 2. Place it in `~/.claude/skills/ai-pair/SKILL.md` | 放到 `~/.claude/skills/ai-pair/SKILL.md` 3. Restart Claude Code | 重启 Claude Code

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 462 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. ---
  2. name: ai-pair
  3. description: |
  4. AI Pair Collaboration Skill. Coordinate multiple AI models to work together:
  5. one creates (Author/Developer), two others review (Codex + Gemini).
  6. Works for code, articles, video scripts, and any creative task.
  7. Trigger: /ai-pair, ai pair, dev-team, content-team, team-stop
  8. metadata:
  9. version: 1.5.0
  10. ---
  11. # AI Pair Collaboration
  12. Coordinate heterogeneous AI teams: one creates, two review from different angles.
  13. Uses Claude Code's native Agent Teams capability with Codex and Gemini as reviewers.
  14. ## Why Multiple AI Reviewers?
  15. Different AI models have fundamentally different review tendencies. They don't just find different bugs — they look at completely different dimensions. Using reviewers from different model families maximizes coverage.
  16. ## Commands
  17. ```bash
  18. /ai-pair dev-team [project] # Start dev team (developer + codex-reviewer + gemini-reviewer)
  19. /ai-pair content-team [topic] # Start content team (author + codex-reviewer + gemini-reviewer)
  20. /ai-pair team-stop # Shut down the team, clean up resources
  21. ```
  22. Examples:
  23. ```bash
  24. /ai-pair dev-team HighlightCut # Dev team for HighlightCut project
  25. /ai-pair content-team AI-Newsletter # Content team for writing AI newsletter
  26. /ai-pair team-stop # Shut down team
  27. ```
  28. ## Prerequisites
  29. - **Claude Code** — Team Lead + agent runtime
  30. - **Codex CLI** (`codex`) — for codex-reviewer
  31. - **Gemini CLI** (`gemini`) — for gemini-reviewer
  32. - Both external CLIs must have authentication configured
  33. ## Team Architecture
  34. ### Dev Team (`/ai-pair dev-team [project]`)
  35. ```
  36. User (Commander)
  37. |
  38. Team Lead (current Claude session)
  39. |-- developer (Claude Code agent) — writes code, implements features
  40. |-- codex-reviewer (Claude Code agent) — via codex CLI
  41. | Focus: bugs, security, concurrency, performance, edge cases
  42. |-- gemini-reviewer (Claude Code agent) — via gemini CLI
  43. Focus: architecture, design patterns, maintainability, alternatives
  44. ```
  45. ### Content Team (`/ai-pair content-team [topic]`)
  46. ```
  47. User (Commander)
  48. |
  49. Team Lead (current Claude session)
  50. |-- author (Claude Code agent) — writes articles, scripts, newsletters
  51. |-- codex-reviewer (Claude Code agent) — via codex CLI
  52. | Focus: logic, accuracy, structure, fact-checking
  53. |-- gemini-reviewer (Claude Code agent) — via gemini CLI
  54. Focus: readability, engagement, style consistency, audience fit
  55. ```
  56. ## Workflow (Semi-Automatic)
  57. Team Lead coordinates the following loop:
  58. 1. **User assigns task** → Team Lead sends to developer/author
  59. 2. **Developer/author completes** → Team Lead shows result to user
  60. 3. **User approves for review** → Team Lead sends to both reviewers in parallel
  61. 4. **Reviewers report back** → Team Lead consolidates and presents:
  62. ```
  63. ## Codex Review
  64. {codex-reviewer feedback summary}
  65. ## Gemini Review
  66. {gemini-reviewer feedback summary}
  67. ```
  68. 5. **User decides** → "Revise" (loop back to step 1) or "Pass" (next task or end)
  69. The user stays in control at every step. No autonomous loops.
  70. ## Project Detection
  71. The project/topic is determined by:
  72. 1. **Explicitly specified** → use as-is
  73. 2. **Current directory is inside a project** → extract project name from path
  74. 3. **Ambiguous** → ask user to choose
  75. ## Team Lead Execution Steps
  76. ### Step 1: Create Team
  77. ```
  78. TeamCreate: team_name = "{project}-dev" or "{topic}-content"
  79. ```
  80. ### Step 2: Create Tasks
  81. Use TaskCreate to set up initial task structure:
  82. 1. "Awaiting task assignment" — for developer/author, status: pending
  83. 2. "Awaiting review" — for codex-reviewer, status: pending, blockedBy task 1
  84. 3. "Awaiting review" — for gemini-reviewer, status: pending, blockedBy task 1
  85. ### Step 3: Pre-flight CLI Check
  86. Before launching agents, verify external CLIs are available:
  87. ```bash
  88. command -v codex && codex --version || echo "CODEX_MISSING"
  89. command -v gemini && gemini --version || echo "GEMINI_MISSING"
  90. ```
  91. If either CLI is missing, warn the user immediately and ask whether to proceed with degraded mode (Claude-only review, clearly labeled) or abort.
  92. ### Step 4: Launch Agents
  93. Launch 3 agents using the Agent tool with `subagent_type: "general-purpose"` and `mode: "bypassPermissions"` (required because reviewers need to execute external CLI commands and read project files).
  94. See Agent Prompt Templates below for each agent's startup prompt.
  95. ### Step 5: Confirm to User
  96. ```
  97. Team ready.
  98. Team: {team_name}
  99. Type: {Dev Team / Content Team}
  100. Members:
  101. - developer/author: ready
  102. - codex-reviewer: ready
  103. - gemini-reviewer: ready
  104. Awaiting your first task.
  105. ```
  106. ## CLI Invocation Protocol (Shared)
  107. All reviewer agents follow this protocol. Team Lead includes it in each reviewer's prompt.
  108. ```
  109. CLI Invocation Protocol:
  110. [Timeout]
  111. - All Bash tool calls to external CLIs MUST set timeout: 600000 (10 minutes).
  112. - External CLIs (codex/gemini) need 10-15 seconds to load skills,
  113. plus model reasoning time. The default 2-minute timeout is far too short.
  114. [Reasoning Level Degradation Retry]
  115. - Codex CLI defaults to xhigh reasoning level.
  116. - If the CLI call times out or fails, retry with degraded reasoning in this order:
  117. 1. First failure → degrade to high: append "Use reasoning effort: high" to prompt
  118. 2. Second failure → degrade to medium: append "Use reasoning effort: medium"
  119. 3. Third failure → degrade to low: append "Use reasoning effort: low"
  120. 4. Fourth failure → Claude fallback analysis (last resort)
  121. - For Gemini CLI: if timeout, append simplified instructions / reduce analysis dimensions.
  122. - Report the current degradation level to team-lead on each retry.
  123. [File-based Content Passing (no pipes)]
  124. - Before calling the CLI, create a unique temp file: REVIEW_FILE=$(mktemp /tmp/review-XXXXXX.txt)
  125. Write content to $REVIEW_FILE. This prevents concurrent tasks from overwriting each other.
  126. - Do NOT pipe long content via stdin (cat $FILE | cli ...) — pipes can truncate, mis-encode, or overflow buffers.
  127. - Instead, reference the file path in the prompt and let the CLI read it:
  128. codex exec "Review the code in $REVIEW_FILE. Focus on ..."
  129. gemini -p "Review the content in $REVIEW_FILE. Focus on ..."
  130. [Error Handling]
  131. - If the CLI command is not found → report "[CLI_NAME] CLI not installed" to team-lead immediately. Do NOT substitute your own review.
  132. - If the CLI returns an error (auth, rate-limit, empty output, non-zero exit code) → report the exact error message and exit code, then follow the degradation retry flow.
  133. - If the CLI output contains ANSI escape codes or garbled characters → set `NO_COLOR=1` before the CLI call or pipe through `cat -v`.
  134. - NEVER silently skip the CLI call.
  135. - Only use Claude fallback after ALL FOUR degradation retries have failed, clearly labeled "[Claude Fallback — [CLI_NAME] four retries all failed]".
  136. [Cleanup]
  137. - Clean up: rm -f $REVIEW_FILE after capturing output.
  138. ```
  139. ## Agent Prompt Templates
  140. ### Developer Agent (Dev Team)
  141. ```
  142. You are the developer in {project}-dev team. You write code.
  143. Project path: {project_path}
  144. Project info: {CLAUDE.md summary if available}
  145. Workflow:
  146. 1. Read relevant files to understand context
  147. 2. Implement the feature / fix the bug / refactor
  148. 3. Report back via SendMessage to team-lead:
  149. - Which files changed
  150. - What you did
  151. - What to watch out for
  152. 4. When receiving reviewer feedback, address items and report again
  153. 5. Stay active for next task
  154. Rules:
  155. - Understand existing code before changing it
  156. - Keep style consistent
  157. - Don't over-engineer
  158. - Ask team-lead via SendMessage if unsure
  159. ```
  160. ### Author Agent (Content Team)
  161. ```
  162. You are the author in {topic}-content team. You write content.
  163. Working directory: {working_directory}
  164. Topic: {topic}
  165. Workflow:
  166. 1. Understand the writing task and reference materials
  167. 2. If style-memory.md exists, read and follow it
  168. 3. Write content following the appropriate format
  169. 4. Report back via SendMessage to team-lead with full content or summary
  170. 5. When receiving reviewer feedback, revise and report again
  171. 6. Stay active for next task
  172. Writing principles:
  173. - Concise and direct
  174. - Clear logic and structure
  175. - Use technical terms appropriately
  176. - Follow style preferences from style-memory.md if available
  177. - Ask team-lead via SendMessage if unsure
  178. ```
  179. ### Codex Reviewer Agent (Dev Team)
  180. ```
  181. You are codex-reviewer in {project}-dev team. Your job is to get CODE REVIEW from the real Codex CLI.
  182. CRITICAL RULE: You MUST use the Bash tool to invoke the `codex` command. You are a dispatcher, NOT a reviewer.
  183. DO NOT review the code yourself. DO NOT role-play as Codex. Your value is that you bring a DIFFERENT model's perspective.
  184. If you skip the CLI call, the entire point of this multi-model team is defeated.
  185. Project path: {project_path}
  186. Review process:
  187. 1. Read relevant code changes using Read/Glob/Grep
  188. 2. Choose review method (by priority):
  189. a. If given a specific commit SHA → use `codex review --commit <SHA>`
  190. b. If reviewing changes against a base branch → use `codex review --base <branch>`
  191. c. If reviewing uncommitted changes → use `codex review --uncommitted`
  192. d. If none of the above apply (e.g. reviewing arbitrary code snippets) → use file passing:
  193. Create temp file: REVIEW_FILE=$(mktemp /tmp/codex-review-XXXXXX.txt)
  194. Write code/diff to $REVIEW_FILE
  195. codex exec "Review the code in $REVIEW_FILE for bugs, security issues, concurrency problems, performance, and edge cases. Be specific about file paths and line numbers." 2>&1
  196. 3. MANDATORY — Use Bash tool to call Codex CLI:
  197. ⚠️ Bash tool MUST set timeout: 600000 (10 minutes)
  198. Prefer `codex review` (dedicated code review command):
  199. codex review --commit {SHA} 2>&1
  200. or codex review --base {branch} 2>&1
  201. or codex review --uncommitted 2>&1
  202. Note: `codex review --base` cannot be combined with a PROMPT argument.
  203. 4. If timeout, follow degradation retry flow (see CLI Invocation Protocol: xhigh → high → medium → low → Claude fallback)
  204. 5. Capture the FULL CLI output. Do not summarize or rewrite it.
  205. 6. If temp file was used: rm -f $REVIEW_FILE
  206. 7. Report to team-lead via SendMessage:
  207. ## Codex Code Review
  208. **Source: Codex CLI [reasoning level]** (or "Source: Claude Fallback — four retries all failed" if all failed)
  209. **Review command**: {actual codex command used}
  210. ### CLI Raw Output
  211. {paste the actual codex CLI output here}
  212. ### Consolidated Assessment
  213. #### CRITICAL (blocking issues)
  214. - {description + file:line + suggested fix}
  215. #### WARNING (important issues)
  216. - {description + suggestion}
  217. #### SUGGESTION (improvements)
  218. - {suggestion}
  219. ### Summary
  220. {one-line quality assessment}
  221. Focus: bugs, security vulnerabilities, concurrency/race conditions, performance, edge cases.
  222. Follow the shared CLI Invocation Protocol (timeout + degradation retry). Stay active for next review task.
  223. ```
  224. ### Codex Reviewer Agent (Content Team)
  225. ```
  226. You are codex-reviewer in {topic}-content team. Your job is to get CONTENT REVIEW from the real Codex CLI.
  227. CRITICAL RULE: You MUST use the Bash tool to invoke the `codex` command. You are a dispatcher, NOT a reviewer.
  228. DO NOT review the content yourself. DO NOT role-play as Codex. Your value is that you bring a DIFFERENT model's perspective.
  229. If you skip the CLI call, the entire point of this multi-model team is defeated.
  230. Review process:
  231. 1. Understand the content and context
  232. 2. Create a unique temp file and write the content to it:
  233. REVIEW_FILE=$(mktemp /tmp/codex-review-XXXXXX.txt)
  234. 3. MANDATORY — Use Bash tool to call Codex CLI (file passing, no pipes):
  235. ⚠️ Bash tool MUST set timeout: 600000 (10 minutes)
  236. codex exec "Review the content in $REVIEW_FILE for logic, accuracy, structure, and fact-checking. Be specific." 2>&1
  237. 4. If timeout, follow degradation retry flow (see CLI Invocation Protocol: xhigh → high → medium → low → Claude fallback)
  238. 5. Capture the FULL CLI output.
  239. 6. Clean up: rm -f $REVIEW_FILE
  240. 7. Report to team-lead via SendMessage:
  241. ## Codex Content Review
  242. **Source: Codex CLI [reasoning level]** (or "Source: Claude Fallback — four retries all failed" if all failed)
  243. ### CLI Raw Output
  244. {paste the actual codex CLI output here}
  245. ### Consolidated Assessment
  246. #### Logic & Accuracy
  247. - {issues or confirmations}
  248. #### Structure & Organization
  249. - {issues or confirmations}
  250. #### Fact-Checking
  251. - {items needing verification}
  252. ### Summary
  253. {one-line assessment}
  254. Focus: logical coherence, factual accuracy, information architecture, technical terminology.
  255. Follow the shared CLI Invocation Protocol (timeout + degradation retry). Stay active for next review task.
  256. ```
  257. ### Gemini Reviewer Agent (Dev Team)
  258. ```
  259. You are gemini-reviewer in {project}-dev team. Your job is to get CODE REVIEW from the real Gemini CLI.
  260. CRITICAL RULE: You MUST use the Bash tool to invoke the `gemini` command. You are a dispatcher, NOT a reviewer.
  261. DO NOT review the code yourself. DO NOT role-play as Gemini. Your value is that you bring a DIFFERENT model's perspective.
  262. If you skip the CLI call, the entire point of this multi-model team is defeated.
  263. Project path: {project_path}
  264. Review process:
  265. 1. Read relevant code changes using Read/Glob/Grep
  266. 2. Create a unique temp file and write the code/diff to it:
  267. REVIEW_FILE=$(mktemp /tmp/gemini-review-XXXXXX.txt)
  268. 3. MANDATORY — Use Bash tool to call Gemini CLI (file passing, no pipes):
  269. ⚠️ Bash tool MUST set timeout: 600000 (10 minutes)
  270. gemini -p "Review the code in $REVIEW_FILE focusing on architecture, design patterns, maintainability, and alternative approaches. Be specific about file paths and line numbers." 2>&1
  271. 4. If timeout, follow degradation retry flow (see CLI Invocation Protocol: simplify prompt → reduce analysis dimensions → Claude fallback)
  272. 5. Capture the FULL CLI output. Do not summarize or rewrite it.
  273. 6. Clean up: rm -f $REVIEW_FILE
  274. 7. Report to team-lead via SendMessage:
  275. ## Gemini Code Review
  276. **Source: Gemini CLI** (or "Source: Claude Fallback — four retries all failed" if all failed)
  277. ### CLI Raw Output
  278. {paste the actual gemini CLI output here}
  279. ### Consolidated Assessment
  280. #### Architecture Issues
  281. - {description + suggestion}
  282. #### Design Patterns
  283. - {appropriate? + alternatives}
  284. #### Maintainability
  285. - {issues or confirmations}
  286. #### Alternative Approaches
  287. - {better implementations if any}
  288. ### Summary
  289. {one-line assessment}
  290. Focus: architecture, design patterns, maintainability, alternative implementations.
  291. Follow the shared CLI Invocation Protocol (timeout + degradation retry). Stay active for next review task.
  292. ```
  293. ### Gemini Reviewer Agent (Content Team)
  294. ```
  295. You are gemini-reviewer in {topic}-content team. Your job is to get CONTENT REVIEW from the real Gemini CLI.
  296. CRITICAL RULE: You MUST use the Bash tool to invoke the `gemini` command. You are a dispatcher, NOT a reviewer.
  297. DO NOT review the content yourself. DO NOT role-play as Gemini. Your value is that you bring a DIFFERENT model's perspective.
  298. If you skip the CLI call, the entire point of this multi-model team is defeated.
  299. Review process:
  300. 1. Understand the content and context
  301. 2. Create a unique temp file and write the content to it:
  302. REVIEW_FILE=$(mktemp /tmp/gemini-review-XXXXXX.txt)
  303. 3. MANDATORY — Use Bash tool to call Gemini CLI (file passing, no pipes):
  304. ⚠️ Bash tool MUST set timeout: 600000 (10 minutes)
  305. gemini -p "Review the content in $REVIEW_FILE for readability, engagement, style consistency, and audience fit. Be specific." 2>&1
  306. 4. If timeout, follow degradation retry flow (see CLI Invocation Protocol: simplify prompt → reduce analysis dimensions → Claude fallback)
  307. 5. Capture the FULL CLI output.
  308. 6. Clean up: rm -f $REVIEW_FILE
  309. 7. Report to team-lead via SendMessage:
  310. ## Gemini Content Review
  311. **Source: Gemini CLI** (or "Source: Claude Fallback — four retries all failed" if all failed)
  312. ### CLI Raw Output
  313. {paste the actual gemini CLI output here}
  314. ### Consolidated Assessment
  315. #### Readability & Flow
  316. - {issues or confirmations}
  317. #### Engagement & Hook
  318. - {issues or suggestions}
  319. #### Style Consistency
  320. - {consistent? + specific deviations}
  321. #### Audience Fit
  322. - {appropriate? + adjustment suggestions}
  323. ### Summary
  324. {one-line assessment}
  325. Focus: readability, content appeal, style consistency, target audience fit.
  326. Follow the shared CLI Invocation Protocol (timeout + degradation retry). Stay active for next review task.
  327. ```
  328. ## team-stop Flow
  329. When user calls `/ai-pair team-stop` or chooses "end" in the workflow:
  330. 1. Send `shutdown_request` to all agents
  331. 2. Wait for all agents to confirm shutdown
  332. 3. Call `TeamDelete` to clean up team resources
  333. 4. Output:
  334. ```
  335. Team shut down.
  336. Closed members: developer/author, codex-reviewer, gemini-reviewer
  337. Resources cleaned up.
  338. ```
README.md · README · 218 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # AI-Pair: Heterogeneous AI Team Collaboration
  2. # AI-Pair:异构 AI 团队协作
  3. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  4. [![Status: Experimental](https://img.shields.io/badge/Status-Experimental-orange.svg)](#status)
  5. [![Claude Code Skill](https://img.shields.io/badge/Claude%20Code-Skill-blue)](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/skills)
  6. Coordinate multiple AI models to work together as a team. One creates, two review — not for redundancy, but because different models naturally focus on different dimensions.
  7. 让不同 AI 模型组成团队协作。一个创作,两个审查 — 不是为了冗余,而是因为不同模型天然关注不同维度。
  8. > **Next Step:** Want to turn Skills from demo to asset? Check out [Agent Skills Resource Library](https://www.axtonliu.ai/agent-skills) (includes slides, PDF, diagnostics)
  9. ## Status
  10. > **Status: Experimental | 状态:实验性**
  11. >
  12. > - This is a public prototype that works for real workflows, but does not yet cover all edge cases. | 公开原型,可用于实际工作流,但未覆盖所有边界情况。
  13. > - Requires Claude Code + Codex CLI + Gemini CLI
  14. > - My primary focus is demonstrating how tools and systems work together, not maintaining this codebase. | 重点是展示工具和系统如何协作,而非维护这个代码库。
  15. > - If you encounter issues, please submit a reproducible case (input + output + steps to reproduce). | 如遇问题,请提交可复现的案例。
  16. ## Why This Exists | 为什么做这个
  17. Most people use multiple AI subscriptions by asking the same question to each and comparing answers. That's useful sometimes, but it only uses one dimension of what different models can do — you get multiple answers to the same question, instead of multiple perspectives on the same work.
  18. 大部分人用多个 AI 的方式是:同一个问题分别问一遍,然后对比答案。这有时候有用,但只用到了不同模型能力的一个维度 — 你得到的是同一个问题的多个回答,而不是同一份工作的多个视角。
  19. AI-Pair turns model differences into a structured workflow: assign each model a role that matches its strength, and let them review the same work from different angles. It's a [Claude Code Skill](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/skills) — a reusable instruction set that extends Claude Code's capabilities.
  20. AI-Pair 把模型差异变成结构化的工作流:给每个模型分配匹配其特长的角色,让它们从不同角度审查同一份工作。它是一个 [Claude Code Skill](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/skills) — 一组可复用的指令,扩展 Claude Code 的能力。
  21. ## How It Works | 工作原理
  22. ```
  23. User (you) | 用户(你)
  24. |
  25. Team Lead (Claude Code session) | 团队领导(Claude Code 会话)
  26. |-- creator (Claude Code agent) — writes code or content | 创作者 — 写代码或内容
  27. |-- codex-reviewer (agent → Codex CLI) — analytical review | 分析型审查
  28. |-- gemini-reviewer (agent → Gemini CLI) — editorial review | 编辑型审查
  29. ```
  30. The workflow is semi-automatic — you stay in control at every step:
  31. 工作流是半自动的 — 每一步你都保持控制权:
  32. 1. You assign a task → creator executes | 你下达任务 → 创作者执行
  33. 2. Creator reports back → you decide whether to send for review | 创作者回报 → 你决定是否送审
  34. 3. Both reviewers analyze in parallel → consolidated report | 两个审查者并行分析 → 汇总报告
  35. 4. You decide: revise or pass → loop or next task | 你决定:修改还是通过 → 循环或下一个任务
  36. ## Prerequisites | 前置条件
  37. All three are **command-line tools** that run in your terminal (Terminal, iTerm2, etc.), not desktop apps.
  38. 三个都是**命令行工具**,在终端中运行(Terminal、iTerm2 等),不是桌面应用。
  39. | Tool | Purpose | Install |
  40. |------|---------|---------|
  41. | [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) | Team Lead + agent runtime | `npm install -g @anthropic-ai/claude-code` |
  42. | [Codex CLI](https://github.com/openai/codex) | GPT-powered reviewer | `npm install -g @openai/codex` |
  43. | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Gemini-powered reviewer | `npm install -g @google/gemini-cli` |
  44. All three CLIs must have authentication configured before use.
  45. 三个 CLI 使用前都需要配置好认证。
  46. > **Quick check | 快速检查:** Run `claude --version`, `codex --version`, and `gemini --version` to verify all three are installed.
  47. ## Installation | 安装
  48. ### Option A: Direct Install (Recommended) | 直接安装(推荐)
  49. ```bash
  50. # Clone to your global Claude Code skills directory
  51. # 克隆到 Claude Code 全局 skills 目录
  52. git clone https://github.com/axtonliu/ai-pair.git ~/.claude/skills/ai-pair
  53. ```
  54. For project-level installation, clone into `.claude/skills/ai-pair` within your project directory instead.
  55. 如需项目级安装,克隆到项目目录下的 `.claude/skills/ai-pair`。
  56. ### Option B: Manual | 手动安装
  57. 1. Download `SKILL.md` from this repo | 下载本仓库的 `SKILL.md`
  58. 2. Place it in `~/.claude/skills/ai-pair/SKILL.md` | 放到 `~/.claude/skills/ai-pair/SKILL.md`
  59. 3. Restart Claude Code | 重启 Claude Code
  60. ## Usage | 使用
  61. ### Dev Team — for code, bugs, refactoring | 开发团队 — 写代码、修 bug、重构
  62. ```bash
  63. /ai-pair dev-team MyProject
  64. ```
  65. Team Lead creates | 团队领导创建:
  66. - **developer** — writes code | 写代码
  67. - **codex-reviewer** — checks bugs, security, performance, edge cases | 审查 bug、安全、性能、边界条件
  68. - **gemini-reviewer** — checks architecture, design patterns, maintainability | 审查架构、设计模式、可维护性
  69. ### Content Team — for articles, scripts, newsletters | 内容团队 — 写文章、脚本、Newsletter
  70. ```bash
  71. /ai-pair content-team AI-Newsletter
  72. ```
  73. Team Lead creates | 团队领导创建:
  74. - **author** — writes content | 写内容
  75. - **codex-reviewer** — checks logic, accuracy, structure, fact-checking | 审查逻辑、准确性、结构、事实核查
  76. - **gemini-reviewer** — checks readability, engagement, style, audience fit | 审查可读性、吸引力、风格、受众适配
  77. ### Stop Team | 关闭团队
  78. ```bash
  79. /ai-pair team-stop
  80. ```
  81. ## Real-World Example | 真实案例
  82. We used `content-team` to review a newsletter article. The three AIs found completely different issues:
  83. 我们用 `content-team` 审查了一篇 Newsletter 文章。三个 AI 发现的问题完全不同:
  84. - **Claude** (Team Lead): spotted an overreach in interpreting a cited source | 发现对引用来源的过度解读
  85. - **GPT** (Codex): dissected the argument chain and challenged a logical leap | 拆解论证链,质疑逻辑跳跃
  86. - **Gemini**: suggested the opening was too academic for the target audience | 建议开头对目标读者来说太学术化
  87. None of these overlapped. That's the point. See [`examples/`](examples/) for step-by-step walkthrough scenarios.
  88. 三者零重叠。这就是意义所在。查看 [`examples/`](examples/) 获取分步演示场景。
  89. ## File Structure | 文件结构
  90. ```
  91. ai-pair/
  92. ├── SKILL.md # Claude Code skill definition | Skill 定义文件
  93. ├── README.md # This file | 本文件
  94. ├── LICENSE # MIT
  95. └── examples/ # Usage examples | 使用示例
  96. ├── dev-team.md
  97. └── content-team.md
  98. ```
  99. ## Troubleshooting | 常见问题
  100. ### Reviewers not actually calling Codex/Gemini CLI | 审查者没有真正调用 Codex/Gemini CLI
  101. **Symptom:** Reviews complete but only Claude Code's usage decreases; Codex/Gemini CLI usage stays flat. The sub-agents are role-playing as Codex/Gemini instead of actually invoking them.
  102. **症状:** 审查完成但只有 Claude Code 的用量在下降;Codex/Gemini CLI 用量没有任何变化。Sub-agent 在角色扮演而非真正调用外部 CLI。
  103. **How to verify | 如何验证:** Check the review output for the `**Source: Codex CLI**` / `**Source: Gemini CLI**` label and the `### CLI Raw Output` section. If these are missing, the CLI was not called.
  104. **如何验证:** 检查审查输出中是否有 `**Source: Codex CLI**` / `**Source: Gemini CLI**` 标签和 `### CLI Raw Output` 部分。如果缺失,说明 CLI 没有被调用。
  105. **Fix | 解决方案:** This was addressed in v1.1.0 with mandatory CLI invocation rules. If you're on an older version, update your SKILL.md. If the issue persists, ensure both CLIs are installed and authenticated (`codex --version`, `gemini --version`).
  106. **解决方案:** 此问题已在 v1.1.0 中通过强制 CLI 调用规则修复。如果你使用旧版本,请更新 SKILL.md。如果问题仍然存在,确认两个 CLI 都已安装并完成认证(`codex --version`、`gemini --version`)。
  107. ## What's Not Included | 未包含的功能
  108. This open-source version includes the **Agent Teams mode** only. The full private version also has:
  109. 开源版仅包含 **Agent Teams 模式**。完整私有版还包括:
  110. - **Manual mode** — two CLI instances communicating via shared file | 手动模式 — 两个 CLI 通过共享文件通信
  111. - **iTerm2 orchestration** — automated Author/Reviewer relay with file watchers | iTerm2 编排 — 自动化的创作/审查中继
  112. These require specific local setup and are maintained separately.
  113. 这些需要特定的本地配置,单独维护。
  114. ## Evolution | 演变
  115. AI-Pair evolved from [AI Roundtable](https://github.com/axtonliu/ai-roundtable), a Chrome extension that lets multiple AI web interfaces discuss and cross-review in the same panel. AI-Pair moves this concept to the command line with structured role assignments, making it more practical for daily workflows.
  116. AI-Pair 从 [AI Roundtable](https://github.com/axtonliu/ai-roundtable) 演变而来。AI Roundtable 是一个 Chrome 扩展,让多个 AI 的网页版在同一个面板里讨论和互评。AI-Pair 把这个概念搬到了命令行,加入了结构化的角色分工,更适合日常工作流。
  117. ## Contributing | 贡献
  118. Contributions welcome (low-maintenance project):
  119. 欢迎贡献(低维护项目):
  120. - Reproducible bug reports (input + output + steps + environment) | 可复现的 bug 报告
  121. - Documentation improvements | 文档改进
  122. - Small PRs (fixes/docs) | 小型 PR(修复/文档)
  123. > **Note:** Feature requests may not be acted on due to limited maintenance capacity. | 功能需求可能因维护精力有限而无法响应。
  124. ## License | 许可证
  125. [MIT](LICENSE) - Axton Liu
  126. ---
  127. ## Author | 作者
  128. **Axton Liu** — AI Educator & Creator
  129. - Website: [axtonliu.ai](https://www.axtonliu.ai)
  130. - YouTube: [@AxtonLiu](https://youtube.com/@AxtonLiu)
  131. - Twitter/X: [@axtonliu](https://x.com/axtonliu)
  132. ### Learn More
  133. - [MAPS™ AI Agent Course](https://www.axtonliu.ai/aiagent) - Systematic AI agent skills training
  134. - [Claude Skills: A Systematic Guide](https://www.axtonliu.ai/newsletters/ai-2/posts/claude-agent-skills-maps-framework) - Complete methodology
  135. - [AI Elite Weekly Newsletter](https://www.axtonliu.ai/newsletters/ai-2) - Weekly AI insights
  136. - [Free AI Course](https://www.axtonliu.ai/axton-free-course) - Get started with AI
  137. ---
  138. © AXTONLIU™ & AI 精英学院™ 版权所有

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.