ruler
Ruler — apply the same rules to all coding agents
Install / Use
npx skills add intellectronica/rulerInstalls into whichever agent you are using.
Aider Config
Aider AI pair programming config
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of ruler
ruler scores 79/100 on our quality scale, 3595th of 4,614 Development & Engineering skills we index.
Its Aider Config is 50 KB long, well organised into 151 sections with 52 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
With 2,961 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated yesterday, so ruler is actively maintained.
- Our last check on 2026-10-19 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 95/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ruler compared with similar skills
All 4 of these similar skills score higher than ruler; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ruler (this skill)by intellectronica | 79 | 3.0k | 1d ago | Aider Config |
| taste-skillby Leonxlnx | 100 | 111.0k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 109.5k | 1d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 70.0k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 46.6k | 3d ago | CLAUDE.md |
Frequently asked questions
- How do I install ruler?
- Run
npx skills add intellectronica/ruler. The install tabs above show the steps for each supported agent. - Which AI agents does ruler work with?
- It is written for Aider, Cursor, GitHub Copilot, Windsurf and OpenAI Codex, as a Aider Config file. Other agents that read the same format can often use it too.
- Is ruler safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ruler still maintained?
- The repository was last updated yesterday, so ruler is actively maintained.
Skill content
View source on GitHubRuler: Centralise Your AI Coding Assistant Instructions
<table style="width:100%"> <tr> <td style="vertical-align: top;"> <p> <a href="https://github.com/intellectronica/ruler/actions/workflows/ci.yml"><img src="https://github.com/intellectronica/ruler/actions/workflows/ci.yml/badge.svg" alt="CI"></a> <a href="https://www.npmjs.com/package/@intellectronica/ruler"><img src="https://badge.fury.io/js/%40intellectronica%2Fruler.svg" alt="npm version"></a> <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"> </p> <ul> <li><strong>GitHub</strong>: <a href="https://github.com/intellectronica/ruler">intellectronica/ruler</a></li> <li><strong>NPM</strong>: <a href="https://www.npmjs.com/package/@intellectronica/ruler">@intellectronica/ruler</a></li> </ul> <hr /> <p> <em>Animation by <a href="https://isaacflath.com/">Isaac Flath</a> of <strong><a href="https://elite-ai-assisted-coding.dev/">Elite AI-Assisted Coding</a></strong></em> ➡︎ </p> </td> <td style="vertical-align: top; width:33%;"> <img src="https://raw.githubusercontent.com/intellectronica/ruler/main/img/ruler-short.gif" alt="Ruler demo" style="width:300px; height:auto; display:block;" /> </td> </tr> </table>Beta Research Preview
- Please test this version carefully in your environment
- Report issues at https://github.com/intellectronica/ruler/issues
Why Ruler?
Managing instructions across multiple AI coding tools becomes complex as your team grows. Different agents (GitHub Copilot, Claude, Cursor, Aider, etc.) require their own configuration files, leading to:
- Inconsistent guidance across AI tools
- Duplicated effort maintaining multiple config files
- Context drift as project requirements evolve
- Onboarding friction for new AI tools
- Complex project structures requiring context-specific instructions for different components
Ruler solves this by providing a single source of truth for all your AI agent instructions, automatically distributing them to the right configuration files. With support for nested rule loading, Ruler can handle complex project structures with context-specific instructions for different components.
Core Features
- Centralised Rule Management: Store all AI instructions in a dedicated
.ruler/directory using Markdown files - Nested Rule Loading: Support complex project structures with multiple
.ruler/directories for context-specific instructions - Automatic Distribution: Ruler applies these rules to configuration files of supported AI agents
- Targeted Agent Configuration: Fine-tune which agents are affected and their specific output paths via
ruler.toml - MCP Server Propagation: Manage and distribute Model Context Protocol (MCP) server settings
.gitignoreAutomation: Keeps generated agent config files out of version control automatically- Simple CLI: Easy-to-use commands for initialising and applying configurations
Supported AI Agents
| Agent | Rules File(s) | MCP Configuration / Notes | Skills Support / Location | Subagents Support / Location |
| ---------------------- | ---------------------------------------------- | ------------------------------------------------ | ------------------------- | ---------------------------- |
| AGENTS.md | AGENTS.md | (pseudo-agent ensuring root AGENTS.md exists) | - | - |
| GitHub Copilot | AGENTS.md | .mcp.json | .claude/skills/ | .github/agents/ |
| Claude Code | CLAUDE.md | .mcp.json | .claude/skills/ | .claude/agents/ |
| OpenAI Codex CLI | AGENTS.md | .codex/config.toml | .agents/skills/ | .codex/agents/ (.toml) |
| Pi Coding Agent | AGENTS.md | - | .pi/skills/ | - |
| Jules | AGENTS.md | - | - | - |
| Cursor | AGENTS.md | .cursor/mcp.json | .cursor/skills/ | .cursor/agents/ |
| Windsurf | AGENTS.md | .windsurf/mcp_config.json | .windsurf/skills/ | - |
| Cline | .clinerules | - | - | - |
| Crush | CRUSH.md | .crush.json | - | - |
| Amp | AGENTS.md | - | .agents/skills/ | - |
| Antigravity | .agent/rules/ruler.md | - | .agent/skills/ | - |
| Amazon Q CLI | .amazonq/rules/ruler_q_rules.md | .amazonq/mcp.json | - | - |
| Aider | AGENTS.md, .aider.conf.yml | .mcp.json | - | - |
| Firebase Studio | .idx/airules.md | .idx/mcp.json | - | - |
| Open Hands | .openhands/microagents/repo.md | config.toml | - | - |
| Gemini CLI | AGENTS.md | .gemini/settings.json | .gemini/skills/ | - |
| Junie | .junie/guidelines.md | .junie/mcp/mcp.json | .junie/skills/ | - |
| AugmentCode | .augment/rules/ruler_augment_instructions.md | - | - | - |
| Kilo Code | AGENTS.md | .kilocode/mcp.json | .claude/skills/ | - |
| OpenCode | AGENTS.md | opencode.json | .opencode/skills/ | - |
| Goose | .goosehints | - | .agents/skills/ | - |
| Qwen Code | AGENTS.md | .qwen/settings.json | - | - |
| RooCode | AGENTS.md | .roo/mcp.json | .roo/skills/ | - |
| Zed | AGENTS.md | .zed/settings.json (project root, never $HOME) | .agents/skills/ | - |
| Trae AI | .trae/rules/project_rules.md | - | - | - |
| Warp | WARP.md | - | - | - |
| Kiro | .kiro/steering/ruler_kiro_instructions.md | .kiro/settings/mcp.json | .kiro/skills/ | - |
| Firebender | firebender.json | firebender.json (rules and MCP in same file) | - | - |
| Factory Droid | AGENTS.md | .factory/mcp.json | .factory/skills/ | - |
| Mistral Vibe | AGENTS.md | .vibe/config.toml | .vibe/skills/ | - |
| JetBrains AI Assistant | .aiassistant/rules/AGENTS.md | - | - | - |
Getting Started
Installation
Requires Node.js ^20.19.0 || ^22.12.0 || >=23.
Global Installation (Recommended for CLI use):
npm install -g @intellectronica/ruler
Using npx (for one-off commands):
npx @intellectronica/ruler apply
Project Initialisation
- Navigate to your project's root directory
- Run
ruler init - This creates:
.ruler/directory.ruler/AGENTS.md: The primary starter Markdown file for your rules.ruler/ruler.toml: The main configuration file for Ruler (now contains sample MCP server sections; legacy.ruler/mcp.jsonno longer scaffolded)- (Optional legacy fallback) If you previously used
.ruler/instructions.md, it is still respected whenAGENTS.mdis absent. (The prior runtime warning was removed.)
Additionally, you can create a global configuration to use when no local .ruler/ directory is found:
ruler init --global
The global configuration will be created to $XDG_CONFIG_HOME/ruler (default: ~/.config/ruler).
Core Concepts
The .ruler/ Directory
This is your central hub for all AI agent instructions:
- Primary File Order & Precedence:
- A repository root
AGENTS.md(outside.ruler/) if present (highest precedence, prepended) .ruler/AGENTS.md(new default starter file)- Legacy
.ruler/instructions.md(used as the primary file only if.ruler/AGENTS.mdis absent; no longer emits a deprecation warning) - Remaining discovered
.mdfiles under.ruler/(and subdirectories) in sorted order, includinginstructions.mdwhen both top-level files exist
- A repository root
- Rule Files (
*.md): Discovered recursively from.ruler/or$XDG_CONFIG_HOME/rulerand concatenated in the order above - Concatenation Marker: Each file's content is prepended with
<!-- Source: <relative_path_to_md_file> -->for traceability ruler.toml: Master configuration for Ruler's behavior, agent selection, output paths, and MCP server settingsmcp.json: (Legacy, deprecated) Shared MCP server settings - no longer scaffolded but still supported for backward compatibility
This ordering lets you keep a short, high-impact root AGENTS.md (e.g. executive project summary) while housing detailed guidance inside .ruler/.
Nested Rule Loading
Ruler now supports nested rule loading with the --nested flag, enabling context-specific instructions for different parts of your project:
project/
├── .ruler/ # Global project rules
│ ├── AGENTS.md
│ └── coding_style.md
├─
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
111.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
109.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ai-job-search
70.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
46.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
