debug
Investigation-first debugging — gather evidence, form confirmed root-cause hypothesis, hand off to fix mode with diagnosis file. TRIGGER when: user reports a…
Close PRs at an evidence gate or review local diffs/PRs with specialists and JSON artifacts.
$ npx -y skills add Borda/AI-Rig --skill code-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/code-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Close PRs at an evidence gate or review local diffs/PRs with specialists and JSON artifacts.
name: code-review description: Close PRs at an evidence gate or review local diffs/PRs with specialists and JSON artifacts.
> Before asking, read [User Questions](../../shared/native-skill-contract.md#user-questions).
For an authorized review-and-fix cycle, read `../../shared/adversarial-loop.md` for convergence and stop rules. A review-only request remains read-only; a clean loop does not replace this skill's evidence, artifact, and completion/discovery gates.
Run tiered review with strict output gates.
{
"scope": "optional working-tree|path|commit|pr; infer pr for bare number, #number, or PR URL",
"target": "optional path, commit ref, PR number, PR URL, or current branch PR",
"approve_gh": "optional boolean; default false; --approve-gh means the user has already approved required GitHub operations; use managed host preapproval to run without another prompt",
"done_when": "blocking issues are identified with gate decision"
}Input shorthand:
Never write to remote. PR scope may update local checkout to PR head; otherwise read-only except run-directory artifacts defined below. Never pass `--force` to `git` or `gh`; if forced checkout seems needed to align local branch and PR head, stop, explain overwrite risk, and ask before retrying. To fix findings, switch to `code-remediate` after creating review artifact.
For `--approve-gh`, apply [Managed Host Preapproval](../../shared/native-skill-contract.md#managed-host-preapproval) to the helper actually used. Reuse the loaded matching host allow rule and execute directly; do not introduce a workflow confirmation or a wrapper that breaks matching. Diagnose unexpected prompts with the exact command and applicable rules. Missing or stricter host permissions remain authoritative.
Run `create_run.py --skill code-review` per `../../shared/helper-cli-contract.md` and retain its printed timestamped path literally. A local review keeps that path for its complete lifecycle. A PR review begins there because current-branch input may not identify PR before collection.
For local scopes, inspect `python PLUGIN_ROOT/shared/collect_diff.py --help`; collect normalized `scope`, optional `target`, and literal `<run-directory>` path.
For PR scope, inspect `python PLUGIN_ROOT/shared/collect_pr.py --help`; collect exact target into literal `<run-directory>` path with `--checkout --checkout-mode review`.
When `approve_gh=true`, treat required GitHub operations as already approved by the user. Do not ask for another workflow confirmation. Apply [PR Collection Preapproval](../../shared/native-skill-contract.md#pr-collection-preapproval) before collector execution, including the direct command and exact PR URL prefix. Do not create or modify runtime approval rules files.
After successful authoritative `pr.json` collection, run `create_run.py --skill code-review --promote-pr-run <run-directory>` and capture its single printed final path. The promotion derives the authoritative PR number from `pr.json`, allocates `.reports/codex/code-review/pr-<number>/run-<NNN>/`, and moves the complete run without overwriting another run. Use the printed promoted path literally for every later helper, artifact, specialist context, result, and final handoff. Never reconstruct the numbered path or keep writing to the temporary path.
If collection fails before authoritative PR identity exists, keep the timestamped run as an unavailable diagnostic. It is not an assessed PR review and must not be promoted. Existing flat timestamped runs remain discoverable historical artifacts; do not migrate them.
In runtimes with network sandboxing, execute the complete collector command with approved external network access from its first attempt under `../../shared/native-skill-contract.md`. Before requesting it, state:
Practical agent workflows for Python, ML, and open-source maintenance. AI-Rig turns recurring work—scoping a change, reproducing a bug, reviewing a pull request, running an experiment, or checking release readiness—into explicit workflows with specialist
Repo: Borda/AI-Rig
Investigation-first debugging — gather evidence, form confirmed root-cause hypothesis, hand off to fix mode with diagnosis file. TRIGGER when: user reports a…
TDD-first feature development — crystallise API as a demo test, drive implementation to pass it, run quality stack and progressive review loop. TRIGGER when:…
Reproduce-first bug resolution — capture bug in failing regression test, apply minimal fix, run quality stack and review loop. TRIGGER when: user reports a…
Analysis-only planning — classify and scope a task without writing code; outputs a structured plan to .plans/active/. TRIGGER when: user wants to understand…
Test-first refactoring — audit coverage, add characterization tests, apply changes with safety net, run quality stack and review loop. TRIGGER when: user wants…
Multi-agent code review of local Python files, directories, or the current git diff covering architecture, tests, performance, docs, lint, security, and API…