agnix
Checks AI agent config files such as SKILL.md, CLAUDE.md, hooks and MCP configs against agnix's lint rules
Manage one project's AI coding rules, skills and agents, and generate configs for many coding tools
By Na'aman Hirschfeld (individual) Go Local · stdio Developer tools
65 popularity score ★ 167 ↓ 17k/wk
Opens the app, which asks before it adds the server.
claude mcp add ai-rulez -- npx -y ai-rulez@latest mcp{
"mcpServers": {
"ai-rulez": {
"command": "npx",
"args": [
"-y",
"ai-rulez@latest",
"mcp"
]
}
}
}{
"mcpServers": {
"ai-rulez": {
"command": "npx",
"args": [
"-y",
"ai-rulez@latest",
"mcp"
]
}
}
}{
"servers": {
"ai-rulez": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ai-rulez@latest",
"mcp"
]
}
}
}[mcp_servers.ai-rulez]
command = "npx"
args = ["-y", "ai-rulez@latest", "mcp"]gemini mcp add --scope user ai-rulez npx -- -y ai-rulez@latest mcpOpens the app, which asks before it adds the server.
claude mcp add ai-rulez -- uvx ai-rulez mcp{
"mcpServers": {
"ai-rulez": {
"command": "uvx",
"args": [
"ai-rulez",
"mcp"
]
}
}
}{
"mcpServers": {
"ai-rulez": {
"command": "uvx",
"args": [
"ai-rulez",
"mcp"
]
}
}
}{
"servers": {
"ai-rulez": {
"type": "stdio",
"command": "uvx",
"args": [
"ai-rulez",
"mcp"
]
}
}
}[mcp_servers.ai-rulez]
command = "uvx"
args = ["ai-rulez", "mcp"]gemini mcp add --scope user ai-rulez uvx -- ai-rulez mcpAI_RULEZ_GIT_TOKEN secret |
Optional: Git access token for private skill and include repositories, sent over https only (a git credential helper also works). |
|---|---|
AI_RULEZ_GIT_TOKEN_HOSTS |
Optional: Comma-separated hosts the git token may be sent to. |
AI_RULEZ_MAX_CLONE_BYTES |
Optional: Clone size cap in bytes for git skill sources (256 MiB); max_clone_bytes per source overrides it. |
AI_RULEZ_MAX_CLONE_FILES |
Optional: Cap on entries in a git skill source clone; max_clone_files per source overrides it. |
ai-rulez is a command-line tool that keeps one project's instructions for coding assistants in a single `.ai-rulez/` folder. Rules, context files, skills, agents, commands, checks, hooks and MCP server entries all live there. From that folder it writes each tool's own files for Claude Code, Cursor, Copilot, Windsurf, Gemini, Codex and others.
Running `ai-rulez mcp` starts a stdio MCP server over the same folder. An assistant can then create and edit that content, change config.toml and regenerate the outputs. It can also pull read-only reports on token counts, cost, lock state and policy. Add `--serve-skills` and the process hands out skills on demand through the MCP Skills extension, so a skill is loaded only when a session asks for it.
The guide counts 71 tools. That figure covers the authoring set in internal/mcp/tools.go, but skills mode registers six more in serve_tools.go and context serving adds two in serve_context.go, which makes 79. Which of them a client sees depends on the flags. `--read-only` drops every tool that writes, and `--tools` keeps only the names you give it. The session exposure report the README now describes is a command-line feature, and no MCP tool reaches it.
| Runtime | Node.js |
|---|---|
| Runs on | macOS, Windows, Linux |
| Also |
|
Node.js runs the npx way and uv runs the uvx way. A Homebrew, Go or pip install of the `ai-rulez` binary works too. The project needs an `.ai-rulez/` configuration, which `init_project` or `ai-rulez init` creates. Private skill repositories need `AI_RULEZ_GIT_TOKEN` or a git credential helper. The `judge` tool works only when your user config names a model provider and allows it.
stdio only: no HTTP transport, and no elicitation, sampling or roots. Directory arguments must lie inside the folder the server was started in unless it is started with `--root <dir>` or `--allow-any-dir`. Signing, approving, publishing and other commands that use credentials or the network for trust are command-line only, as is `--allow-local-drift`. Lists page at 100 entries. Skill sources default to at most 200 skills, 64 MiB of files and a 256 MiB clone (`AI_RULEZ_MAX_CLONE_BYTES`). In skills mode two skills with the same name stop the server from starting. Its docs mark the pre-OKF folder layout as deprecated (`migrate okf` converts it).
Suits a team or developer who keeps one shared set of assistant rules and skills for several coding tools and wants the assistant to edit and regenerate them instead of hand-editing files. It runs locally on the project folder with no account. Skills mode also helps a large repository that pays for every skill in every session today. Pick something else if one coding tool and its own rules file are enough, or if you only want an assistant to read files. The tools are tied to the `.ai-rulez/` format, and most of them write.
38 only read, 13 change things, 9 can delete or overwrite.
init_project changesread_configupdate_config changesgenerate_outputs changesclean_outputs deletesvalidate_configdoctorscan_contentjudgerun_verifierslist_verifierscreate_domain changeslist_domainsdelete_domain deletescreate_rule changesread_ruleupdate_rule changesdelete_rule deleteslist_rulescreate_check changesdelete_check deleteslist_checkscreate_context changesdelete_context deleteslist_contextcreate_skill changesdelete_skill deleteslist_skillsread_contextupdate_context changesread_skillupdate_skill deleteslist_installed_skillslist_includesadd_include changesinstall_skill changesuninstall_skill deletesadd_profile changeslist_rolesresolve_rolelock_statuslock_diffcataloglock_outdatedupdate_planupdate deletestoken_reportcost_reportsbomokf_validateapprovals_statuspolicy_showfind_skillsearch_skillsget_skillload_skilllist_skill_resourcesread_skill_filefind_contextload_contextai-rulez://configai-rulez://catalogai-rulez://catalog{?path,scope,recursive}ai-rulez://{kind}/{name}ai-rulez://domains/{domain}/{kind}/{name}skill://<name>/<path>context://<scope>/<name>author-skilladd-rulereview-configtrim-context