Ruler
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
Low risk
We rate an entry low when it mostly gives the agent instructions and reference material.
Why this level
- Only reads markdown rules and rewrites agent config files in the project; it does not execute code
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/rulerDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Install the tool
npm install -g @intellectronica/rulerInstall Ruler: npm install -g @intellectronica/ruler. Write your rules in a .ruler/ folder at the project root, then apply them: ruler apply.
Other ways from the author
npm install -g @intellectronica/rulerInstalls the CLI globally.
This is third-party code. Review the repository files before installing.
What it does
Ruler reads markdown files from a .ruler folder at the project root, including nested .ruler folders for parts of a monorepo, and distributes their content into each supported agent's own config format: CLAUDE.md for Claude Code, AGENTS.md for Codex and most others, .cursor files for Cursor and so on. Alongside rules, Ruler can also propagate MCP server settings into the format a given agent understands, and automatically adds the generated files to .gitignore so the repository keeps only the .ruler folder as the single source of truth.
Who it is for. For teams and developers who use several different AI agents on one project and are tired of manually duplicating instructions across CLAUDE.md, AGENTS.md and other formats.
Good fit when
- The team uses Claude Code, Cursor, Codex or other agents at once and wants one set of rules for all of them
- The project is large and parts of the monorepo need their own extra instructions on top of shared ones
- You need to centrally propagate MCP server settings to several agents at once
Not a fit when
- Only one agent is used on the project, so there is nothing to duplicate instructions to
- The project does not want auto-generated config files in .gitignore and prefers to maintain them by hand
- The tool is marked by the author as a beta research preview, so critical production workflows should verify stability separately
Example request
Consolidate the project's rules in .ruler and distribute them to Claude Code, Cursor and Codex configsLimitations
The author explicitly calls the project a beta research preview and asks users to test behavior carefully in their own environment. Ruler overwrites agent config files on every apply run, so manual edits to generated files are lost. The list of supported agents and their formats can lag behind new versions of the tools themselves.
How to disable. Remove the package: npm uninstall -g @intellectronica/ruler. Generated agent config files can be deleted or left as-is; they do not depend on Ruler remaining installed.
Security check
- Only reads markdown rules and rewrites agent config files in the project; it does not execute code
README in short
The README presents Ruler as a single source of truth for AI agent instructions: rules live in markdown files under .ruler, including nested folders for complex project structures, and get automatically distributed into the config formats of more than twenty agents, from Claude Code and Cursor to Aider, Windsurf, Gemini CLI and Kiro. It separately covers propagating MCP server settings and support for skills and subagents where an agent's format allows it. Installation is via npm, with ruler.toml settings to fine-tune which agents get rules and where. MIT licensed, in beta research preview status.
FAQ
Do rules need to be rewritten for every agent?
No, rules are written once in .ruler, and Ruler distributes them into CLAUDE.md, AGENTS.md, .cursor and other supported config formats.
What happens to manual edits in CLAUDE.md?
They are lost on the next ruler apply run because the file is treated as generated. All edits should go into the .ruler sources instead.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything