Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dyoshikawa/rulesync --skill rulesync -a claude-code
Open on GitHub

What 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 .cursorrules or CLAUDE.md files 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 .cursorrules file 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-code

2Manually: put the files in place

~/.claude/skills/rulesync/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rulesync/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set36

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor