coderabbit-review-commit

$npx mdskill add compozy/agh/coderabbit-review-commit

Reviews a single commit using CodeRabbit CLI in an isolated worktree.

  • Solves reviewing any single commit without affecting the current branch.
  • Depends on CodeRabbit CLI, git worktree, and a bundled shell script.
  • Resolves the target commit from user input or defaults to HEAD~1.
  • Runs the review in background and reports the log file path on completion.

SKILL.md

.github/skills/coderabbit-review-commitView on GitHub ↗
---
name: coderabbit-review-commit
description: Review exactly one commit with the CodeRabbit CLI in an isolated throwaway worktree.
disable-model-invocation: true
---

# CodeRabbit Review of a Single Commit

Review **exactly one commit** — including a non-tip one — with the CodeRabbit CLI. The CLI only diffs `base → HEAD`, so this skill pins the target commit in a **throwaway git worktree** (detached `HEAD = C`) and reviews `base = C~1 → HEAD = C`. The current branch and working tree are never touched; the worktree is force-removed on every exit path.

## Procedure

**Step 1: Resolve the target commit**
1. Default to `HEAD~1` (the penultimate commit) unless the user names a commit-ish or SHA.
2. Confirm it resolves: `git rev-parse --short <target>`.

*Done when:* a concrete short SHA is in hand.

**Step 2: Run the review in the background**
1. Execute the bundled helper (**mutating:** creates a temp worktree + log file; never alters the branch), backgrounded — the review takes minutes:
   `bash <coderabbit-review-commit-dir>/scripts/review-commit.sh <target>`
2. The helper tees to `<repo>/.coderabbit/reviews/<short-sha>.log` and cleans its worktree on exit.
3. Override with env only when needed: `CR_REVIEW_OUT` (log dir), `CR_CONFIG` (config file), `CR_REVIEW_TYPE` (default `committed`).

*Done when:* the helper is running and its log path is reported.

**Step 3: Report the outcome**
1. On completion, surface the log path and the CodeRabbit findings.

*Done when:* the user has the findings and the log location.

## Error Handling
- `coderabbit` not in PATH → helper exits 127; the user must install and auth the CLI (`coderabbit auth login`).
- Target is a root commit (no parent) → helper exits 1; there is no base to diff.
- `Too many files!` (commit exceeds CodeRabbit's 300-file cap) → review a subdirectory (`coderabbit review --dir <path>`) or split the commit.

More from compozy/agh

SkillDescription
agent-exploration>-
aghAGH runtime and contribution guide. Use for sessions, agents, native tools, skills, memory, network, tasks, capabilities, bundles, QA, docs, and repo work. Do not use for unrelated projects.
agh-cleanup-failure-paths>-
agh-code-guidelines>-
agh-contract-codegen-coshipContract co-ship for AGH wire changes. Use when editing public DTOs, OpenAPI, JSON-RPC extension shapes, generated clients, or handler request/response semantics. Do not use for internal Go refactors or test-only changes that leave the wire contract unchanged.
agh-data-boundariesData-boundary audit for AGH route loaders, TanStack Query caches, paginated catalogs, filters, ordering, totals, live streams, workspace-scoped reads, and their backend APIs. Use when adding, changing, or debugging those paths. Don't use for presentational-only UI or backend work with no public read-model impact.
agh-designAGH visual-design authority for production UI, static artifacts, prototypes, and reviews. Use when creating or reviewing an AGH surface or changing tokens, typography, spacing, depth, icons, or motion. Do not use for capture-only verification; use agh-ui-screenshot.
agh-qa-bootstrapBootstraps isolated AGH QA labs and emits the canonical manifest for downstream QA. Use when local QA needs daemon, workspace, provider, or playbook setup. Do not use for unit tests, planning-only work, or browser-only checks.
agh-schema-migrationAuthors append-only Goose SQL migrations for AGH SQLite streams and keeps declarative schema sources, atlas.sum, Atlas checks, sqlc output, and migration tests synchronized. Use for SQLite table, column, index, constraint, trigger, or seed-data changes under internal/store or internal/memory. Do not use for in-memory structures, derived Markdown memory, or non-SQLite caches.
agh-test-conventions>-