# warden

Runs Warden on your uncommitted changes before a commit to flag high, medium and low severity issues.

Skill by Sentry. Category: Code quality.

## Install

Project (for this project only):

```sh
npx skills add getsentry/warden --skill warden
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add getsentry/warden --skill warden -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass
- Runlayer: Warn

Installs: 313. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/getsentry/warden/warden)

## Source

[Open the source](https://github.com/getsentry/warden/tree/HEAD/skills/warden). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: warden
description: Run Warden to analyze code changes before committing. Use when asked to "run warden", "check my changes", "review before commit", "warden config", "warden.toml", "create a warden skill", "add trigger", or any Warden-related local development task.
---

Run Warden to analyze code changes before committing.

## References

Read the relevant reference when the task requires deeper detail:

| Document | Read When |
|----------|-----------|
| `<skill-root>/references/cli-reference.md` | Full option details, per-command flags, examples |
| `<skill-root>/references/configuration.md` | Editing warden.toml, triggers, patterns, troubleshooting |
| `<skill-root>/references/config-schema.md` | Exact field names, types, and defaults |
| `<skill-root>/references/creating-skills.md` | Writing custom skills, remote skills, skill discovery |

## Running Warden

```bash
# Analyze uncommitted changes (uses warden.toml triggers)
warden

# Run a specific skill
warden --skill <skill-name>

# Analyze specific files
warden src/auth.ts src/database.ts

# Analyze changes from a git ref
warden main..HEAD
warden HEAD~3

# Auto-apply suggested fixes
warden --fix

# Fail on high-severity findings
warden --fail-on high
```

Set `WARDEN_MODEL` and the WARDEN-prefixed provider API key for that model before running.

## Pre-Commit Workflow

After making code changes and before committing:

1. Run `warden` to analyze uncommitted changes
2. Review the findings
3. Fix issues Warden reports (or use `warden --fix` to auto-apply)
4. Commit the changes

Run Warden once to validate work. Do not loop re-running Warden on the same changes.

## Reading Output

**Severity levels:**
- `high` - Must fix before merge
- `medium` - Worth reviewing
- `low` - Minor improvement

**Exit codes:** `0` = no findings at or above fail threshold. `1` = findings at or above fail threshold.

**Verbosity:** `-v` shows real-time findings. `-vv` shows debug info (tokens, latency). `-q` shows errors and summary only.

## Commands

| Command | Description |
|---------|-------------|
| `warden` | Run analysis (default) |
| `warden init` | Initialize warden.toml and GitHub workflow |
| `warden add [skill]` | Add skill trigger to warden.toml |
| `warden sync [remote]` | Update cached remote skills |
| `warden setup-app` | Create GitHub App via manifest flow |

For full options and flags, read `<skill-root>/references/cli-reference.md`.
````

- Previous: [production-pipelines](https://syn4pse.dev/terminal/tanstack-production-pipelines.md)
- Next: [warden-sweep](https://syn4pse.dev/terminal/warden-sweep.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
