Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add agent-sh/agnix --skill agnix -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/agnix/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agnix/

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.

From the same set3

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor