阿格尼克斯
- 作者仓库星标 264
- 作者仓库 agnix
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @agent-sh · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
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)
# agnix
Lint agent configurations before they break your workflow. Validates Skills, Hooks, MCP, Memory, Plugins across 10+ AI tools including Claude Code, Cursor, GitHub Copilot, Codex CLI, OpenCode, Gemini CLI, Cline, Windsurf, Kiro, and Amp.
## Parse Arguments
```javascript
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const targetPath = args.find(a => !a.startsWith('--')) || '.';
const fix = args.includes('--fix');
const strict = args.includes('--strict');
let target = args.find(a => a.startsWith('--target='))?.split('=')[1];
if (!target) {
const idx = args.indexOf('--target');
if (idx !== -1 && args[idx + 1]) target = args[idx + 1];
}
target = target || 'claude-code';
```
## When to Use
Invoke when user asks to:
- "Lint my agent configs"
- "Validate my skills"
- "Check my CLAUDE.md"
- "Validate hooks"
- "Lint MCP configs"
- "Fix agent configuration issues"
- "Check if my SKILL.md is correct"
## Prerequisites
agnix must be installed. Check with:
```bash
agnix --version
```
If not installed:
```bash
cargo install agnix-cli
```
## Execution
### 1. Validate Project
```bash
agnix .
```
### 2. If Issues Found and Fix Requested
```bash
agnix --fix .
```
### 3. Re-validate to Confirm
```bash
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 - re-validate on changes |
| `agnix --format json .` | JSON output |
| `agnix --format sarif .` | SARIF for GitHub Code Scanning |
## Supported Files
| File Type | Examples |
|-----------|----------|
| Skills | `SKILL.md` |
| Memory | `CLAUDE.md`, `AGENTS.md` |
| Hooks | `${STATE_DIR}/settings.json` |
| MCP | `*.mcp.json` |
| Cursor | `.cursor/rules/*.mdc` |
| Copilot | `.github/copilot-instructions.md` |
## 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)
```
Exit codes:
- `0` - No errors (warnings allowed)
- `1` - Errors found
- `2` - Invalid arguments
## Rule Categories
| Prefix | Category | Examples |
|--------|----------|----------|
| AS-* | Agent Skills | Name format, triggers, description |
| CC-* | Claude Code | Hooks, memory, plugins |
| MCP-* | MCP Protocol | Server config, tool definitions |
| PE-* | Prompt Engineering | Generic instructions, redundancy |
| XP-* | Cross-Platform | Compatibility across tools |
| AGM-* | AGENTS.md | Structure, sections |
| COP-* | GitHub Copilot | Instructions format |
| CUR-* | Cursor | MDC format, rules |
## Common Issues & Fixes
| Issue | Solution |
|-------|----------|
| Invalid skill name | Use lowercase with hyphens: `my-skill` |
| Directory/name mismatch | Rename directory to match `name:` field |
| Generic instructions | Remove "be helpful", "be accurate" |
| Missing trigger phrase | Add "Use when..." to description |
## Integration
This skill is standalone and can be invoked directly via `/agnix`.
For CI integration, see the [GitHub Action](https://github.com/agent-sh/agnix#github-action).
## Links
- [GitHub](https://github.com/agent-sh/agnix)
- [Rules Reference](https://github.com/agent-sh/agnix/blob/main/knowledge-base/VALIDATION-RULES.md)
- [Configuration](https://github.com/agent-sh/agnix/blob/main/docs/CONFIGURATION.md)
章节与文件索引
按说明文件中的顺序排列。
何时使用
先决条件
CLI 参考
支持的文件
输出格式
文件/命令 -> agnix . · agnix --fix . · agnix --strict . · agnix --target claude-code . · agnix --target cursor . · agnix --watch . · agnix --format json . · agnix --format sarif .
内容校验值 -> 3caea9588933
当前原文的自动摘译,尚未人工审校。
何时使用
当用户要求:“检查我的代理配置”“验证我的技能”“检查我的 CLAUDE.md”“验证挂钩”时调用
先决条件
必须安装 agnix。检查: 如果未安装:
CLI 参考
命令 · 描述
agnix .· 验证当前项目agnix --fix .· 自动修复问题agnix --strict .· 将警告视为错误agnix --target claude-code .· 仅 Claude Code 规则支持的文件
文件类型 · 示例技巧 ·
SKILL.md内存 ·CLAUDE.md,AGENTS.md钩子 ·${STATE_DIR}/settings.jsonMCP ·*.mcp.json输出格式
退出代码:
0- 无错误(允许警告)1- 发现错误2- 无效参数