| name | diesel-guard |
| description | Use this skill when the user wants to lint Postgres migrations for unsafe patterns, prevent downtime from bad migrations, or check Diesel/SQLx migration safety. |
diesel-guard Plugin
Linter for dangerous Postgres migration patterns in Diesel and SQLx.
Commands
Check
diesel-guard migration check — Check migrations for unsafe patterns
Usage Examples
- "Lint migrations for unsafe patterns"
- "Initialize diesel-guard config"
- "Check specific migration files"
Installation
cargo install diesel-guard
Or:
brew install ayarotsky/tap/diesel-guard
Examples
diesel-guard init
diesel-guard check
diesel-guard check ./migrations/
Key Features
- Uses libpg_query (Postgres parser)
- Detects table-locking operations
- Works with Diesel and SQLx
- Safety-assured blocks for verified ops
- Version-aware checks
- No DB connection required