getsentry/warden

Your code is under new management. Agents that review your code.

What is Warden?

Warden is an open‑source tool from Sentry that lets you run AI‑powered code reviews directly in your repository. It treats the review logic as “skills” – reusable pieces of analysis that live in ordinary directories (e.g., .agents/skills/ or .claude/skills/). Once a skill is defined you can invoke it locally from the command line or automatically on every pull request via a GitHub Action.

Core ideas

Idea What it means
Skills, not prompts Instead of writing ad‑hoc prompts for each run, you author a skill once (a small script or configuration) and reuse it everywhere.
Two execution modes CLI – run npx @sentry/warden to scan the current branch before you push.
GitHub Action – attach Warden to a repo so every PR gets an automated review.
GitHub‑native feedback Findings appear as inline PR comments with suggested fixes and are also reported in the GitHub Checks UI, making the review experience seamless for developers.

Quick start (from the README)

# 1. Install the Warden CLI into your repo
npx @sentry/warden init

# 2. Add built‑in review “skills”
#    – a security‑focused review
npx @sentry/warden add security-review
#    – a general code‑quality review
npx @sentry/warden add code-review

# 3. Run a review on the current branch
#    (requires an LLM API key – OpenAI or Anthropic)
export WARDEN_OPENAI_API_KEY=…   # or WARDEN_ANTHROPIC_API_KEY
npx @sentry/warden

# 4. Let Warden automatically fix simple issues
npx @sentry/warden --fix

The full docs are at https://warden.sentry.dev/.

How it works under the hood

  • Skills are stored in a conventional directory (.agents/skills/ or .claude/skills/). Each skill defines the prompt or logic the LLM should use to analyse code.
  • The CLI packages the changed files, sends them to the chosen LLM (OpenAI or Anthropic), and parses the model’s response into actionable findings.
  • In CI, the GitHub Action runs the same process on every PR, then posts the findings as inline comments and aggregates them in the Checks tab.
  • An optional --fix flag attempts to apply suggested edits automatically (e.g., formatting, simple refactors).

Development & contribution

# Clone and set up the repo
git clone git@github.com:getsentry/warden.git
cd warden
pnpm install && pnpm build

# Run unit tests
pnpm test
pnpm test:coverage   # with coverage report

# Run end‑to‑end evaluation suite (needs an LLM API key)
pnpm evals

The packages/evals folder contains a small framework for evaluating skill performance.

License

Warden is released under the FSL‑1.1‑ALv2 license.


Bottom line: Warden gives teams a way to codify AI‑driven code‑review logic once (as reusable “skills”) and then apply it consistently—both locally before a push and automatically on every PR—while surfacing results directly inside GitHub’s UI.

Related

  • Project
  • Project
  • Project
  • Project
  • Project