/skills:reviewfrom skills
Review code changes in git or GitHub repositories — catch logic bugs, design issues, style violations, test gaps, and missing documentation that CI cannot detect. Use when the user asks to review a PR, inspect diff changes, evaluate code quality, or get a second opinion on a pull request or branch comparison. Does not re-report CI failures for syntax, tests, linting, or formatting.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Review diffs in git repositories (local branches and GitHub PRs). Catch what CI cannot: bugs, design issues, style violations, test gaps, and documentation drift. Frame all feedback as suggestions the reviewer can accept or reject.
CI already reports failures directly. Do not comment on:
lintr, air)If every issue identified falls into one of these categories, post only lgtm (see Output Format).
Progress through the review in this order:
git diff for local branches or gh pr diff for PRslgtm if cleanLook for:
Consult references/r-style-guide.md for the full set of naming conventions, API patterns, and formatting rules from r-code, tdd-workflow, and document. Only flag actual violations; recognize when existing code complies through a different mechanism (e.g., using an internal validator instead of inline checks).
When suggesting fixes, ensure the suggestion is valid R code (matched braces, correct syntax, proper pipe usage). Prefer prose comments over structured suggestion blocks unless the fix is trivially mechanical.
R/{file}.R should have a corresponding test in tests/testthat/test-{file}.R.Domain-specific traps that agents commonly miss during review:
library() in package code: Never use library(dplyr) inside .R source files — flag it and suggest namespace-qualified calls (dplyr::filter()) or @importFrom.call propagation: Internal validators that throw errors must accept and forward call = rlang::caller_env() so error messages include the calling function name..cli_abort() must check both the message pattern and the error class string (e.g., "empty_input"). A test matching only the message is fragile.%>%): New code should use the base pipe (|>) unless maintaining existing %>% chains in a file that has not been migrated yet. Flag new instances of %>%.R/{name}.R must reach 100% test coverage (excluding *package.R, aaa-shared_params.R, and import-standalone-*). Check whether tests were added for the modified code.@param tags must match exactly — mismatched names are silent documentation bugs that only appear when users run ?function_name.@export and an entry in NAMESPACE. Flag methods present in code but missing from exports.When reviewing on GitHub, post line-specific comments using the gh pr review --comment command:
gh pr comment <number> --body-file - <<'EOF'
[comment text]
EOF
For line-specific inline comments, use:
gh api repos/{owner}/{repo}/pulls/{n}/comments \
-f body="Comment text" \
-f path="R/file.R" \
-f line=42 \
-f side="RIGHT"
When reviewing local branches (no GitHub PR), summarize findings as a single block of review comments in the response. Use Output Format for structure, but deliver them inline rather than via gh.
Each review comment should follow this structure:
[Category]: [One-line summary]
Observation or concern with reference to specific code (file and line if applicable).
Suggestion (optional): concrete fix or alternative approach.
Available categories:
| Category | Use for |
|---|---|
Logic | Bugs, wrong conditions, off-by-one errors, unhandled paths |
Style | Naming violations, pipe misuse, API pattern deviations |
Tests | Missing tests, mock overuse, coverage gaps |
Documentation | roxygen2 drift, missing examples, NEWS.md issues |
Design | Architecture concerns, function size, abstraction leaks |
lgtmPost only lgtm when the PR is clean: no logic bugs found, no style violations beyond what existing code demonstrates, new behavior has corresponding tests, and user-facing changes include NEWS.md entries. Do not add additional commentary in this case — lgtm signals a clean review to the reviewer.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub pbulsink/skills --plugin skills16 skills in this plugin
/agent-md-refactorRefactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation./app-screenshotThis skill should be used when capturing screenshots of R Shiny apps for documentation — vignettes, READMEs, and app tours. Covers driving a live app with shinytest2's AppDriver, isolating demo state from real data, and producing numbered PNGs ready to embed./documentThis skill should be used when documentation for R package functions is requested or required.