AI Rulez README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the AI Rulez listing page.

AI-Rulez

One source for the rules, skills and settings of every AI coding assistant

npm version PyPI version Homebrew version Go version CI License Documentation

Documentation · Quick Start · Examples


What it is

ai-rulez keeps the instructions for your AI coding assistants in one directory, .ai-rulez/: rules, context, skills, agents, commands, hooks, permissions and MCP servers. From that source it generates the native files of each assistant your team uses (AGENTS.md, CLAUDE.md, .cursor/rules/, .github/instructions/, skill folders, MCP and settings files) for 52 tools, and keeps them in sync.

  • One source, every tool. Edit .ai-rulez/, run generate, and Claude Code, Cursor, Codex, Copilot, Gemini CLI and the rest get the same guidance in their own format.
  • Checked in CI. generate --check catches drift; validate lints content, links and security issues with stable AR rule codes, and also works on plain AGENTS.md and SKILL.md files with no configuration.
  • Governed like dependencies. A lock file pins remote includes, installed skills and authored content; approvals, Sigstore signatures, SBOMs and an organization policy cover the rest.
  • Packaged for distribution. Build plugin bundles and marketplaces, Agent Plugins and ARD manifests, and publish them.

30-second example

Terminal
npx ai-rulez@latest init acme

Set the tools you use in .ai-rulez/config.toml:

toml
version = "5.0"
name = "acme"
presets = ["claude", "cursor", "codex", "copilot", "gemini"]

Add a rule and generate:

Terminal
npx ai-rulez@latest add rule testing --content '# Testing

- Every bug fix ships with a regression test.'
npx ai-rulez@latest generate
text
AGENTS.md                # rules and context, read by Codex, Cursor, Copilot and Gemini CLI
CLAUDE.md                # imports @AGENTS.md for Claude Code
.agents/skills/          # skills
.claude/skills/
.gemini/settings.json    # points Gemini CLI at AGENTS.md
.mcp.json, .cursor/mcp.json, .vscode/mcp.json, .codex/config.toml

Commit .ai-rulez/ with the generated files, and add ai-rulez generate --check to CI. The Quick start walks through it in five minutes.

ai-rulez init and generate: one .ai-rulez source becomes the native files of several AI tools

Install

bash
brew install goldziher/tap/ai-rulez                                # Homebrew (macOS, Linux)
npm install -g ai-rulez                                            # npm (Node.js 22+)
pipx install ai-rulez                                              # PyPI (Python 3.11+); or uv tool install ai-rulez
go install github.com/Goldziher/ai-rulez/v5/cmd/ai-rulez@latest    # Go (note the /v5)

On Windows x64, install with Scoop:

powershell
scoop bucket add goldziher https://github.com/Goldziher/scoop-bucket
scoop install goldziher/ai-rulez

Or run it without installing: npx ai-rulez@latest <command> or uvx ai-rulez <command>. See Installation for platforms, shell completion and git hooks.

Supported tools

52 built-in presets, one per assistant, CLI agent or IDE integration. Combine any of them in presets = [...]; Supported harnesses shows which rules, skills, agents, commands, MCP servers, hooks and permissions each one receives. A tool that is not listed can be added as a custom preset.

All 52 built-in presets
PresetTool
aiassistantJetBrains AI Assistant
ampSourcegraph Amp
antigravityGoogle Antigravity
augmentAugment Code
bazBaz
bobIBM Bob
claudeClaude Code
clineCline
codebuddyCodeBuddy Code
codebuffCodebuff
codewhaleCodewhale
codexOpenAI Codex
commandcodeCommand Code
copilotGitHub Copilot
copilot-cliGitHub Copilot CLI
cortexSnowflake Cortex Code
crushCrush
cursorCursor
deepagentsDeep Agents Code
devinDevin CLI
dshDeepSeek Harness
factoryFactory Droid
geminiGemini CLI
gitlab-duoGitLab Duo CLI
goosegoose
grokGrok Build CLI
hermesHermes Agent
junieJetBrains Junie
kiloKilo Code
kimiKimi Code
kiroKiro
lettaLetta Code
mimocodeMiMo Code
museMeta Muse Code
ompoh-my-pi
openclawOpenClaw
opencodeOpenCode
pipi
poolsidePoolside Pool
qoderQoder
qwenQwen Code
reasonixReasonix
replitReplit Agent
rovodevAtlassian Rovo Dev
taktTakt
traeTrae
vibeMistral Vibe
warpWarp
xumXum
zcodeZCode
zedZed
zoocodeZoo Code

What else it does

AreaCommandsDocs
Authoradd, edit, show, list, remove, domain, profile, include, skill installConfiguration, Rules, Skills, Includes
Importinit --from auto, convert, migrate v5CLI, Migrating to v5
Generategenerate, generate --user, generate --recursive, generate --watch, cleanHarnesses, Hooks and settings, Monorepo
Validatevalidate, scan, verifiers run, judge, reviewStrict validation, Verifiers, Judge
Governlock, update, approve, sign, verify, sbomLock file, Signing, Policy
Bundle and publishgenerate --plugin, verify --plugin, publishPlugins, Publish
Operatemcp --serve-skills, search, eval, tokens, cost, catalog, telemetryMCP server, Evals
Embedpkg/airulezGo API

validate --strict flags a defect, --explain describes it, and generate --check fails on drift:

ai-rulez validate --strict flags a defect, --explain describes it, and generate --check fails on drift

verify --plugin reports hand-edited or stray files in a plugin bundle, and generate --plugin restores it:

ai-rulez verify --plugin reporting changed and extra files in a plugin bundle, then generate --plugin restoring it

Claude Code and Codex discover native skills through their names and descriptions, then load skill bodies on demand. In repositories with nested skill directories, metadata from multiple scopes can accumulate as a session moves between them. MCP delivery keeps served skills out of the native catalog. For Claude Code, generated project guidance tells Claude when to search for served skills using the task and repository path. Skill selection still depends on the model and client settings. Compare delivery options.

ai-rulez tokens before and after serving skills over MCP, then find_skill and load_skill

In a monorepo, generate --recursive and validate --recursive process every nested .ai-rulez/:

ai-rulez generate --recursive over two nested roots, recursive validation, and a token budget check

How it compares

Static checks of ai-rulez scan against other open-source skill scanners, on a public dataset we did not write:

1384 skills (839 malicious, 545 benign) from the MaliciousSkillBench source-disjoint test partition, static, text-only, no LLM. Scored on each tool's own verdict; intervals are 95% clustered bootstrap.

ToolVersionRecallFalse-positive ratePrecisionF1
ai-rulez5.11.10.195 (0.139-0.271)0.338 (0.297-0.378)0.4710.276 (0.210-0.354)
skill-scanner2.3.20.077 (0.044-0.125)0.040 (0.025-0.058)0.7470.140 (0.082-0.216)
skillspector2.13.40.113 (0.073-0.167)0.194 (0.161-0.228)0.4730.183 (0.124-0.254)

That table is the last held-out read, of release 5.11.1. Unreleased changes are measured only on the dev partition, which rule changes are tuned on, so expect lower numbers on held-out sources. ai-rulez-threat is scan --fail-on threat, the gate to compare with the other scanners; ai-rulez is --fail-on warning:

8213 skills (6523 malicious, 1690 benign) from the MaliciousSkillBench source-disjoint dev partition, static, text-only, no LLM. Scored on each tool's own verdict; intervals are 95% clustered bootstrap.

ToolVersionRecallFalse-positive ratePrecisionF1
ai-rulez-threatunreleased0.225 (0.209-0.242)0.007 (0.004-0.011)0.9920.367 (0.345-0.389)
ai-rulezunreleased0.437 (0.420-0.454)0.074 (0.062-0.087)0.9580.600 (0.584-0.616)
skill-scanner2.3.20.312 (0.298-0.326)0.008 (0.004-0.013)0.9930.475 (0.459-0.491)
skillspector2.13.40.323 (0.306-0.339)0.155 (0.138-0.173)0.8890.473 (0.455-0.492)

And on real, widely used skills, where every flag is a false alarm:

563 real skills from the clean track, all treated as benign, static, text-only, no LLM. A flag is a false alarm.

ToolVersionSkills flaggedShare flagged
ai-rulez-threatunreleased12 of 5632.1% (1.1-3.4)
ai-rulezunreleased53 of 5639.4% (7.1-11.9)
skill-scanner2.3.226 of 5634.6% (3.0-6.4)
skillspector2.13.4167 of 56329.7% (25.9-33.4)

Every number is reproducible with one command. See Scanner benchmark for the protocol and its limits.

Standards

ai-rulez generates and validates AGENTS.md, Agent Skills, Agent Plugins, ARD, llms.txt, OKF (the format of .ai-rulez/ itself), MCP server configuration and Server Cards, CycloneDX and SPDX SBOMs, and in-toto/DSSE attestations in Sigstore bundles. Standards conformance lists the versions, the conformance tests and the known gaps.

CI and git hooks

GitHub Actions:

yaml
steps:
  - uses: actions/checkout@v7
  - uses: Goldziher/ai-rulez@v5
    with:
      version: 5.15.0
  - run: ai-rulez generate --check
  - run: ai-rulez validate

See GitHub Actions for the full workflow and the governance gate.

pre-commit or prek:

yaml
repos:
  - repo: https://github.com/Goldziher/ai-rulez
    rev: v5.15.0
    hooks:
      - id: ai-rulez-recursive
      - id: ai-rulez-validate

See GitHub Actions for the governance gate and scheduled pin updates, and Installation for Lefthook, Poly and init --setup-hooks.

Upgrading from 4.x

Run ai-rulez migrate v5 --dry-run, then follow Migrating to v5.

Documentation

Full documentation: goldziher.github.io/ai-rulez. Contributors: see CONTRIBUTING.md and Architecture.

License

MIT