Code Review

AI-powered code review for diffs and individual files using LLM analysis

230 stars 17 forksGit & Code Review

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add initializ/forge --skill code-review
Manual install
git clone --depth 1 https://github.com/initializ/forge.git /tmp/forge
mkdir -p ~/.claude/skills
cp -r /tmp/forge/forge-skills/local/embedded/code-review ~/.claude/skills/code-review

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Code Review Skill

AI-powered code review that analyzes diffs and individual files for bugs, security issues, style violations, and improvement opportunities. Supports both local git diffs and GitHub pull requests.

## Authentication

Set at least one LLM API key:

```bash
# Option A: Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."

# Option B: OpenAI or any OpenAI-compatible provider (Together, OpenRouter, Groq, ...)
export OPENAI_API_KEY="sk-..."
export OPENAI_BASE_URL="https://api.together.ai/v1"   # only when not using openai.com

# Optional: override the model (defaults: claude-sonnet-4-20250514 / gpt-4o)
export REVIEW_MODEL="moonshotai/Kimi-K2.6"

# Optional: force a specific provider when both keys are set
export REVIEW_PROVIDER="openai"   # or "anthropic"
```

**Provider selection** (auto-detected when `REVIEW_PROVIDER` is unset):

1. If `REVIEW_PROVIDER` is set, it wins.
2. Else if `REVIEW_MODEL` starts with `claude-` or `anthropic/`, use Anthropic.
3. Else if only one API key is set, use that provider.
4. Else (both keys, no model hint): use OpenAI.

This precedence fixes the common deployment where both `ANTHROPIC_API_KEY` and `OPENAI_API_KEY` live in `.forge/secrets.enc` (one is stale or for a different skill). Pre-fix the skill always preferred Anthropic and returned 401 against the stale key.

For GitHub PR review, also set:

```bash
export GH_TOKEN="ghp_..."
```

The token needs **read-only** access:

| Scope (classic PAT) | Fine-grained permission | Why |
Read the full skill on GitHub

Details

Skill name
code-review
Path
forge-skills/local/embedded/code-review/SKILL.md
License
Apache-2.0
Repo updated
17 November 2026

FAQ

What does the Code Review skill do?

AI-powered code review for diffs and individual files using LLM analysis

How do I install the Code Review skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add initializ/forge --skill code-review. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Code Review popular?

It lives in initializ/forge, which has 230 GitHub stars and 17 forks.

Related skills

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.