What are Skills?
Skills are specialized AI agents that analyze your code for specific issues. Each skill is an expert in a particular domain—bug detection, security review, architecture analysis—and knows exactly what to look for. Warden runs skills against your code changes automatically based on triggers you configure. Skills receive focused chunks of code from the diff pipeline and apply their domain expertise to find issues.How Skills Work
Skill Anatomy
Every skill is a markdown file with YAML frontmatter:Skill Discovery
Warden discovers skills from conventional directories in your repository:- Direct paths:
./custom/my-skill.md - Remote repositories:
getsentry/sentry-skills
Skill Types
Bug Detection
Target specific bug patterns based on historical fixes or known anti-patterns. Example:find-warden-bugs detects issues at architectural seams where bugs have repeatedly occurred—SDK IPC, config threading, concurrent execution.
Architecture Review
Analyze structural health: module complexity, silent failures, type safety gaps, test coverage. Example:architecture-review performs staff-level codebase health reviews, finding monolithic modules and test coverage holes.
Code Quality
Enforce conventions, spot code smells, suggest refactorings. Example:code-simplifier identifies overly complex code and suggests simpler alternatives.
Security Analysis
Find vulnerabilities: injection flaws, auth bypasses, sensitive data exposure. Example: Custom security skills can check for SQL injection, XSS, hardcoded secrets.Configuration
Skills are configured inwarden.toml:
warden.toml
Skill Lifecycle
- Skill resolution: Warden loads the skill definition from
.agents/skills/, remote repo, or direct path - File preparation: Filters files by
pathsandignorePaths, extracts diff hunks - Analysis: Claude receives the hunk + context + skill prompt
- Validation: Findings are validated against hunk line ranges
- Deduplication: Cross-location findings are merged
- Reporting: Findings are formatted and output
Best Practices
One skill, one domainKeep skills focused. A skill that checks “everything” becomes too generic. Separate concerns: security, performance, correctness.
Skill Naming
- Use lowercase with hyphens:
find-auth-bugs,security-review - Name reflects what the skill does:
check-sql-injection,detect-race-conditions - Avoid vague names:
code-quality,best-practices
Trigger Configuration
- Use
pull_requesttriggers for code review workflows - Use
scheduletriggers for full-repo sweeps - Use
localtriggers for manual CLI runs - Scope skills to relevant paths to reduce cost
Cost Management
Understanding skill costs
Understanding skill costs
Each skill invocation uses Claude API tokens:
- Input tokens: hunk + context + skill prompt
- Output tokens: findings + explanations
- Number of changed files (more hunks → more API calls)
- Skill prompt length (longer prompts → higher input cost)
- Context size (larger context → higher input cost)
- Scope skills to specific paths (
paths = ["src/critical/**"]) - Use shorter, focused skill prompts
- Limit context file count in config
- Pin skills to specific triggers (don’t run all skills on every event)
Next Steps
Creating Skills
Write your first skill from scratch
Skill Structure
Deep dive into skill file format
Builtin Skills
Explore Warden’s builtin skills
Remote Skills
Use skills from other repositories