Skip to main content
command CX Codex

agnix — Claude Code command: lint agent configs and autofix

agnix is a Claude Code command that checks skills, hooks, MCP servers and memory files against 757 rules, catching quiet breaks as agent configs grow.

Apache-2.0 ★ 493 updated 2026-11-11

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/agnix.md
Open on GitHub

What agnix does

/agnix reads the config files an agent depends on: skills, hooks, MCP servers, memory files, plugins. Behind the checks sit 757 rules covering Claude, Codex CLI, Cursor, GitHub Copilot, Claude and other tools. You get a table of file, line, level, rule code and message, then counts of errors, warnings and items it can repair on its own.

The actual work goes to the agnix:agnix-agent subagent, spawned through Task. No Task tool in the session? The steps in skills/agnix/SKILL.md run locally instead. Findings arrive as JSON between === AGNIX_RESULT === and === END_RESULT ===. Should that block fail to parse, the raw agent output is shown rather than a clean pass.

Arguments: a path (. when you leave it out), --fix to apply repairs, --strict to count warnings as errors, and --target taking generic, claude-code, cursor, codex or kiro. Any other target value falls back to generic, so a typo in a platform name quietly gets you the general rule set.

What it helps with

  • catch a malformed skill name before the agent loads it
  • re-check hooks and MCP config after hand edits
  • rename and repair what needs no human judgement
  • flag vague filler lines in CLAUDE.md
  • run the rule set for a single platform via --target

Example prompts for the agent

  • Lint the agent configs in this repo: /agnix
  • Run /agnix .claude --strict and list what is left after fixes
  • Clean up what you can: /agnix --fix --target cursor

How to install agnix

Manually: put the files in place

.claude/commands/agnix.md

Call it with /agnix. For all projects use ~/.claude/commands/

Questions about agnix

How do I install agnix in Claude Code?

Copy the command file to .claude/commands/agnix.md inside the repo, and /agnix becomes available in Claude.

What does agnix do?

It lints skills, hooks, MCP servers, memory files and plugins against 757 rules for several AI coding tools, reports findings per file and line, and applies fixes for part of them.

Does agnix need anything installed first?

Yes, the agnix CLI itself: npm install -g agnix or cargo install agnix-cli. Without it the command prints an install hint instead of a report.

Source text

agnix.md · Apache-2.0
---
description: Use when user asks to 'lint agent configs', 'validate skills', 'check CLAUDE.md', 'validate hooks', 'lint MCP', or mentions 'agent config issues', 'skill validation'.
codex-description: 'Use when user asks to "lint agent configs", "validate skills", "check CLAUDE.md", "validate hooks", "lint MCP". Validates agent configuration files against 760 rules across 10+ AI tools.'
argument-hint: "[path] [--fix] [--strict] [--target [target]]"
allowed-tools: Task, Read, Bash(agnix:*)
---

# /agnix - Agent Config Linter

Lint agent configurations (Skills, Hooks, MCP, Memory, Plugins) for Claude Code, Codex CLI, Cursor, GitHub Copilot, Kiro and other tools, and show the findings.

## Arguments

From `$ARGUMENTS`:

- **path**: the first argument that is not a flag or the value of `--target`. Default `.`. Remove newlines from it before passing it on.
- **--fix**: apply auto-fixes.
- **--strict**: treat warnings as errors.
- **--target**: `generic` (default), `claude-code`, `cursor`, `codex` or `kiro`, as `--target=X` or `--target X`. Any other value falls back to `generic`.

## Run

Spawn `agnix:agnix-agent` with:

```
Validate agent configurations.
Path: {path}
Fix: {true|false}
Strict: {true|false}
Target: {target}

Return structured results between === AGNIX_RESULT === markers.
```

Without the Task tool, run the steps of the plugin's `skills/agnix/SKILL.md` in this session.

Parse the JSON between `=== AGNIX_RESULT ===` and `=== END_RESULT ===` as JSON. If the block is missing or does not parse, show the agent's raw output instead of reporting zero issues.

## Report

No issues:

```markdown
## Validation Passed

No issues found in agent configurations.

- Files validated: N
- Target: {target}
```

Issues found:

```markdown
## Agent Config Issues

| File | Line | Level | Rule | Message |
|------|------|-------|------|---------|
| SKILL.md | 3 | error | AS-004 | Invalid name |
| CLAUDE.md | 15 | warning | PE-003 | Generic instruction |

## Summary

- **Errors**: N
- **Warnings**: N
- **Fixable**: N

## Do Next

- [ ] Run `/agnix --fix` to auto-fix {fixable} issues
- [ ] Review remaining issues manually
```

After `--fix`:

```markdown
## Fixed Issues

| File | Line | Rule | Fix Applied |
|------|------|------|-------------|
| SKILL.md | 3 | AS-004 | Renamed to lowercase |

**Fixed**: N issues
**Remaining**: N issues (manual review needed)
```

## Errors

- agnix not installed: show the install command, `npm install -g agnix` or `cargo install agnix-cli`.
- Path not found: `Path not found: [path]`.
- agnix output that cannot be parsed: show the raw output.

## Links

- [agnix GitHub](https://github.com/agent-sh/agnix)
- [Rules Reference](https://github.com/agent-sh/agnix/blob/main/knowledge-base/VALIDATION-RULES.md)

© agent-sh · Apache-2.0 · agent-sh/agnix

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set5

Project sponsors

Companies that keep this analytics open