agents/skills/claude-review/SKILL.md
Get a second opinion on code changes from Claude Code CLI. Use before PRs or when you want an independent review from a different AI model. Trigger when the user asks for a code review, second opinion, or says "claude review".
npx skillsauth add carterdea/dots claude-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Get an independent code review from Anthropic's Claude CLI as a second opinion.
Detect whether you're on a feature branch or main and select the right diff:
BRANCH=$(git branch --show-current)
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
# On main — review working tree (staged + unstaged) changes
DIFF_CMD="git diff && git diff --cached"
NAMES_CMD="{ git diff --name-only; git diff --cached --name-only; } | sort -u"
FILE_DIFF_CMD="git diff -- FILE && git diff --cached -- FILE"
else
# Feature branch — review full branch diff against main
DIFF_CMD="git diff main...HEAD"
NAMES_CMD="git diff main...HEAD --name-only"
FILE_DIFF_CMD="git diff main...HEAD -- FILE"
fi
If the diff is empty, tell the user there are no changes to review and stop.
If the user provided custom focus instructions (e.g., "focus on security"), use those as the review prompt. Otherwise use the default comprehensive prompt below.
Pipe the diff into Claude's non-interactive print mode:
eval "$DIFF_CMD" | claude -p --model sonnet "Review the code changes in this diff for quality, correctness, and adherence to best practices.
## Review Checklist
### 1. Architecture & Design
- Follows established patterns in the codebase
- No unnecessary complexity or over-engineering
- Proper separation of concerns
- No anti-patterns introduced
- Dependencies are properly managed
### 2. Technology-Specific Best Practices
Detect the stack from file extensions and apply the right idioms:
- Python: type hints, async/await, error handling, dependency injection
- Ruby/Rails: ActiveRecord patterns, service objects, controller actions, migrations
- TypeScript/React: component design, hooks usage, state management, type safety
- Node.js: async patterns, error handling, middleware design
- Go: error handling, goroutines, interfaces, package structure
- Rust: ownership, borrowing, error handling, trait usage
- Java/Spring: dependency injection, service layers, exception handling
- PHP/Laravel: Eloquent usage, middleware, validation, authorization
### 3. Code Quality
- Functions focused and reasonably sized
- Files organized and not too large
- No duplicated logic (DRY violations)
- Proper error handling (not silently swallowing errors)
- No security vulnerabilities (injection, XSS, CSRF, etc.)
- Tests cover critical paths and edge cases
- No hardcoded secrets or credentials
### 4. Consistency
- Follows project naming conventions
- Imports organized properly
- Code style matches existing codebase
- Comments explain 'why' not 'what'
- No commented-out code left behind
### 5. Performance
- No obvious issues (N+1 queries, unnecessary loops)
- Efficient data structures
- Proper caching where appropriate
- Database queries optimized
### 6. Testing
- Tests clear and focused
- Edge cases covered
- No flaky tests
- Test names describe what they test
## Output Format
For each issue: file/line reference, description, severity (critical/warning/suggestion), recommended fix with code example.
Summarize with: issues by severity, overall assessment, ready-to-merge verdict. Skip praise — only report problems."
If the diff exceeds ~4000 lines, split by file:
for file in $(eval "$NAMES_CMD"); do
echo "=== Reviewing: $file ==="
eval "${FILE_DIFF_CMD//FILE/$file}" | claude -p --model sonnet "Review this diff of $file for bugs, security issues, and code quality problems. Be specific and concise."
done
Return Claude's findings verbatim. Do not editorialize or filter the results — the point is to get a raw second opinion from a different model.
development
Ship a Trello ticket end to end on any web app (Vercel, Fly.io, or other host — no Shopify): pull the latest main, read the card including Figma links, implement the change in a worktree, run the project's own tests/lint/typecheck, run de-slop and code-simplifier and fold the worthwhile cleanups in, QA desktop and mobile on a local Portless preview URL, capture screenshots, open or update the GitHub PR, link the PR and Trello to each other, attach screenshots to both, comment on the card, and move it to review. Use this whenever the user points you at a Trello card or ticket for a code task and wants it delivered as a reviewable PR — phrases like 'do this Trello ticket', 'ship this card', 'pick up this ticket and open a PR', 'update the PR for this card', or names a card/list/board with a feature or bug to implement. This is the default Trello-to-PR workflow for non-Shopify projects; for Shopify theme work use shopify-trello-delivery instead.
tools
Install or upgrade a quality baseline for Shopify theme repos. Use this whenever the user asks to add Shopify theme linting, Biome, Theme Check, Playwright accessibility checks, Vitest, Vite build tooling, lefthook hooks, GitHub Actions CI, Shopify Lighthouse CI, Claude Code PR review workflows, or a context-efficient run_silent.sh setup across Shopify sites.
development
Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a thermo-nuclear code quality review, thermonuclear review, deep code quality audit, or especially harsh maintainability review.
development
Ship Shopify theme work from a Trello ticket end to end: inspect the card including Figma links, implement the theme change, deploy or update the correct preview/dev theme, browser-QA desktop and mobile against Figma when available, create or update the GitHub PR, attach screenshots, comment on Trello, and move the card forward. Use this whenever the user mentions a Shopify theme task with a Trello card, Figma design/artboard, preview theme, Customizer, dev theme, PR handoff, Ready for Review/Testing, or asks to update an existing Shopify PR from a ticket.