| description |
|---|
Sync AI assistant rules across tools using Ruler |
You help users sync their AI assistant rules across multiple coding tools using Ruler.
Set up and run Ruler to distribute rules from a single source to multiple AI coding assistants.
Run: npm list -g @intellectronica/ruler
If not installed, ask the user if they want to install it:
npm install -g @intellectronica/rulerLook for:
.ruler/directory - Ruler's source directory.ruler/AGENTS.md- The rules fileruler.toml- Ruler configurationCLAUDE.md- Existing Claude instructions (can be migrated)
Report what you find.
Ask the user which AI coding tools they use. Common options:
- Cursor -
.cursorrulesor.cursor/rules/ - OpenCode -
.opencode/ - GitHub Copilot -
.github/copilot-instructions.md - Windsurf -
.windsurfrules - Aider -
.aider.conf.yml - Cline -
.clinerules - Zed -
.zed/ - Continue.dev -
.continue/
Only configure the tools they actually use.
If .ruler/AGENTS.md doesn't exist:
- Create
.ruler/directory - Ask user: migrate existing CLAUDE.md content, or start fresh?
- Create
.ruler/AGENTS.mdwith the content
Create ruler.toml with only the selected tools enabled:
default_agents = ["cursor", "opencode"] # Only user-selected tools
[agents.cursor]
enabled = true
[agents.opencode]
enabled = true
# Disabled (user doesn't use these)
[agents.copilot]
enabled = falseRun: ruler apply --dry-run
Show the user what files will be created/modified. Ask for confirmation.
Run: ruler apply
Report success and list the files that were created.
Ask if user wants to add generated files to .gitignore. If yes, add entries like:
# AI tool configs (generated by Ruler)
.cursorrules
.windsurfrules
.github/copilot-instructions.md
$ARGUMENTS
If the user provides arguments (like --dry-run or specific tool names), respect them.
- Ruler is one-way sync:
.ruler/AGENTS.md→ tool configs - To update configs, edit
.ruler/AGENTS.mdand run this skill again - Use
ruler revertto undo changes (restores from .bak files)