Agent skill

Code Review

by caarlos0 in caarlos0/dotfiles

Review code, diffs, branches, commits, and pull requests for correctness, tests, simplicity, performance, and usability.

MITAuto-check passedDevelopment

Install Code Review

skills CLI
$ npx skills add caarlos0/dotfiles --skill code-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install caarlos0/dotfiles code-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/caarlos0/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-review .claude/skills/code-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-review
GitHub stars
220
Token cost
~2.4k tokens
SKILL.md length
1,352 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Review code, diffs, branches, commits, and pull requests for correctness, tests, simplicity, performance, and usability.

  • Works in 3 steps: Resolve the base and review the complete… → Read the request, linked issue,… → Identify the intended behavior and…
  • Tasks that involve Code review
  • SKILL.md covers Scope, Required independent checks, Correctness and Test coverage, plus 7 more sections
  • Calls gh and go

What it does

Code Review is an agent skill from caarlos0/dotfiles. Review code, diffs, branches, commits, and pull requests for correctness, tests, simplicity, performance, and usability.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code review, UX design and Pull requests. The licence is MIT.

When your agent uses it

  • Tasks that involve Code review
  • Tasks that involve UX design
  • Tasks that involve Pull requests

Example prompts

  • “/code-review”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Resolve the base and review the complete diff. For a pull request, refresh
  2. Read the request, linked issue, surrounding code, callers, and tests. Diff
  3. Identify the intended behavior and review only introduced behavior, except

What it can do on your machine

Read from SKILL.md and the folder at commit 278c761. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Review loads about 2.4k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 1,352 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from caarlos0/dotfiles at commit 278c761, republished under its MIT licence (© caarlos0). 1,352 words, ~2,428 tokens.

Download SKILL.mdSave it as .claude/skills/code-review/SKILL.md (or your agent's skills folder).
name
code-review
description
Review code, diffs, branches, commits, and pull requests for correctness, tests, simplicity, performance, and usability.
user_invocable
true

Code Review

Do not edit files except for the review outputs described below. Limit GitHub mutations to posting and superseding reviews and, when continuous review is requested, resolving addressed threads. Follow repository instructions before this skill.

Scope

  1. Resolve the base and review the complete diff. For a pull request, refresh the base ref before computing the merge base.
  2. Read the request, linked issue, surrounding code, callers, and tests. Diff actual files; prose is not evidence.
  3. Identify the intended behavior and review only introduced behavior, except pre-existing code made newly reachable or incorrect.

Report only high-confidence problems that a user can trigger and observe. Ignore style, naming, formatting, generic advice, and unrelated cleanup.

Required independent checks

Before the verdict, request both checks in parallel. Give each the full target, base, intent, repository instructions, and known validation; do not split the diff.

  • Ask the caarlos0 agent for a read-only maintainer check of correctness, scope, simplicity, usability, compatibility, public surface, and maintenance cost.
  • Ask anvil in verify-only mode for an adversarial check of correctness, test coverage, determinism, performance evidence, and user-visible behavior. Verify that the feature or fix solves a real problem, especially when the change appears fully automated without human input.

These are leaf tasks: agents must not invoke code-review, request agents, edit, or mutate GitHub. Require exact file/line, reachable scenario, impact, evidence, smallest fix, and test. If either check cannot run, disclose it.

Agent reports are leads. Independently trace or reproduce each claim and resolve disagreements with code, tests, logs, history, or specification.

Correctness

  • Trace data and control flow across changed boundaries.
  • Check defaults, absent and explicit values, errors, cancellation, cleanup, reuse, persistence, serialization, concurrency, and platform paths.
  • Check that success cannot hide failure or discarded output, and that errors cannot become false success.
  • Verify automated findings independently; never act only to satisfy a bot.

Test coverage

  • Require a focused regression test for a bug fix and direct coverage of each changed contract. Prefer the lowest decisive test layer.
  • Ensure tests exercise production behavior, not mocks, copied implementation, or helpers that cannot reproduce the bug.
  • Where practical, prove the regression test fails without the fix.
  • Cover material success, failure, boundary, default, and transition states, not speculative combinations.
  • Keep decisive assertions near the behavior and print useful actual values or variants on failure.

Report missing coverage only when changed behavior can regress undetected and a focused test can cover it.

Test determinism

  • Prefer observable state, barriers, channels, events, unique resources, and precise assertions over sleeps, timing races, retries, ambient ordering, and broad output matches.
  • Control clocks, randomness, timezone, locale, environment, working directory, network, ports, paths, process-global state, and parallel-test cleanup.
  • A larger timeout is not a race fix. Accept retries or timeouts only when time or transient failure is part of the contract.
  • A passing rerun proves nondeterminism, not correctness. Read the real failure text and identify the mechanism before calling a test flaky.
  • For CI failures, compare the failure window with the failing code's lifetime. Separate regressions and merge conflicts from races; inspect all job attempts and prioritize required checks.

Simplicity

  • Prefer the smallest complete change, existing patterns, standard library, private implementation, direct control flow, and one concern per change.
  • Require a demonstrated caller or failure mode for each dependency, option, public API, abstraction, compatibility layer, retry, timeout, or defense.
  • Reject drive-by refactors and speculative defenses. Small duplication is better than an abstraction that hides behavior.
  • Check comments, docs, errors, and names only when the change makes them false.

Performance and usability

  • Trace changed hot paths, I/O, allocations, concurrency, startup, and resource lifetime. Require a benchmark, profile, or mechanically clear regression; reject optimization folklore and harmless micro-costs.
  • Check the complete user workflow, defaults, compatibility, discoverability, errors, help, accessibility, and recovery from failure.
  • Report usability only through a concrete user task and observable friction, not personal taste.
  • code-simplifier: assess simpler alternatives without editing files.
  • writing-tests: review regression coverage, test isolation, and determinism.
  • gh-cli: GitHub operations and waiting for new pushes.
  • infographic: explain findings visually when that makes them clearer; follow its publishing boundaries.
  • change-impact-auditor: configuration, policy, protocol, or shared models.
  • runtime-process-debugging: process, shell, pipe, lifecycle, or race behavior.
  • issue-validator: a claimed issue fix or stale report.
  • go-conventions or rust-specialist: matching language changes.
  • go-doc: unfamiliar Go APIs, without go get or module changes in review.
  • go-performance, rust-performance, typescript-performance, or python-performance: matching language performance work.

Use code-simplifier and writing-tests in read-only mode. Invoke the other skills only when relevant.

Validation and result

Do not build locally. Assume the build is green for the review, but do not claim it was verified. Run the smallest non-build command that can confirm or reject a finding. Before local tests, check uptime; stop when load average exceeds about 12.

List findings by severity with file/line, trigger, impact, smallest fix, and needed test. Do not add praise, summaries of correct code, or low-confidence possibilities. State material verification gaps separately.

If there are no findings, say so plainly.

For a local branch, write the result to review.md. For other local diffs and commits, report in chat.

Show full SKILL.md (511 more words)Show less

Posting a review

When the target is a pull request, always post the review. Do not ask first and do not stop at reporting findings in chat.

Anchor every finding to the code it concerns. Submit one review whose comments array carries an inline comment per finding, each with path and line, plus start_line for a range. Never collect findings in the review body, and do not split them into separate top-level comments. gh pr review cannot attach inline comments, so post through the reviews API, for example gh api repos/OWNER/REPO/pulls/N/reviews --method POST --input -.

  • Keep the body for the verdict and for anything with no single site: cross-cutting scope, missing tests, and disclosed verification gaps.
  • Anchor to a line the diff touches. When a finding concerns unchanged code, anchor to the changed line that reaches it and say why in the comment.
  • Make each comment stand alone: trigger, impact, smallest fix, needed test. Reference sibling findings by file and line rather than repeating them.
  • After posting, read the comments back and confirm every anchor resolved to the intended line instead of silently detaching.
  • When a later review replaces an earlier one, dismiss the earlier one if GitHub permits it; otherwise name the superseded review in the new review body.
Approval

Read the PR discussion before choosing the review event:

  • For a PR authored by caarlos0, post COMMENT: GitHub does not permit approving or requesting changes on your own PR.
  • Do not approve if caarlos0 made a negative comment, especially about the idea, or if the overall discussion is negative.
  • If caarlos0 already left a positive comment, such as saying only the bot review remains, approve when the PR is good and only minor suggestions remain. If there are bigger issues, label the approval "Tentative approval, pending resolution of feedback" and state the unresolved issues in inline comments.
  • Otherwise, approve if there are no critical problems. Do not invent style findings to accompany an approval.

Disclose that the reviewer is a bot.

Continuous review

Only when asked to keep reviewing new pushes:

  1. After posting, retain the exact head SHA reviewed and check the current PR once for work already pushed. Review a new head immediately. Otherwise run gh wait <pr> for the next observed change. It starts a new snapshot, not a comparison against the reviewed SHA; earlier changes do not wake it. Follow gh-cli for repository targeting, output, and exit behavior.
  2. Use the longest supported wait. If the command moves to the background, wait for its completion notification. Never poll with Git, gh, or sleeps between notifications.
  3. On changed, read the PR. Edits and reviews also wake the command; do not post a duplicate code review when the head is unchanged. For a new head, review only changes since the last reviewed SHA, with enough surrounding context to verify them. Resolve threads whose findings were addressed, post the new review, retain the new SHA, and wait again.
  4. Stop on merged or closed, both successful events. Report nonzero watcher exits as errors rather than treating them as closure.

© caarlos0, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/code-review of caarlos0/dotfiles.

Open the folder on GitHubat commit 278c761

Compare with similar skills

Code Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Review this skillcaarlos0/dotfiles220—~2.4kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Understand Diff AnalysisEgonex-AI/Understand-Anything85k1 repos~1.4kAutomated safety check: PassMIT
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
GitHub Review Iterationprisma/orm48k—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    85k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Official

    Runs a loop on a GitHub pull request: fetch review state, triage comments into actions, implement them and resolve threads, repeating until nothing actionable is left.

    48k GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Finalize Review

    microsoft/garnet

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for Garnet best practices, reporting findings without posting them.

    12k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from caarlos0/dotfiles

All 20 skills in this repo
  • CLI Design

    caarlos0/dotfiles

    Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility.

    220 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Dependabot Merge

    caarlos0/dotfiles

    Review and merge open dependency pull requests from Dependabot, Renovate and similar bots across the goreleaser organization and the caarlos0 user.

    220 GitHub stars~5k tokensUpdated yesterday
    Auto-check passed
  • Gh CLI

    caarlos0/dotfiles

    Use GitHub CLI efficiently for pull requests, CI checks, workflow runs, logs, and merge status.

    220 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Tui Design

    caarlos0/dotfiles

    Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable.

    220 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Dashboard

    caarlos0/dotfiles

    Design and review dashboards that are informative, honest, accessible, and visually polished, independent of any tool.

    220 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Gh Doc Author

    caarlos0/dotfiles

    Author and revise clear GitHub internal documentation, including design docs, proposals, decision records, runbooks, status updates, and handoffs.

    220 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Code Review

What does Code Review do?

Review code, diffs, branches, commits, and pull requests for correctness, tests, simplicity, performance, and usability. Code Review is an agent skill from caarlos0/dotfiles. Review code, diffs, branches, commits, and pull requests for correctness, tests, simplicity, performance, and usability.

When should I use Code Review?

Code Review fits situations like: tasks that involve Code review; tasks that involve UX design; tasks that involve Pull requests.

How do I install Code Review in Claude Code?

Run `npx skills add caarlos0/dotfiles --skill code-review -a claude-code`. Or copy the skill folder (skills/code-review in caarlos0/dotfiles) into .claude/skills/code-review in your project. Claude Code loads it when a task matches its description.

How do I install Code Review in Codex?

Run `npx skills add caarlos0/dotfiles --skill code-review -a codex`. Or copy the skill folder (skills/code-review in caarlos0/dotfiles) into .agents/skills/code-review in your project. Codex loads it when a task matches its description.

Can I use Code Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add caarlos0/dotfiles --skill code-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-review, .gemini/skills/code-review, .github/skills/code-review and .opencode/skills/code-review in your project.

What does Code Review need to run?

Going by SKILL.md and its folder, Code Review needs the command-line tools its instructions call (gh and go).

Does Code Review access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Review use?

Code Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Review use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Review?

Skills that share tags, products or a category with Code Review: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 85k stars), WooCommerce Code Review (woocommerce/woocommerce, 11k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Review?

caarlos0 (a GitHub user) maintains it in caarlos0/dotfiles, which has 220 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 7, 2026.

Source: caarlos0/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.