agentleFS
cogine-aicogine-ai/cogine-dev-skillset/skills/local-ultra-review/SKILL.md

local-ultra-review

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

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.

  • Reads credentials

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. About 0 are common, 14 are distinctive, and 16 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 16

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a local Ultra Review style code review.

    line 12
  2. Distinctive:

    If no target is provided, review the current branch against the default base branch and include staged and unstaged tracked changes.

    line 30
  3. Very specific:

    Default: keep review artifacts in .local-ultra-review/<session-id>/, then remove the temporary worktree after report generation and any …

    line 48
  4. Distinctive:

    Use an isolated worktree when possible.

    line 55
  5. Very specific:

    Prefer .local-ultra-review/worktrees/<session-id>/ for review workspaces.

    line 56
  6. Very specific:

    Add .local-ultra-review/ to the repository-local git exclude (.git/info/exclude), not to the tracked project .gitignore, unless the user …

    line 57
  7. Very specific:

    Do not copy .env, credentials, private keys, tokens, gitignored secrets, or local database config unless the user explicitly allows it.

    line 58
  8. Very specific:

    Do not use network access unless the user explicitly allows it, approved project checks require it, or the target is a GitHub PR that …

    line 59
  9. Distinctive:

    Do not report style, formatting, naming preference, or generic maintainability advice as findings.

    line 60
  10. Very specific:

    If a candidate cannot be verified, put it under Needs manual review or omit it.

    line 64
  11. Distinctive:

    If the script is unavailable, manually inspect:

    line 93
  12. Distinctive:

    Stop only if the target cannot be determined or the directory is not a git repository.

    line 102
  13. Distinctive:

    If no argument is provided, use current branch versus the detected default base and include staged and unstaged tracked changes.

    line 112
  14. Very specific:

    Create a detached worktree under .local-ultra-review/worktrees/<session-id>/.

    line 140
  15. Distinctive:

    Do not copy secrets by default.

    line 142
  16. Very specific:

    Add the output directory to .git/info/exclude when it is inside the repository.

    line 143
  17. Distinctive:

    If worktree creation fails, continue read-only from the current working tree and state that isolation was not available.

    line 146
  18. Distinctive:

    Run in the review workspace if one exists:

    line 150
  19. Very specific:

    Read prompts/01-impact-mapper.md and produce an impact map before looking for bugs.

    line 162
  20. Very specific:

    Run independent reviewer passes using the shared contract in prompts/00-review-contract.md and these lenses:

    line 166
  21. Very specific:

    Read prompts/07-verifier.md and verify every candidate.

    line 178
  22. Very specific:

    Only confirmed findings may appear in the main Important or Nit sections.

    line 185
  23. Very specific:

    Read prompts/08-dedupe-ranker.md.

    line 189
  24. Distinctive:

    Test blind spot tied to a concrete behavior risk

    line 196
  25. Distinctive:

    Do not pad the report. If no confirmed findings exist, say so.

    line 199
  26. Very specific:

    If and only if the user passed --post summary, post exactly one top-level PR comment:

    line 230
  27. Very specific:

    If the authorized post_mode is review, create exactly one GitHub PR review event:

    line 238
  28. Distinctive:

    After report rendering and any selected GitHub posting succeeds, remove the temporary worktree while keeping the session artifacts:

    line 251
  29. Very specific:

    If the run failed, was interrupted, or the user passed --keep-worktree, preserve the worktree:

    line 259
  30. Distinctive:

    Do not paste large logs into chat.

    line 276

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Local Ultra Review

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.

Inputs

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-worktree

If 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 locally. All targets default to --post none. Post only when explicitly authorized in this session; pass the corresponding --post summary or --post review argument without asking again. A PR URL alone does not authorize posting. --post none always disables posting.

Modes:

  • light: correctness, security/integration, and tests/verification
  • deep: default, five reviewer lenses plus verification
  • max: broader review for large or high-risk changes

GitHub output:

  • --post none: default for all targets; 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 body

Worktree lifecycle:

  • Default: keep review artifacts in .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.
  • On failed or interrupted review runs, preserve the worktree and state the path.

Hard Rules

  1. Review only. Do not edit business code.
  2. Use an isolated worktree when possible.
  3. Prefer .local-ultra-review/worktrees/<session-id>/ for review workspaces.
  4. Add .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.
  5. Do not copy .env, credentials, private keys, tokens, gitignored secrets, or local database config unless the user explicitly allows it.
  6. Do not use network access unless the user explicitly allows it, approved project checks require it, or the target is a GitHub PR that requires gh for metadata, checkout, or the selected post mode.
  7. Do not report style, formatting, naming preference, or generic maintainability advice as findings.
  8. A finding must cite exact file:line.
  9. A finding must include a concrete failure scenario.
  10. A finding must be checked by a separate verifier pass before it appears as Important or Nit.
  11. If a candidate cannot be verified, put it under Needs manual review or omit it.

Supporting Files

  • 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.

Pipeline

Phase 0: Preflight

Run:

bash ${CLAUDE_SKILL_DIR}/scripts/preflight.sh "$ARGUMENTS"

If the script is unavailable, manually inspect:

  • git repo root and current branch
  • default base branch
  • staged, unstaged, and untracked status
  • changed files
  • package and test commands
  • REVIEW.md, AGENTS.md, CLAUDE.md, README.md, or equivalent instructions

Stop only if the target cannot be determined or the directory is not a git repository.

Phase 1: Detect Target

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.

Phase 2: Prepare Isolated Workspace

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:

  1. Create .local-ultra-review/<session-id>/.
  2. Create a detached worktree under .local-ultra-review/worktrees/<session-id>/.
  3. Apply staged and unstaged tracked changes when reviewing local working tree changes.
  4. Do not copy secrets by default.
  5. Add the output directory to .git/info/exclude when it is inside the repository.
  6. Record base, head, session id, worktree path, and patch paths.

If worktree creation fails, continue read-only from the current working tree and state that isolation was not available.

Phase 3: Collect Context

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.

Phase 4: Impact Map

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.

Phase 5: Reviewer Passes

Run independent reviewer passes using the shared contract in prompts/00-review-contract.md and these lenses:

  1. Correctness and regression
  2. Security and privacy
  3. Integration and API contract
  4. State, concurrency, migration, and rollback
  5. Tests and verification

Each reviewer must output candidate findings matching schemas/candidate-finding.schema.json. Prefer fewer high-confidence findings.

Phase 6: Verification

Read prompts/07-verifier.md and verify every candidate. Classify each as:

  • confirmed
  • false_positive
  • pre_existing
  • needs_manual_review

Only confirmed findings may appear in the main Important or Nit sections.

Phase 7: Dedupe and Rank

Read prompts/08-dedupe-ranker.md. Deduplicate confirmed findings by root cause and rank by severity:

  1. Security, privacy, permission, data loss
  2. Production behavior regression
  3. Migration, rollback, data compatibility
  4. Integration contract break
  5. Concurrency, retry, idempotency
  6. Test blind spot tied to a concrete behavior risk
  7. Nit

Do not pad the report. If no confirmed findings exist, say so.

Phase 8: Report

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 review

Render 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 the authorized post_mode is review, 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:

  1. Important count
  2. Nit count
  3. Pre-existing count
  4. Report path
  5. Top 3 findings, if any

Do not paste large logs into chat.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.