🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@agentskit/code-review

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentskit/code-review

Provider-agnostic, low-noise AI code review for local development and GitHub Actions.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
4
-82.61%
Maintainers
1
Weekly downloads
 
Created
Source

AgentsKit Code Review

Deep, low-noise AI code review with the model you already use.

CI License: MIT Node.js

Run code review locally or on every pull request. Bring Claude, Codex, OpenAI, Gemini, Ollama, OpenRouter, or another AgentsKit adapter. Seven specialized review lenses find potential problems; adversarial verification filters weak findings before they reach your team.

Why this exists

Most AI reviewers are easy to start and hard to trust: they produce long lists of stylistic opinions, repeat the same concern, and bury the issue that can actually break production.

AgentsKit Code Review is built around a different contract:

  • Bring your own model. Use an existing CLI subscription, an API provider, a local model, or your own gateway.
  • Low noise by design. Findings are challenged by independent verification votes before they survive.
  • Local first, CI ready. Review a diff before pushing, inspect complete paths, read stdin, or comment directly on a GitHub PR.
  • Control cost and policy. Set file budgets, concurrency, thresholds, project conventions, and blocking severity.

Run your first review

Open a terminal inside any Git repository and choose a provider you already use. You do not need to clone or install AgentsKit Code Review:

# Codex CLI — uses your existing login
npx --yes github:AgentsKit-io/code-review-cli --provider codex-cli

# Claude CLI — uses your existing login
npx --yes github:AgentsKit-io/code-review-cli --provider claude-cli

# OpenAI API
OPENAI_API_KEY=... npx --yes github:AgentsKit-io/code-review-cli \
  --provider openai --model gpt-4o

The CLI reviews the current repository's diff against origin/main and prints the report in your terminal. Choose another base with --base main.

The current command runs directly from GitHub. After the first npm release, the shorter form will be:

npx @agentskit/code-review --provider codex-cli

Use the GitHub Action

Add .github/workflows/code-review.yml to any repository:

name: Code Review
on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  contents: read
  pull-requests: write

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: AgentsKit-io/code-review-cli@main
        with:
          provider: openai
          model: gpt-4o
          api-key: ${{ secrets.LLM_API_KEY }}
          # fail-on-block: 'true' # advisory by default
          # block: high

The Action fetches the PR diff and posts one batched inline review plus a summary. It is advisory by default. Enable fail-on-block and branch protection when you are ready to use it as a merge gate.

Use @main while the project is pre-release. After the first stable release, pin @v1 or a full release tag when reproducibility matters most.

Choose how to run

ModeProvider examplesCredentialsBest for
Local CLIcodex-cli, claude-cliExisting CLI loginLocal development or self-hosted runners
Hosted APIopenai, anthropic, gemini, mistral, groqProvider API keyManaged CI
Local modelollamaUsually nonePrivacy and predictable cost
Gatewayopenrouter or a custom --base-urlGateway-specificCentral routing and policy

Provider names other than the two local CLIs resolve to factories exported by @agentskit/adapters. Run npx --yes github:AgentsKit-io/code-review-cli --list-providers for common choices.

Credentials resolve in this order:

  • --api-key
  • LLM_API_KEY
  • <PROVIDER>_API_KEY, such as OPENAI_API_KEY

Secrets passed to the GitHub Action are forwarded through the environment, not included in command-line arguments.

How review works

diff / PR / paths / stdin
          ↓
   normalize targets
          ↓
  7 specialized lenses
          ↓
 adversarial verification
          ↓
 thresholds + CI policy
          ↓
Markdown / GitHub / SARIF

The review agent lives in agents/code-review/ and is vendored from the AgentsKit registry. The CLI owns provider selection, input sources, policy, and reporting.

Common commands

# Tune verification and severity
npx --yes github:AgentsKit-io/code-review-cli --provider codex-cli \
  --base main --votes 5 --min-severity high

# Review a GitHub PR and post the result
GITHUB_TOKEN=... OPENAI_API_KEY=... \
  npx --yes github:AgentsKit-io/code-review-cli --provider openai --model gpt-4o \
  --pr owner/repo#42 --post

# Review complete files or directories
npx --yes github:AgentsKit-io/code-review-cli --provider claude-cli \
  --paths src --max-files 30

# Review piped source and also write SARIF
echo 'const x = a.b' | npx --yes github:AgentsKit-io/code-review-cli \
  --provider ollama --model llama3 \
  --base-url http://localhost:11434 --stdin --lang ts --sarif out.sarif

CLI reference

Providers

Run these commands from the repository you want to review:

ProviderWhat you needModelExample
codex-cliCodex CLI logged inOptionalnpx --yes github:AgentsKit-io/code-review-cli --provider codex-cli
claude-cliClaude CLI logged inOptionalnpx --yes github:AgentsKit-io/code-review-cli --provider claude-cli
openaiOPENAI_API_KEYRequired... --provider openai --model gpt-4o
anthropicANTHROPIC_API_KEYRequired... --provider anthropic --model <model>
geminiGEMINI_API_KEYRequired... --provider gemini --model <model>
ollamaOllama running locallyRequired... --provider ollama --model llama3 --base-url http://localhost:11434
openrouterOPENROUTER_API_KEYRequired... --provider openrouter --model <model>
Other adapters<PROVIDER>_API_KEY when applicableUsually required... --provider <name> --model <model>

In shortened examples, replace ... with npx --yes github:AgentsKit-io/code-review-cli.

Options

FlagMeaning
--provider <name>Required provider: local CLI or @agentskit/adapters factory
--model <id>Model id; required for API/local-server providers
--api-key <key>Provider key; environment variables are preferred
--base-url <url>Provider endpoint, local server, or gateway
--base <ref>Git diff base; default origin/main
--pr owner/repo#NGitHub PR source; requires GITHUB_TOKEN
--paths <p...>Complete files or directories
--stdin [--lang ts]Source read from stdin
--postPost a batched review when the source is a PR
--sarif <file>Also write SARIF
--votes <n>Adversarial verification votes; default 3
--min-severity <level>Minimum reported severity
--min-confidence <n>Minimum reported confidence
--max-files <n>File budget
--concurrency <n>Parallel model calls; default 4
--validate-patchRun git apply --check on suggested patches
--block <severity>CI gate floor; default blocker
--no-failKeep findings advisory
--conventions <path>Inject project conventions
--apiBack-compatible alias for --provider anthropic
--helpFull command help

When no conventions path is supplied, the CLI looks for CONVENTIONS.md, CONTRIBUTING.md, .cursorrules, or AGENTS.md.

Cost and privacy

A full review runs seven lenses across selected files and then verifies candidate findings. Control usage with --max-files, --votes, --concurrency, paths, and workflow triggers. For sensitive code, use a local model or an approved private gateway; provider data policies still apply to hosted APIs.

Contributing

Providers, review lenses, reporters, fixtures, documentation, and false-positive reductions are welcome. Start with CONTRIBUTING.md, browse issues labeled good first issue, or propose a new provider/lens with the issue templates.

Please report vulnerabilities privately as described in SECURITY.md.

Roadmap

The near-term roadmap focuses on a stable v1 Action, npm distribution, provider smoke tests, better cost visibility, and more community-owned review lenses. See ROADMAP.md.

License

MIT © AgentsKit contributors.

Keywords

ai-code-review

FAQs

Package last updated on 21 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts