<!-- AUTO-GENERATED by scripts/gen-adapters.js - DO NOT EDIT -->
---
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'.
agent: general
---

> **OpenCode Note**: Invoke agents using `@agent-name` syntax.
> Available agents: task-discoverer, exploration-agent, planning-agent,
> implementation-agent, deslop-agent, delivery-validator, sync-docs-agent, consult-agent
> Example: `@exploration-agent analyze the codebase`


# /agnix - Agent Config Linter

Lint agent configurations before they break your workflow. Validates Skills, Hooks, MCP, Memory, Plugins across Claude Code, Cursor, GitHub Copilot, and Codex CLI.

## Arguments

Parse from $ARGUMENTS or use defaults:

- **Path**: Target path (default: `.`)
- **--fix**: Auto-fix issues
- **--strict**: Treat warnings as errors
- **--target**: `claude-code`, `cursor`, `codex`, or `generic` (default)

## Execution

### Phase 1: Spawn Agnix Agent

*(JavaScript reference - not executable in OpenCode)*

### Phase 2: Parse Agent Results

Extract structured JSON from agent output:

*(JavaScript reference - not executable in OpenCode)*

### Phase 3: Present Results

#### 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)
```

## Supported Files

| File Type | Examples |
|-----------|----------|
| Skills | `SKILL.md` |
| Memory | `CLAUDE.md`, `AGENTS.md` |
| Hooks | `${STATE_DIR}/settings.json` (Claude: .opencode/, OpenCode: .opencode/, Codex: .codex/) |
| MCP | `*.mcp.json` |
| Cursor | `.cursor/rules/*.mdc` |
| Copilot | `.github/copilot-instructions.md` |

## Error Handling

- **agnix not installed**: Show install command `cargo install agnix-cli`
- **Invalid path**: Exit with "Path not found: [path]"
- **Parse errors**: Show raw agnix output

## Links

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