ai-rulez CLI

One rules directory generates instructions, skills, MCP and settings for 52 AI coding assistants and checks them in CI

  • 169 ★ on the repository
  • Last commit
CLI

Extended access

Why this level

  • The generate command overwrites assistant files in the repository, including `AGENTS.md` and `CLAUDE.md`
  • Remote includes pull in third-party rules and skills, so they are pinned in the lock file
All reasons and checks

goldziher/ai-rulez

Install

Manual install

npx ai-rulez@latest init acme

Creates `.ai-rulez/`, then presets go in `.ai-rulez/config.toml` and `ai-rulez generate` creates the files.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The generate command overwrites assistant files in the repository, including `AGENTS.md` and `CLAUDE.md`
  • Remote includes pull in third-party rules and skills, so they are pinned in the lock file

This is third-party code. Review the repository files before installing.

What it does

ai-rulez keeps instructions for coding assistants in a `.ai-rulez/` directory: rules, context, skills, agents, commands, hooks, permissions and MCP servers. From that source the `generate` command writes the native files of each tool: `AGENTS.md`, `CLAUDE.md`, `.cursor/rules/`, `.github/instructions/`, skill folders, MCP and settings files. There are 52 built-in presets, from Claude Code, Cursor, Codex and Copilot to Gemini CLI, Goose, Kiro, OpenCode and Qwen Code. Getting started takes half a minute: `npx ai-rulez@latest init acme`, then presets in `.ai-rulez/config.toml`, for example `presets = ["claude", "cursor", "codex", "copilot", "gemini"]`, and a rule through `add rule`. CI checking works like this: `generate --check` catches drift, while `validate` lints content, links and security with `AR` rule codes and even works on plain `AGENTS.md` and `SKILL.md` files. Governance resembles dependencies. A lock file pins remote includes, installed skills and authored content, while Sigstore signatures, SBOMs and an organization policy cover the rest. Plugins, marketplaces and Agent Plugins manifests are built from the same source.

Who it is for. Teams where developers use different assistants and rules should live in one place instead of ten files.

Good fit when

  • Part of the team uses Cursor and part uses Claude Code, and testing rules must match for everyone
  • CI has to catch drift in generated files with `ai-rulez generate --check`
  • Skill folders and `SKILL.md` files sit in the repository and `ai-rulez validate` checks their quality and security
  • Organization rules are pulled in as a remote include pinned in the lock file
  • A plugin bundle with an Agent Plugins manifest is built from the same source for publishing

Not a fit when

  • The team uses one assistant and one `CLAUDE.md`: a generator adds a needless layer
  • You want to edit assistant files by hand in each tool: the next generation overwrites generated output
  • You only need a one-time move of rules between two formats: manual copying is enough

Example request

Initialize ai-rulez in this repository with the claude, cursor and codex presets, add the rule "every bug fix ships with a regression test" and generate the files

Limitations

Generated assistant files are derivatives: manual edits in them are overwritten by the next `generate` run, and `.ai-rulez/` is what you edit. Assistants accept different feature sets, and the Supported harnesses table in the docs shows what each of the 52 presets receives. npm needs Node.js 22 or newer, PyPI needs Python 3.11 or newer. The Go install path carries a `/v5` suffix. The example configuration version is 5.0, and older projects may need migration.

How to disable. Delete the `.ai-rulez/` directory and generated files such as `AGENTS.md`, `CLAUDE.md` and `.cursor/rules/` if you no longer need them. The CLI is removed with `npm uninstall -g ai-rulez` or `brew uninstall ai-rulez`.

FAQ

How do I install ai-rulez?

`brew install goldziher/tap/ai-rulez`, `npm install -g ai-rulez`, `pipx install ai-rulez` or `go install github.com/Goldziher/ai-rulez/v5/cmd/ai-rulez@latest`. Without installing, `npx ai-rulez@latest <command>` or `uvx ai-rulez <command>` works.

What files does generate create?

For the chosen presets: `AGENTS.md`, `CLAUDE.md` importing `@AGENTS.md`, the `.agents/skills/` and `.claude/skills/` directories, and MCP files such as `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json` and `.codex/config.toml`.

How do I catch drift in CI?

Add a `ai-rulez generate --check` step: it fails if generated files differ from the source. `ai-rulez validate` additionally checks content, links and security.

Is my assistant supported?

There are 52 built-in presets, from Claude Code, Cursor, Codex and Copilot to Gemini CLI, Goose, Kiro, OpenCode, Qwen Code and Warp. A missing tool is added as a custom preset.

How is ai-rulez different from Rulesync and Ruler?

All three spread instructions from one source across assistants. ai-rulez adds a validate check with rule codes, a lock file with Sigstore signatures and SBOMs, and building plugins and Agent Plugins manifests.

Discussion

No questions or reviews yet.

CLI tools

AI-RULES turns a project's architecture rules into a skill and prompts an agent can review code and repair violations against.

SkillMinimal access424Repository stars

A CLI that keeps rules, commands, MCP, subagents and skills in one source and generates config files for many AI coding tools

CLIExtended access1.6KRepository stars

A CLI that analyses a repository in six model phases and writes AGENTS.md or CLAUDE.md, with ExecPlan planning on top.

CLIExtended access124Repository stars

AI Code Toolkit

aicode-toolkit

Plugins and MCP servers for coding agents: template-based projects, patterns before a file edit and review against YAML rules.

PluginExtended access160Repository stars

A skill that analyzes a repository and generates files for AI agents: AGENTS.md, pointers, reviewers, CI and templates

SkillExtended access238Repository stars

A CLI that keeps agent instructions in one place and distributes them to the right config files for Claude Code, Cursor, Codex, Copilot and two dozen other tool

CLIExtended access3KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
ai-rulez (this card)no169
Rulesyncno1,600one source of rules, commands, MCP and skills, while this adds a validate check with rule codes, a lock file and plugin building
Rulerno2,968spreads instructions across assistant configs, while this has 52 presets, permissions, hooks and signed includes

README in short

The README calls the project one source for the rules, skills and settings of every assistant, shows a thirty-second example and the list of generated files. Four install methods, a table of 52 presets with tool names and documentation links follow.

README badge

Report a problem