with one click
local-ultra-review
// Use when the user explicitly asks for a deep local code review, PR review, bug hunt, pre-merge review, or Ultra Review style review with high confidence findings.
// Use when the user explicitly asks for a deep local code review, PR review, bug hunt, pre-merge review, or Ultra Review style review with high confidence findings.
Use when the user asks to triage GitHub issues, prioritize backlog work, decide which issues are still valid, or generate delegation-ready issue briefs for coding agents.
Create and run a post-PR review loop for a ready-for-review GitHub pull request. Use when the user asks Codex or Claude Code to watch, loop on, monitor, periodically check, or automatically handle PR review feedback after a PR has been opened. In Codex, the default behavior is to create a 10-minute heartbeat automation first, not to perform an ordinary one-off fix; only execute the review/fix iteration when the skill is invoked by that automation or the user explicitly asks for one immediate pass.
Use when discussing early product ideas, AI or Agent product directions, market observations, MVP scope, wedge markets, non-consensus opportunities, or when the user wants direct red-team critique before architecture.
Route image generation to the local image2-with-codex HTTP service at http://127.0.0.1:4312, which delegates to the user's Codex CLI. Use only when the user explicitly asks for this route. Default behavior is raw prompt pass-through; do not substitute HTML layout, infographic tooling, or other image tools.
Systematic root-cause debugging. Use when: diagnosing bugs, investigating failures, debugging flaky tests, tracing unexpected behavior. Triggers on: '/investigate', 'debug this', 'why is this failing', 'find the root cause', 'flaky test'.
Independent second-opinion code review using Codex CLI. Use when: wanting an external AI reviewer's perspective, cross-validating before push, getting a second pair of eyes. Triggers on: '/peer-review', 'codex review', 'second opinion', 'peer review my changes'.
| name | local-ultra-review |
| description | Use when the user explicitly asks for a deep local code review, PR review, bug hunt, pre-merge review, or Ultra Review style review with high confidence findings. |
| disable-model-invocation | true |
| arguments | ["target","mode"] |
Run a local Ultra Review style code review. The goal is to find real bugs introduced or worsened by the target diff, with low false positives.
This skill is read-only. Do not modify product code, commit, push, or apply fixes.
Invocation examples:
/local-ultra-review/local-ultra-review origin/main/local-ultra-review HEAD~3..HEAD/local-ultra-review pr 123/local-ultra-review https://github.com/org/repo/pull/123/local-ultra-review --base origin/main --mode deep/local-ultra-review pr 123 --post summary/local-ultra-review pr 123 --post review/local-ultra-review pr 123 --keep-worktreeIf no target is provided, review the current branch against the default base branch and include staged and unstaged tracked changes.
If the target is a GitHub PR, default to deep mode, collect PR metadata, review the PR head in an isolated worktree, and render a GitHub-ready summary comment. If the user provides a full GitHub PR URL for the current checkout's origin repository, post mode defaults to review; otherwise do not post unless the user passes --post summary or --post review. --post none always disables posting.
Modes:
light: correctness, security/integration, and tests/verificationdeep: default, five reviewer lenses plus verificationmax: broader review for large or high-risk changesGitHub output:
--post none: default for local branches, ranges, PR numbers, and non-current-repo PR URLs; write local artifacts only--post summary: post one top-level PR summary comment after verification and report rendering--post review: create one GitHub PR review event with CodeRabbit-style inline comments for verified findings that map to diff-commentable right-side lines; list verified findings that cannot be placed inline in the review bodyWorktree lifecycle:
.local-ultra-review/<session-id>/, then remove the temporary worktree after report generation and any selected GitHub posting succeeds.--keep-worktree: preserve the temporary worktree for debugging..local-ultra-review/worktrees/<session-id>/ for review workspaces..local-ultra-review/ to the repository-local git exclude (.git/info/exclude), not to the tracked project .gitignore, unless the user explicitly asks for a repository file change..env, credentials, private keys, tokens, gitignored secrets, or local database config unless the user explicitly allows it.gh for metadata, checkout, or the selected post mode.file:line.Needs manual review or omit it.config/default.yaml: default review behavior and safety settings.config/severity.yaml: local severity definitions.config/ignore.yaml: default low-value path and rule exclusions.prompts/00-review-contract.md: shared finding bar for all reviewers.prompts/01-impact-mapper.md: impact map prompt; does not produce findings.prompts/02-*.md through 06-*.md: reviewer lens prompts.prompts/07-verifier.md: required verification pass.prompts/08-dedupe-ranker.md: dedupe and severity ranking rules.prompts/09-final-report.md: final report instructions.schemas/*.schema.json: review bundle and finding schemas.scripts/*.sh and scripts/*.py: optional local automation.templates/*.j2: report and comment templates.Load only the supporting files needed for the current phase.
Run:
bash ${CLAUDE_SKILL_DIR}/scripts/preflight.sh "$ARGUMENTS"
If the script is unavailable, manually inspect:
REVIEW.md, AGENTS.md, CLAUDE.md, README.md, or equivalent instructionsStop only if the target cannot be determined or the directory is not a git repository.
Run:
bash ${CLAUDE_SKILL_DIR}/scripts/detect-target.sh "$ARGUMENTS"
If no argument is provided, use current branch versus the detected default base and include staged and unstaged tracked changes.
For branch or working-tree targets, run:
bash ${CLAUDE_SKILL_DIR}/scripts/prepare-worktree.sh --base <base-ref>
For GitHub PR targets, first collect PR metadata and then prepare the PR worktree:
python3 ${CLAUDE_SKILL_DIR}/scripts/collect-pr-context.py \
--pr <pr-number-or-url> \
--repo <owner/repo-if-known> \
--out .local-ultra-review/<session-id>/pr-context.json
bash ${CLAUDE_SKILL_DIR}/scripts/prepare-pr-worktree.sh \
--pr <pr-number-or-url> \
--repo <owner/repo-if-known> \
--base <pr-base-ref-name> \
--session-id <session-id>
Expected behavior:
.local-ultra-review/<session-id>/..local-ultra-review/worktrees/<session-id>/..git/info/exclude when it is inside the repository.If worktree creation fails, continue read-only from the current working tree and state that isolation was not available.
Run in the review workspace if one exists:
python3 ${CLAUDE_SKILL_DIR}/scripts/collect-context.py \
--base <base-ref> \
--out .local-ultra-review/<session-id>/review-bundle.json
The bundle should include diff patches, changed files, relevant test files, package scripts, project instructions, ignore rules, and detected languages/frameworks. Do not load the whole repository blindly.
Read prompts/01-impact-mapper.md and produce an impact map before looking for bugs. The impact map should identify changed modules, public interfaces, consumers, data models, auth/tenant/privacy boundaries, tests, and high-risk reviewer focus areas. It must not produce final findings.
Run independent reviewer passes using the shared contract in prompts/00-review-contract.md and these lenses:
Each reviewer must output candidate findings matching schemas/candidate-finding.schema.json. Prefer fewer high-confidence findings.
Read prompts/07-verifier.md and verify every candidate. Classify each as:
confirmedfalse_positivepre_existingneeds_manual_reviewOnly confirmed findings may appear in the main Important or Nit sections.
Read prompts/08-dedupe-ranker.md. Deduplicate confirmed findings by root cause and rank by severity:
Do not pad the report. If no confirmed findings exist, say so.
Write:
.local-ultra-review/<session-id>/report.md.local-ultra-review/<session-id>/findings.json.local-ultra-review/<session-id>/candidates.jsonl.local-ultra-review/<session-id>/verification.jsonl.local-ultra-review/<session-id>/review-bundle.json.local-ultra-review/<session-id>/logs/For GitHub PR targets, also write:
.local-ultra-review/<session-id>/pr-context.json.local-ultra-review/<session-id>/github-pr-comment.md.local-ultra-review/<session-id>/github-pr-review-payload.json when post_mode is reviewRender the GitHub summary with:
python3 ${CLAUDE_SKILL_DIR}/scripts/render-github-summary.py \
--pr-context .local-ultra-review/<session-id>/pr-context.json \
--findings .local-ultra-review/<session-id>/findings.json \
--report .local-ultra-review/<session-id>/report.md \
--out .local-ultra-review/<session-id>/github-pr-comment.md \
--mode <mode> \
--session-id <session-id>
If and only if the user passed --post summary, post exactly one top-level PR comment:
python3 ${CLAUDE_SKILL_DIR}/scripts/post-github-summary.py \
--pr-context .local-ultra-review/<session-id>/pr-context.json \
--body-file .local-ultra-review/<session-id>/github-pr-comment.md
If post_mode is review, or detect-target.sh set post_mode to review because the user provided a current-repo PR URL, create exactly one GitHub PR review event:
python3 ${CLAUDE_SKILL_DIR}/scripts/post-github-review.py \
--pr-context .local-ultra-review/<session-id>/pr-context.json \
--findings .local-ultra-review/<session-id>/findings.json \
--mode <mode> \
--session-id <session-id> \
--out .local-ultra-review/<session-id>/github-pr-review-payload.json
The review event should use inline comments only for verified Important/Nit findings on GitHub diff-commentable right-side lines. Do not force inline comments onto unmappable lines; include those findings in the review body instead.
After report rendering and any selected GitHub posting succeeds, remove the temporary worktree while keeping the session artifacts:
bash ${CLAUDE_SKILL_DIR}/scripts/finalize-session.sh \
--session-dir .local-ultra-review/<session-id> \
--status success
If the run failed, was interrupted, or the user passed --keep-worktree, preserve the worktree:
bash ${CLAUDE_SKILL_DIR}/scripts/finalize-session.sh \
--session-dir .local-ultra-review/<session-id> \
--status failure \
--keep-worktree
The final response to the user should include only:
Do not paste large logs into chat.