From cbc599a5b8c9b2b900f650d317b2a2cbe5796d15 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 3 Jan 2026 00:24:34 +0000 Subject: [PATCH] coding-agent: add batch PR review pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tonight's learnings: - Parallel Codex army for batch PR reviews - Fetch PR refs: git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*' - Use git diff origin/main...origin/pr/XX (don't checkout) - Post results with gh pr comment - Successfully reviewed 13 PRs in parallel! 🦞 --- skills/coding-agent/SKILL.md | 39 ++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/skills/coding-agent/SKILL.md b/skills/coding-agent/SKILL.md index 9a8a75f2c..f3e0bf9d8 100644 --- a/skills/coding-agent/SKILL.md +++ b/skills/coding-agent/SKILL.md @@ -36,36 +36,40 @@ process action:kill sessionId:XXX **Model:** `gpt-5.2-codex` is the default (set in ~/.codex/config.toml) -**Reasoning effort:** Choose based on task complexity: -- `medium` — most tasks (default) -- `high` — complex/architectural tasks - ### Building/Creating (use --full-auto) ```bash bash workdir:~/project background:true command:"codex exec --full-auto \"Build a snake game with dark theme\"" ``` -### Reviewing (vanilla, no flags needed) +### Reviewing PRs (vanilla, no flags) ```bash -bash workdir:~/project background:true command:"codex exec \"Review PR #115. Run git diff origin/main...origin/pr/115 to see changes.\"" +bash workdir:~/project background:true command:"codex exec \"Review PR #115. Use: git diff origin/main...origin/pr/115\"" ``` -### Running Multiple Codex Processes -You can run many Codex processes in parallel! Each gets its own session: +### Batch PR Reviews (parallel army!) ```bash -# Start multiple reviews -bash workdir:~/project background:true command:"codex exec \"Review PR #1\"" -bash workdir:~/project background:true command:"codex exec \"Review PR #2\"" -bash workdir:~/project background:true command:"codex exec \"Review PR #3\"" +# Fetch all PR refs first +git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*' -# Check all running +# Deploy the army - one Codex per PR! +bash workdir:~/project background:true command:"codex exec \"Review PR #86. git diff origin/main...origin/pr/86\"" +bash workdir:~/project background:true command:"codex exec \"Review PR #87. git diff origin/main...origin/pr/87\"" +bash workdir:~/project background:true command:"codex exec \"Review PR #95. git diff origin/main...origin/pr/95\"" +# ... repeat for all PRs + +# Monitor all process action:list + +# Get results and post to GitHub +process action:log sessionId:XXX +gh pr comment --body "" ``` -### PR Review Tips -- Fetch PR refs first: `git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'` -- Tell Codex to use: `git diff origin/main...origin/pr/XX` -- Don't let it checkout branches (conflicts with parallel reviews) +### Tips for PR Reviews +- **Fetch refs first:** `git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'` +- **Use git diff:** Tell Codex to use `git diff origin/main...origin/pr/XX` +- **Don't checkout:** Multiple parallel reviews = don't let them change branches +- **Post results:** Use `gh pr comment` to post reviews to GitHub --- @@ -92,3 +96,4 @@ bash workdir:~/project background:true command:"opencode run \"Your task\"" 3. **Monitor with process:log** — check progress without interfering 4. **--full-auto for building** — auto-approves changes 5. **vanilla for reviewing** — no special flags needed +6. **Parallel is OK** — run many Codex processes at once for batch work