Skip to content
FossShelf
Home / Categories / For Engineers

Ai Rulez

One source for every AI coding assistant

Replaces —

176 starsMITlast commit 15 Nov 2026
Screenshot of Ai Rulez

Who it's for

Team using multiple AI assistants

A team running Claude Code for some engineers and Cursor for others maintains one `.ai-rulez/` source. Both tools stay in sync after a single `generate` run, and the CI check prevents one tool's config from drifting when rules are updated.

Team uses only one AI coding assistant.

Platform team distributing shared rules

A platform team packages company-wide coding standards and security rules as an AI-Rulez plugin and publishes it to an internal npm registry. Project teams install the plugin and get the shared rules without copying files.

No shared standards to distribute across projects.

Open source maintainer publishing skills

A library maintainer packages framework-specific skills as an Agent Plugin bundle and publishes it to GitHub. Contributors install the plugin to give their AI assistant context about the project's conventions without reading the entire codebase.

Developer with a monorepo

A monorepo with multiple sub-projects uses `generate --recursive` and `validate --recursive` to process every nested `.ai-rulez/` root in one command, keeping each sub-project's AI configuration consistent without per-directory CI configuration.

Project is a single-package repository.

The problem

Teams using more than one AI coding assistant end up maintaining the same guidance in multiple incompatible formats: `CLAUDE.md` for Claude Code, `AGENTS.md` for Codex and Cursor, `.cursor/rules/` for Cursor, `.github/instructions/` for Copilot, and separate skill folders, MCP configuration files, and settings files for each additional tool. When a rule changes, every file must be updated by hand, and there is no automated check to catch when they drift apart. AI-Rulez replaces this by making `.ai-rulez/` the single source of truth and generating all tool-specific files from it.

How it works

52 built-in presets

One preset per assistant -- from Claude Code and Cursor to Gemini CLI, Devin, Replit Agent, Zed, and 46 others. Each preset knows the exact file layout and format its target tool expects, so `generate` produces correct native files without manual mapping.

CI drift detection

`ai-rulez generate --check` exits non-zero when the committed generated files no longer match the source in `.ai-rulez/`. Add it to a GitHub Actions workflow or a pre-commit hook to catch stale configurations before they mislead an assistant.

Content validation with AR rule codes

`ai-rulez validate` lints rules, skills, links, and security issues using stable `AR` rule codes. It works on plain `AGENTS.md` and `SKILL.md` files with no configuration, so teams can adopt validation incrementally. `--explain AR001` describes a rule and how to suppress it.

Lock file and signing

A lock file pins remote includes, installed skills, and authored content to exact revisions. Reviewer approvals, Sigstore signatures, SBOMs in CycloneDX and SPDX formats, and an organization policy bring dependency-style governance to AI configuration.

MCP skill server

`ai-rulez mcp --serve-skills` exposes skills over MCP so an assistant fetches only the skills it needs, rather than loading all skill content into the context window on every request. The `search` and `load_skill` commands let the assistant discover and retrieve skills on demand.

Plugin packaging and publishing

Rules and skills can be packaged as plugin bundles, Agent Plugins, or ARD manifests and published to GitHub, npm, or OCI registries. `verify --plugin` reports hand-edited or stray files in a bundle; `generate --plugin` restores it.

Features

  • 52 built-in presets
  • CI drift detection
  • Content validation with AR rule codes
  • Lock file and signing
  • MCP skill server
  • Plugin packaging and publishing

How to install

# Run without installing npx ai-rulez@latest init # Or install globally brew install goldziher/tap/ai-rulez # macOS / Linux npm install -g ai-rulez # Node.js 22+ pipx install ai-rulez # Python 3.11+

Recommended for this setup

Strengths

  • Import path from existing configs: `ai-rulez init --from auto` imports an existing `CLAUDE.md`, `AGENTS.md`, or `.cursor/rules/` into the `.ai-rulez/` source automatically, so adopting the tool does not require starting from scratch.
  • No installation required: The CLI runs via `npx ai-rulez@latest` or `uvx ai-rulez` without a global install. It is also available through Homebrew, npm, PyPI, Go, and Scoop, and ships a GitHub Action for CI use.
  • Standards-conformant output: Generated files are validated against each format's own schema: AGENTS.md, Agent Skills, Agent Plugins, OKF, llms.txt, MCP server configuration, CycloneDX and SPDX SBOMs, and in-toto/DSSE attestations. The Standards conformance page lists versions and known gaps.
  • Monorepo and user-level generation: `generate --recursive` processes every nested `.ai-rulez/` root in a monorepo in one pass. `generate --user` renders to the home directory, so user-level rules apply across all projects without per-project duplication.

Trade-offs

  • Generated files must be committed alongside source: The workflow requires committing both the `.ai-rulez/` source and all generated files. Teams that prefer a purely generated-at-runtime approach will need to integrate `generate` into every developer's setup or a pre-checkout hook.
  • v5 migration required from 4.x: Projects on ai-rulez 4.x require a migration step (`ai-rulez migrate v5`) before using v5 features. The `config.toml` format and some preset names changed between major versions.
  • Security scanner recall is modest at static analysis: The project's own benchmark shows `ai-rulez scan` at 0.195 recall on the held-out MaliciousSkillBench test partition (static, text-only, no LLM). It catches fewer malicious skills than it misses; the scan is a useful first gate but not a complete security solution.

Tech stack

Languages
Go, Python, Shell, JavaScript, Go Template, CSS, MDX, Dockerfile, TypeScript
Frameworks
—
Databases
—
Tooling
—

FAQ

Does AI-Rulez work if I already have a CLAUDE.md or AGENTS.md?

Yes. Run `ai-rulez init --from auto` to import existing `CLAUDE.md`, `AGENTS.md`, or `.cursor/rules/` files into the `.ai-rulez/` source automatically.

Which tools are supported?

52 built-in presets are included, covering Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI, Cline, Devin, Replit Agent, Zed, JetBrains AI Assistant, Sourcegraph Amp, and many others. A tool not on the list can be added as a custom preset.

How do I catch configuration drift in CI?

Add `ai-rulez generate --check` as a CI step. It exits non-zero when the committed generated files differ from what the current source would produce. A GitHub Action (`Goldziher/ai-rulez@v5`) and a pre-commit hook are both available.

Can I install it without Node.js?

Yes. AI-Rulez is available via Homebrew on macOS and Linux, PyPI (`pipx install ai-rulez` or `uv tool install ai-rulez`), Go (`go install`), and Scoop on Windows. It can also run without any installation using `npx ai-rulez@latest` (Node.js required) or `uvx ai-rulez` (uv required).

What is the MCP skill server used for?

Running `ai-rulez mcp --serve-skills` exposes your skills over MCP. An assistant fetches only the skill it needs at the moment rather than loading all skill content into the context window upfront, which reduces token usage on every request.

Similar tools

More in Engineers