New to Claude Skills? Learn how to install them →

Wgetsentry on GitHub

Warden

Free

Analyze code changes before committing.

Get this skill

Free · Opens the source repo

What Warden does

Warden is a command-line tool designed to help developers analyze their code changes prior to committing them to a version control system. By running Warden, developers can ensure that their code meets predefined quality standards and adheres to best practices. The tool leverages a configuration file, warden.toml, to define triggers and rules for analysis, allowing for a customizable workflow that fits into various development environments.

The primary function of Warden is to analyze uncommitted changes and provide feedback on potential issues. This includes identifying high-severity findings that must be addressed before merging code, as well as medium and low-severity suggestions for improvement. Developers can run Warden with specific commands to target particular files or analyze changes from specific git references, making it flexible for different use cases.

Warden also offers an auto-fix feature that can apply suggested corrections automatically, streamlining the process of code review and refinement. This can be particularly useful in a pre-commit workflow, where developers can quickly address issues without extensive manual intervention. The tool is designed for use in local development environments and integrates seamlessly into existing workflows, making it a valuable addition for teams focused on maintaining code quality.

Overall, Warden is suitable for developers who want to implement a structured approach to code changes, ensuring that their contributions are both high-quality and compliant with team standards. It is particularly beneficial in collaborative projects where code quality is paramount, and teams need to maintain a consistent standard across multiple contributors.

When to use it

Use Warden when preparing to commit code changes to ensure they meet quality standards and avoid introducing issues.

When not to use it

Warden may not be suitable for quick, one-off scripts or projects where formal code review processes are not required.

What you can build with it

Pre-Commit Code Review

Run Warden before committing changes to ensure that all code adheres to quality standards and identify any issues.

Specific File Analysis

Use Warden to analyze specific files by providing their paths, allowing targeted code reviews.

Integrating with Git Workflows

Incorporate Warden into your Git workflow to maintain code quality across team contributions.

How to install Warden

View source

1. Install with the skills CLI

npx skills add getsentry/xcodebuildmcp/warden --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by getsentry

Run Warden to analyze code changes before committing.

References

Read the relevant reference when the task requires deeper detail:

DocumentRead When
${CLAUDE_SKILL_ROOT}/references/cli-reference.mdFull option details, per-command flags, examples
${CLAUDE_SKILL_ROOT}/references/configuration.mdEditing warden.toml, triggers, patterns, troubleshooting
${CLAUDE_SKILL_ROOT}/references/config-schema.mdExact field names, types, and defaults
${CLAUDE_SKILL_ROOT}/references/creating-skills.mdWriting custom skills, remote skills, skill discovery

Running Warden

# 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_ANTHROPIC_API_KEY or log in via claude login 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

CommandDescription
wardenRun analysis (default)
warden initInitialize warden.toml and GitHub workflow
warden add [skill]Add skill trigger to warden.toml
warden sync [remote]Update cached remote skills
warden setup-appCreate GitHub App via manifest flow

For full options and flags, read ${CLAUDE_SKILL_ROOT}/references/cli-reference.md.

Frequently asked questions about Warden

Similar skills