rulesync — Claude Code skill: what it does, how to install
Generates and syncs AI assistant instructions across Cursor, Claude Code, Copilot, and other tools from a central .rulesync directory.
npx skills add dyoshikawa/rulesync --skill rulesync -a claude-codeWhat rulesync does
This skill guides your coding agent in managing rulesync directly inside the repository. The tool keeps shared rules in .rulesync/rules/, MCP server definitions in .rulesync/mcp/, and custom commands in .rulesync/commands/. You edit instructions once instead of maintaining duplicate files like CLAUDE.md, .cursorrules, or .github/copilot-instructions.md.
Execution relies on the CLI, which requires npm install -g rulesync on your machine. The workflow starts with rulesync init, after which you can import existing setups using rulesync import --targets <tool>. Running rulesync generate writes out target-specific instruction files.
Verification commands keep builds clean. You can run rulesync generate --dry-run to preview edits or pass --check in continuous integration to catch outdated files. The CLI also provides bundled reference materials via rulesync docs.
What it helps with
- Generate editor instructions for multiple coding tools from a single directory
- Import existing
.cursorrulesorCLAUDE.mdfiles into a unified format - Verify that generated assistant rules match source files during CI checks
- Distribute shared MCP configurations across different development tools
Example prompts for the agent
- Initialize rulesync in this repository and scaffold sample rule directories
- Import our existing
.cursorrulesfile into the unified rulesync format - Run
rulesync generate --targets "*" --features "*"to build all assistant config files
How to install rulesync
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill rulesync -a claude-code2Manually: put the files in place
~/.claude/skills/rulesync/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/rulesync/
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill rulesync -a codex2Manually: put the files in place
.agents/skills/rulesync/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill rulesync -a cursor2Manually: put the files in place
.cursor/skills/rulesync/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dyoshikawa/rulesync rulesync2Manually: put the files in place
.github/skills/rulesync/SKILL.md1Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill rulesync -a gemini-cli2Platform CLI
gemini skills install https://github.com/dyoshikawa/rulesync --path skills/rulesyncManually: put the files in place
.devin/skills/rulesync/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dyoshikawa/rulesync --skill rulesync -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about rulesync
How do I install rulesync in Claude Code?
Run npx skills add dyoshikawa/rulesync --skill rulesync -a claude-code. Alternatively, place the skill file directly in ~/.claude/skills/rulesync/SKILL.md.
What does the rulesync skill do?
It teaches your agent how to initialize, import, and compile unified AI instruction files from .rulesync/ into target-specific formats like CLAUDE.md or .cursorrules.
How can I catch outdated rule files in CI?
Run rulesync generate --check. This command checks whether tool configuration files match the source definitions without writing changes to disk.
Source text
SKILL.md · MIT
--- name: rulesync description: >- Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations. targets: ["*"] --- # Rulesync Rulesync generates and synchronizes AI rule configuration files across 20+ coding tools (Claude Code, Cursor, Copilot, Cline, Gemini CLI, and more) from a single set of unified rule files in `.rulesync/`. ## Quick Start ```bash # Install npm install -g rulesync # New project: initialize config, rules, and directory structure rulesync init # Import existing AI tool configs into unified format rulesync import --targets claudecode # From CLAUDE.md rulesync import --targets cursor # From .cursorrules rulesync import --targets copilot # From .github/copilot-instructions.md # Generate tool-specific configs from unified rules rulesync generate --targets "*" --features "*" ``` ## Core Workflow 1. **Init** - `rulesync init` creates `rulesync.jsonc` config and `.rulesync/` directory with sample rules 2. **Write rules** - Add shared AI rules in `.rulesync/rules/`, MCP configs in `.rulesync/mcp/`, commands in `.rulesync/commands/` 3. **Generate** - `rulesync generate` produces tool-specific files (CLAUDE.md, .cursorrules, .github/copilot-instructions.md, etc.) 4. **Verify** - `rulesync generate --dry-run` previews changes; `--check` validates files are up to date (useful in CI) ## Key Commands | Command | Purpose | | ------------------------------------------------ | ------------------------------------------------ | | `rulesync init` | Scaffold project with config and sample rules | | `rulesync generate --targets "*" --features "*"` | Generate all tool configs from unified rules | | `rulesync import --targets <tool>` | Import existing tool config into unified format | | `rulesync fetch owner/repo` | Fetch skills from a remote repository | | `rulesync install` | Install skill sources declared in rulesync.jsonc | | `rulesync generate --check` | CI check that generated files are up to date | | `rulesync generate --dry-run` | Preview changes without writing files | | `rulesync generate --watch` | Regenerate whenever source files change | | `rulesync docs [document]` | Print bundled documentation | | `rulesync docs --search <text>` | Search the bundled documentation | ## Detailed Reference The complete Rulesync documentation is bundled with the CLI. **Consult it with `rulesync docs` before answering Rulesync-specific questions or performing unfamiliar Rulesync operations** — it is the canonical detailed reference. - `rulesync docs` — list every available document identifier - `rulesync docs <document>` — print one document, e.g. `rulesync docs faq` or `rulesync docs guide/configuration` - `rulesync docs --search <text>` — ranked full-text search across the documentation, e.g. `rulesync docs --search "global mode"` Useful starting points: `getting-started/quick-start`, `guide/configuration`, `reference/cli-commands`, `reference/supported-tools`, `reference/file-formats`, `faq`.
© dyoshikawa · MIT · dyoshikawa/rulesync