From agentic-peer-review
Iterative AI peer review that finds and fixes issues in your codebase. TRIGGER when: user asks for a code review, second opinion, or audit; user says 'review this', 'check my code', 'peer review'; after completing a large feature or refactor.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agentic-peer-review:peer-reviewThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Runs an external AI agent to audit the codebase, then fixes the findings in the current session. Repeats for the specified number of rounds.
Runs an external AI agent to audit the codebase, then fixes the findings in the current session. Repeats for the specified number of rounds.
Usage: /peer-review [-h/--help] [-V/--version] [--agent claude|codex|gemini] [--max-rounds N] [--focus ] [--only ] [--skip ] [--timeout ] [--worktree] [--log ] ["instructions"]
Examples: /peer-review /peer-review --agent codex --max-rounds 3 /peer-review --only bugs,security --max-rounds 2 /peer-review --agent claude --max-rounds 2 "Check auth for SQL injection" /peer-review --focus src/api/ --max-rounds 1 /peer-review --worktree --log review.md --max-rounds 3
CRITICAL: All script output (settings box, round headers, findings, diffs, summary box) MUST be printed as your direct text response to the user. Do NOT leave output collapsed inside Bash tool results. After running a script that produces user-facing output, read the output and print it as text in your response. This ensures the user sees everything without needing to expand collapsed tool results.
Run the init command with the user's arguments:
peer-review-cli init $ARGUMENTS
If --help or --version was passed, this prints plain text (not JSON) and exits. Print the output to the user and stop.
Otherwise, this prints the settings box followed by a JSON object on the last line. If the JSON "error" field is true, print the "message" to the user and stop.
Print the settings box output as your direct text response. Extract these values from the JSON line:
If --worktree is active, use working_dir (the worktree path) for all subsequent file reads and edits.
For each round (1 through max_rounds):
Run the review for this round. This prints the round header, builds the audit prompt, and invokes the agent — all in one command:
peer-review-cli review-round
--agent
--timeout
--language
--working-dir <working_dir>
--checks
--round-num
--total-rounds
[--framework ]
[--instructions ""]
[--focus ""]
All values come from step 1. Prior fixes, skipped findings, elapsed time, and the round header are handled automatically from the session change log.
Print the round header from stderr as your direct text response.
If the command fails (non-zero exit, e.g. timeout), print the error and continue to the next round. Do not stop the loop — prior rounds may have produced useful fixes.
Print the raw findings from the agent as your direct text response. Do not soften, filter, or editorialize.
If the agent returned no findings or explicitly said no issues were found, print "No issues found — review complete." and stop the loop early.
Go through each finding from the review and fix it:
If --worktree is active, all file paths for reads and edits must use the worktree directory.
After fixing, print a brief summary of what was fixed and what was skipped (with reasons for skipping).
The change log tracks all fixes and skipped findings across rounds automatically — render-prompt reads them from the session log for subsequent rounds.
Record the round's findings, fixes, and skipped items. Each command takes --round-num and auto-creates the round if needed.
For each finding from the review agent:
peer-review-cli change-log add-finding --round-num N --id rNfM --file --line --severity --category --description ""
For each fix you made:
peer-review-cli change-log add-fix --round-num N --finding-id rNfM --file --what-changed "" --why ""
For each finding you skipped:
peer-review-cli change-log add-skip --round-num N --finding-id rNfM --file --severity --reason ""
Finding IDs use the format "rNfM" (e.g. "r1f1" for round 1, finding 1).
If --worktree is active, commit this round's fixes in the worktree. Write a commit message with the prefix "agentic-peer-review:" followed by a concise summary of what was fixed in this round (e.g. "agentic-peer-review: fix SQL injection in login query and add input validation"):
peer-review-cli worktree commit <worktree_path> --message "agentic-peer-review (round N/M):
If "committed" is false, no changes were made this round.
If there are more rounds remaining, print: "Proceeding to next round..."
Capture the diff. For worktree mode, diff against baseline_sha to show only the fixes, not the synced baseline. For non-worktree mode, diff against base_commit. Both values come from step 1:
peer-review-cli git-diff <working_dir> <baseline_sha or base_commit>
If the diff is non-empty:
If the diff is empty, print "No files were modified."
If --worktree was used:
Ask the user using AskUserQuestion whether to merge the changes shown in the diff into their working tree.
If yes: apply the per-round commits to the original working directory. Each round becomes a separate commit. Uncommitted changes are stashed during merge and restored after:
peer-review-cli worktree merge <worktree_path> <baseline_sha>
If the result contains a "stash_warning", print it to the user.
peer-review-cli worktree teardown <worktree_path> <branch_name>
Finalize the session and print the summary box. If --log was specified, pass it to render the markdown log:
peer-review-cli finalize [--log <log_path>]
Print the summary box output as your direct text response.
npx claudepluginhub gideonshaked/agentic-peer-review --plugin agentic-peer-reviewRuns cross-LLM iterative code reviews with Codex or Gemini CLI peers, applying accepted fixes until consensus on improved code and report.
Reviews code changes using parallel personas for correctness, testing, maintainability, and conditional areas like security, performance, APIs. Merges into P0-P3 severity reports for PR prep and iterative feedback.
Runs cross-model code reviews using the external Codex CLI tool from a Claude session. Catches bugs that single-model self-review would miss by leveraging a different reviewer architecture.