CLI to sync coding rules across AI coding agents (Cursor, Claude Code, Copilot, etc.).
npm install -g @ngxtm/skill-rule
# or
bun install -g @ngxtm/skill-rule# Initialize in your project
sr init
# Sync rules from registry
sr sync
# Sync from local directory
sr sync --local /path/to/rules
# List available categories
sr list
# Show supported agents
sr agentssr init creates .rules.json:
{
"registry": {
"type": "github",
"url": "https://github.com/ngxtm/skill-rule",
"branch": "main"
},
"agents": ["cursor", "claude"],
"categories": {
"react": { "enabled": true },
"typescript": { "enabled": true }
}
}registry.type:github,local, orhttpagents: Array of agent IDscategories[id].enabled: Enable/disable categorycategories[id].exclude: Skip specific rulescategories[id].include: Only sync these rulesoverrides: Rules to skip (overridden locally)
Rules are markdown files with YAML frontmatter:
---
id: react-hooks
version: 1.0.0
triggers: [hooks, useEffect, useState]
---
# React Hooks
Content here...| Agent | Rules Path |
|---|---|
| Cursor | .cursor/rules/ |
| Claude Code | .claude/rules/ |
| GitHub Copilot | .github/rules/ |
| OpenCode | .opencode/rules/ |
| Gemini | .gemini/rules/ |
MIT