agnix config linter
agnix validates agent configuration files against 425 rules sourced from
official specs and real breakage patterns. Catches the silent failures where a
skill never triggers, a hook is ignored, or a config works in one tool but
breaks in another. Includes auto-fix.
Covers Claude Code, Codex CLI, OpenCode, Cursor, GitHub Copilot, and more.
When to use
- "Lint my agent configs" / "validate my skills" / "check my CLAUDE.md"
- "Validate hooks" / "lint MCP configs"
- "My skill isn't triggering" — likely a malformed
name/description
- "Fix agent configuration issues"
- Before committing changes to any agent config file (CI gate)
Files it validates
| Type |
Examples |
| Skills |
SKILL.md |
| Memory |
CLAUDE.md, AGENTS.md |
| Hooks |
.claude/settings.json |
| MCP |
*.mcp.json |
| Cursor |
.cursor/rules/*.mdc |
| Copilot |
.github/copilot-instructions.md |
How to run
Check install: agnix --version.
If missing, install one of:
npm install -g agnix (recommended, all platforms)
brew tap agent-sh/agnix && brew install agnix
cargo install agnix-cli
Validate: agnix .
Auto-fix if requested: agnix --fix .
(--fix-safe for only safe fixes, --fix-unsafe to include risky ones.)
Re-validate to confirm: agnix .
CLI reference
| Command |
Description |
agnix . |
Validate current project |
agnix --fix . |
Auto-fix issues |
agnix --strict . |
Treat warnings as errors |
agnix --target claude-code . |
Only Claude Code rules |
agnix --target cursor . |
Only Cursor rules |
agnix --watch . |
Watch mode |
agnix --format json . |
JSON output (for CI parsing) |
Output format
CLAUDE.md:15:1 warning: Generic instruction 'Be helpful' [fixable]
help: Remove generic instructions. Claude already knows this.
skills/review/SKILL.md:3:1 error: Invalid name [fixable]
help: Use lowercase letters and hyphens only
Found 1 error, 1 warning (2 fixable)
Common issues and fixes
| Issue |
Fix |
| Invalid skill name |
Use lowercase with hyphens: my-skill |
| Generic instructions |
Remove "be helpful", "be accurate" — the model already knows |
| Missing trigger phrase |
Add a "Use when…" line to the description (drives auto-detection) |
| Directory/name mismatch |
Rename the directory to match the name: field |
Gotchas
- A wrong/missing trigger phrase makes a skill effectively invisible — agnix
flags this directly, which is the most common reason "my skill doesn't fire."
--fix-unsafe can change semantics; review the diff before committing.
- Use
--strict in CI so warnings fail the build.
Links
1---2name: agnix-config-linter3description: "Use when asked to lint, validate, or fix agent config files — CLAUDE.md, SKILL.md, AGENTS.md, hooks, MCP configs, .cursor rules, or copilot-instructions — e.g. 'lint my agent configs', 'validate my skills', 'check CLAUDE.md', 'why doesn't my skill trigger', 'validate hooks', 'lint MCP'."4version: 1.0.05license: MIT6tags: [agnix, linter, agent-config, skill-md, claude-md, mcp, hooks, cursor, copilot, validation]7source: https://github.com/avifenesh/agnix8derived_from: awesomeclaude9prerequisites:10 commands: [agnix]11metadata:12 source: https://skillmd.com/skills/aashutosh396/agnix-config-linter13---1415# agnix config linter1617`agnix` validates agent configuration files against 425 rules sourced from18official specs and real breakage patterns. Catches the silent failures where a19skill never triggers, a hook is ignored, or a config works in one tool but20breaks in another. Includes auto-fix.2122Covers Claude Code, Codex CLI, OpenCode, Cursor, GitHub Copilot, and more.2324## When to use2526- "Lint my agent configs" / "validate my skills" / "check my CLAUDE.md"27- "Validate hooks" / "lint MCP configs"28- "My skill isn't triggering" — likely a malformed `name`/`description`29- "Fix agent configuration issues"30- Before committing changes to any agent config file (CI gate)3132## Files it validates3334| Type | Examples |35|--------|----------|36| Skills | `SKILL.md` |37| Memory | `CLAUDE.md`, `AGENTS.md` |38| Hooks | `.claude/settings.json` |39| MCP | `*.mcp.json` |40| Cursor | `.cursor/rules/*.mdc` |41| Copilot| `.github/copilot-instructions.md` |4243## How to run44451. Check install: `agnix --version`.46 If missing, install one of:47 - `npm install -g agnix` (recommended, all platforms)48 - `brew tap agent-sh/agnix && brew install agnix`49 - `cargo install agnix-cli`50512. Validate: `agnix .`52533. Auto-fix if requested: `agnix --fix .`54 (`--fix-safe` for only safe fixes, `--fix-unsafe` to include risky ones.)55564. Re-validate to confirm: `agnix .`5758## CLI reference5960| Command | Description |61|---------|-------------|62| `agnix .` | Validate current project |63| `agnix --fix .` | Auto-fix issues |64| `agnix --strict .` | Treat warnings as errors |65| `agnix --target claude-code .` | Only Claude Code rules |66| `agnix --target cursor .` | Only Cursor rules |67| `agnix --watch .` | Watch mode |68| `agnix --format json .` | JSON output (for CI parsing) |6970## Output format7172```73CLAUDE.md:15:1 warning: Generic instruction 'Be helpful' [fixable]74 help: Remove generic instructions. Claude already knows this.7576skills/review/SKILL.md:3:1 error: Invalid name [fixable]77 help: Use lowercase letters and hyphens only7879Found 1 error, 1 warning (2 fixable)80```8182## Common issues and fixes8384| Issue | Fix |85|-------|-----|86| Invalid skill name | Use lowercase with hyphens: `my-skill` |87| Generic instructions | Remove "be helpful", "be accurate" — the model already knows |88| Missing trigger phrase | Add a "Use when…" line to the `description` (drives auto-detection) |89| Directory/name mismatch | Rename the directory to match the `name:` field |9091## Gotchas9293- A wrong/missing trigger phrase makes a skill effectively invisible — agnix94 flags this directly, which is the most common reason "my skill doesn't fire."95- `--fix-unsafe` can change semantics; review the diff before committing.96- Use `--strict` in CI so warnings fail the build.9798## Links99100- Rules reference: https://agent-sh.github.io/agnix/docs/rules/101- Playground (paste a config, see diagnostics): https://agent-sh.github.io/agnix/playground