agnix · agent-sh — Claude Code skill: what it does, how to install
Validates agent configuration files against 702 rules and applies safe auto-fixes. Catches syntax and logic issues in skills, hooks, MCP settings, and instructions.
npx skills add agent-sh/agnix --skill agnix -a claude-codeWhat agnix does
This skill runs the agnix command-line linter across project settings. It parses instructions in CLAUDE.md and AGENTS.md, rule files in .cursor/rules/*.mdc, skill descriptions in SKILL.md, and hooks in .claude/settings.json. The engine detects 702 rule violations. It flags vague prompts like "be accurate", detects folder-name discrepancies, and finds missing trigger phrases.
The system requires the agnix binary installed via npm install -g agnix or cargo install agnix-cli. Without this CLI tool present in your environment, the validation commands fail immediately. The skill executes agnix . or targets a specific platform using --target claude-code.
Safe repairs happen automatically when adding --fix. If you want to inspect potential edits without touching disk contents, --dry-run previews every change.
What it helps with
- validate SKILL.md files and *.mcp.json manifests
- remove generic instructions from CLAUDE.md
- fix naming mismatches between folders and skill declarations
- preview configuration fixes without modifying files
Example prompts for the agent
- Lint agent configs with agnix
- Check CLAUDE.md and apply safe fixes
- Run agnix dry-run across the project
How to install agnix
1Skills CLI (Vercel)
npx skills add agent-sh/agnix --skill agnix -a claude-code2Manually: put the files in place
~/.claude/skills/agnix/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agnix/
1Skills CLI (Vercel)
npx skills add agent-sh/agnix --skill agnix -a codex2Manually: put the files in place
.agents/skills/agnix/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add agent-sh/agnix --skill agnix -a cursor2Manually: put the files in place
.cursor/skills/agnix/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install agent-sh/agnix agnix2Manually: put the files in place
.github/skills/agnix/SKILL.md1Skills CLI (Vercel)
npx skills add agent-sh/agnix --skill agnix -a gemini-cli2Platform CLI
gemini skills install https://github.com/agent-sh/agnix --path skills/agnixManually: put the files in place
.devin/skills/agnix/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add agent-sh/agnix --skill agnix -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agnix
How to install agnix in Claude Code?
Run npx skills add agent-sh/agnix --skill agnix -a claude-code in your terminal.
What files does agnix check?
It inspects SKILL.md, CLAUDE.md, AGENTS.md, .claude/settings.json, *.mcp.json, and .cursor/rules/*.mdc against 702 rules.
What CLI dependencies does agnix require?
You must install the agnix executable beforehand using either npm install -g agnix or cargo install agnix-cli.
Source text
SKILL.md · Apache-2.0
--- name: agnix description: "Use when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP'. Validates agent configuration files against 702 rules." allowed-tools: Bash(agnix:*), Bash(cargo:*), Read, Glob, Grep --- # agnix Lint agent configurations (Skills, Hooks, MCP, Memory, Plugins) before they break a workflow, across Claude Code, Codex CLI, OpenCode, Kiro, Cursor, GitHub Copilot and other tools. ## Run 1. `agnix --version`. If it is missing, install with `npm install -g agnix` or `cargo install agnix-cli`. 2. `agnix .` (or the path the user named). 3. If the user asked for fixes: `agnix --fix .`, then run step 2 again to confirm what remains. Otherwise change no files; `agnix --dry-run .` previews the fixes. ## CLI reference | Command | Description | |---------|-------------| | `agnix .` | Validate current project | | `agnix --fix .` | Apply safe auto-fixes | | `agnix --dry-run .` | Show what would be fixed, change nothing | | `agnix --strict .` | Treat warnings as errors | | `agnix --target claude-code .` | Target one tool: `generic` (default), `claude-code`, `cursor`, `codex`, `kiro` | | `agnix --watch .` | Watch mode | | `agnix --format json .` | JSON output | ## Supported files | File 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` | ## Output ``` 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 fixes | Issue | Solution | |-------|----------| | Invalid skill name | Use lowercase with hyphens: `my-skill` | | Generic instructions | Remove "be helpful", "be accurate" | | Missing trigger phrase | Add "Use when..." to description | | Directory/name mismatch | Rename directory to match `name:` field | ## Links - [GitHub](https://github.com/agent-sh/agnix) - [Rules Reference](https://agent-sh.github.io/agnix/docs/rules/)
© agent-sh · Apache-2.0 · agent-sh/agnix
Similar skills
All skills for Agent setup: memory, context, orchestration →agnix by other authors comes first.