Unified AI rules management CLI tool that generates configuration files for various AI development tools
npm install rulesync







A Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files. Features selective generation, comprehensive import/export capabilities, and supports major AI development tools with rules, commands, MCP, ignore files, subagents and skills.
> [!NOTE]
> If you are interested in Rulesync latest news, please follow the maintainer's X(Twitter) account:
> @dyoshikawa1993
``bash
npm install -g rulesyncor
brew install rulesync
$3
Download pre-built binaries from the latest release. These binaries are built using Bun's single-file executable bundler.
Quick Install (Linux/macOS - No sudo required):
`bash
curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash
`Options:
- Install specific version:
curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash -s -- v6.4.0
- Custom directory: RULESYNC_HOME=~/.local curl -fsSL https://github.com/dyoshikawa/rulesync/releases/latest/download/install.sh | bash
Manual installation (requires sudo)
#### Linux (x64)
`bash
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-x64 -o rulesync && \
chmod +x rulesync && \
sudo mv rulesync /usr/local/bin/
`#### Linux (ARM64)
`bash
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-arm64 -o rulesync && \
chmod +x rulesync && \
sudo mv rulesync /usr/local/bin/
`#### macOS (Apple Silicon)
`bash
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-arm64 -o rulesync && \
chmod +x rulesync && \
sudo mv rulesync /usr/local/bin/
`#### macOS (Intel)
`bash
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-x64 -o rulesync && \
chmod +x rulesync && \
sudo mv rulesync /usr/local/bin/
`#### Windows (x64)
`powershell
Invoke-WebRequest -Uri "https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe" -OutFile "rulesync.exe"; Or using curl (if available):
`bash
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe -o rulesync.exe && \
mv rulesync.exe /path/to/your/bin/
`#### Verify checksums
`bash
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/SHA256SUMS -o SHA256SUMSLinux/macOS
sha256sum -c SHA256SUMSWindows (PowerShell)
Download SHA256SUMS file first, then verify:
Get-FileHash rulesync.exe -Algorithm SHA256 | ForEach-Object {
$actual = $_.Hash.ToLower()
$expected = (Get-Content SHA256SUMS | Select-String "rulesync-windows-x64.exe").ToString().Split()[0]
if ($actual -eq $expected) { "โ Checksum verified" } else { "โ Checksum mismatch" }
}
`Getting Started
`bash
Install rulesync globally
npm install -g rulesyncCreate necessary directories, sample rule files, and configuration file
rulesync initInstall official skills (recommended)
rulesync fetch dyoshikawa/rulesync --features skills
`On the other hand, if you already have AI tool configurations:
`bash
Import existing files (to .rulesync/*/)
rulesync import --targets claudecode # From CLAUDE.md
rulesync import --targets cursor # From .cursorrules
rulesync import --targets copilot # From .github/copilot-instructions.md
rulesync import --targets claudecode --features rules,mcp,commands,subagentsAnd more tool supports
Generate unified configurations with all features
rulesync generate --targets "" --features ""
`Supported Tools and Features
Rulesync supports both generation and import for All of the major AI coding tools:
| Tool | rules | ignore | mcp | commands | subagents | skills | hooks |
| ------------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: |
| AGENTS.md | โ
| | | ๐ฎ | ๐ฎ | ๐ฎ | |
| AgentsSkills | | | | | | โ
| |
| Claude Code | โ
๐ | โ
| โ
๐ ๐ฆ | โ
๐ | โ
๐ | โ
๐ | โ
|
| Codex CLI | โ
๐ | | ๐ | ๐ | ๐ฎ | โ
๐ | |
| Gemini CLI | โ
๐ | โ
| โ
๐ | โ
๐ | ๐ฎ | โ
๐ | |
| GitHub Copilot | โ
| | โ
| โ
| โ
| โ
| |
| Cursor | โ
| โ
| โ
| โ
๐ | โ
๐ | โ
๐ | โ
|
| Factory Droid | โ
๐ | | โ
๐ | โ
๐ | โ
๐ | โ
๐ | |
| OpenCode | โ
| | โ
| โ
๐ | โ
๐ | โ
๐ | |
| Cline | โ
| โ
| โ
| โ
๐ | | | |
| Kilo Code | โ
๐ | โ
| โ
| โ
๐ | | โ
๐ | |
| Roo Code | โ
| โ
| โ
| โ
| ๐ฎ | โ
๐ | |
| Qwen Code | โ
| โ
| | | | | |
| Kiro | โ
| โ
| โ
| โ
| โ
| โ
| |
| Google Antigravity | โ
| | | โ
| | โ
๐ | |
| JetBrains Junie | โ
| โ
| โ
| | | | |
| AugmentCode | โ
| โ
| | | | | |
| Windsurf | โ
| โ
| | | | | |
| Warp | โ
| | | | | | |
| Replit | โ
| | | | | โ
| |
| Zed | | โ
| | | | | |
- โ
: Supports project mode
- ๐: Supports global mode
- ๐ฎ: Supports simulated commands/subagents/skills (Project mode only)
- ๐ฆ: Supports modular MCP (Experimental)
Why Rulesync?
$3
Author rules once, generate everywhere. Rulesync turns a unified ruleset into tool-native formats so teams stop duplicating instructions across multiple AI assistants.
$3
Let developers pick the assistant that fits their flowโCopilot, Cursor, Cline, Claude Code, and moreโwithout rewriting team standards.
$3
Rulesync emits plain configuration files you can commit, review, and ship. If you ever uninstall Rulesync, your generated files keep working.
$3
New team members get the same conventions, context, and guardrails immediately, keeping code style and quality consistent across tools.
$3
Compose rules, MCP configs, commands, and subagents for different tools or scopes (project vs. global) without fragmenting your workflow.
$3
AI tool ecosystems evolve quickly. Rulesync helps you add, switch, or retire tools while keeping your rules intact.
Case Studies
Rulesync is trusted by leading companies and recognized by the industry:
- Anthropic Official Customer Story: Classmethod Inc. - Improving AI coding tool consistency with Rulesync
- Asoview Inc.: Adopting Rulesync for unified AI development rules
- KAKEHASHI Tech Blog: Building multilingual systems for the LLM era with a monorepo and a "living specification"
Quick Commands
`bash
Initialize new project (recommended: organized rules structure)
rulesync initImport existing configurations (to .rulesync/rules/ by default)
rulesync import --targets claudecode --features rules,ignore,mcp,commands,subagents,skillsFetch configurations from a Git repository
rulesync fetch owner/repo
rulesync fetch owner/repo@v1.0.0 --features rules,commands
rulesync fetch https://github.com/owner/repo --conflict skipGenerate all features for all tools (new preferred syntax)
rulesync generate --targets "" --features ""Generate specific features for specific tools
rulesync generate --targets copilot,cursor,cline --features rules,mcp
rulesync generate --targets claudecode --features rules,subagentsGenerate only rules (no MCP, ignore files, commands, or subagents)
rulesync generate --targets "*" --features rulesGenerate simulated commands and subagents
rulesync generate --targets copilot,cursor,codexcli --features commands,subagents --simulate-commands --simulate-subagentsDry run: show changes without writing files
rulesync generate --dry-run --targets claudecode --features rulesCheck if files are up to date (for CI/CD pipelines)
rulesync generate --check --targets "" --features ""Add generated files to .gitignore
rulesync gitignoreUpdate rulesync to the latest version (single-binary installs)
rulesync updateCheck for updates without installing
rulesync update --checkForce update even if already at latest version
rulesync update --force
`Dry Run
Rulesync provides two dry run options for the
generate command that allow you to see what changes would be made without actually writing files:$3
Show what would be written or deleted without actually writing any files. Changes are displayed with a
[DRY RUN] prefix.`bash
rulesync generate --dry-run --targets claudecode --features rules
`$3
Same as
--dry-run, but exits with code 1 if files are not up to date. This is useful for CI/CD pipelines to verify that generated files are committed.`bash
In your CI pipeline
rulesync generate --check --targets "" --features ""
echo $? # 0 if up to date, 1 if changes needed
`> [!NOTE]
>
--dry-run and --check cannot be used together.Fetch Command (In Development)
The
fetch command allows you to fetch configuration files directly from a Git repository (GitHub/GitLab).> [!NOTE]
> This feature is in development and may change in future releases.
Note: The fetch command searches for feature directories (
rules/, commands/, skills/, subagents/, etc.) directly at the specified path, without requiring a .rulesync/ directory structure. This allows fetching from external repositories like vercel-labs/agent-skills or anthropics/skills.$3
`bash
Full URL format
rulesync fetch https://github.com/owner/repo
rulesync fetch https://github.com/owner/repo/tree/branch
rulesync fetch https://github.com/owner/repo/tree/branch/path/to/subdir
rulesync fetch https://gitlab.com/owner/repo # GitLab (planned)Prefix format
rulesync fetch github:owner/repo
rulesync fetch gitlab:owner/repo # GitLab (planned)Shorthand format (defaults to GitHub)
rulesync fetch owner/repo
rulesync fetch owner/repo@ref # Specify branch/tag/commit
rulesync fetch owner/repo:path # Specify subdirectory
rulesync fetch owner/repo@ref:path # Both ref and path
`$3
| Option | Description | Default |
| ----------------------- | ------------------------------------------------------------------------------------------ | -------------------------------- |
|
--target, -t | Target format to interpret files as (e.g., 'rulesync', 'claudecode') | rulesync |
| --features | Comma-separated features to fetch (rules, commands, subagents, skills, ignore, mcp, hooks) | * (all) |
| --output | Output directory relative to project root | .rulesync |
| --conflict | Conflict resolution: overwrite or skip | overwrite |
| --ref | Git ref (branch/tag/commit) to fetch from | Default branch |
| --path | Subdirectory in the repository | . (root) |
| --token | Git provider token for private repositories | GITHUB_TOKEN or GH_TOKEN env |$3
`bash
Fetch skills from external repositories
rulesync fetch vercel-labs/agent-skills --features skills
rulesync fetch anthropics/skills --features skillsFetch all features from a public repository
rulesync fetch dyoshikawa/rulesync --path .rulesyncFetch only rules and commands from a specific tag
rulesync fetch owner/repo@v1.0.0 --features rules,commandsFetch from a private repository (uses GITHUB_TOKEN env var)
export GITHUB_TOKEN=ghp_xxxx
rulesync fetch owner/private-repoOr use GitHub CLI to get the token
GITHUB_TOKEN=$(gh auth token) rulesync fetch owner/private-repoPreserve existing files (skip conflicts)
rulesync fetch owner/repo --conflict skipFetch from a monorepo subdirectory
rulesync fetch owner/repo:packages/my-package
`Configuration
You can configure Rulesync by creating a
rulesync.jsonc file in the root of your project.$3
Rulesync provides a JSON Schema for editor validation and autocompletion. Add the
$schema property to your rulesync.jsonc:`jsonc
// rulesync.jsonc
{
"$schema": "https://raw.githubusercontent.com/dyoshikawa/rulesync/refs/heads/main/config-schema.json",
"targets": ["claudecode"],
"features": ["rules"],
}
`$3
Example:
`jsonc
// rulesync.jsonc
{
"$schema": "https://raw.githubusercontent.com/dyoshikawa/rulesync/refs/heads/main/config-schema.json", // List of tools to generate configurations for. You can specify "*" to generate all tools.
"targets": ["cursor", "claudecode", "geminicli", "opencode", "codexcli"],
// Features to generate. You can specify "*" to generate all features.
"features": ["rules", "ignore", "mcp", "commands", "subagents", "hooks"],
// Base directories for generation.
// Basically, you can specify a
["."] only.
// However, for example, if your project is a monorepo and you have to launch the AI agent at each package directory, you can specify multiple base directories.
"baseDirs": ["."], // Delete existing files before generating
"delete": true,
// Verbose output
"verbose": false,
// Silent mode - suppress all output (except errors)
"silent": false,
// Advanced options
"global": false, // Generate for global(user scope) configuration files
"simulateCommands": false, // Generate simulated commands
"simulateSubagents": false, // Generate simulated subagents
"simulateSkills": false, // Generate simulated skills
"modularMcp": false, // Enable modular-mcp for context compression (experimental, Claude Code only)
}
`$3
Rulesync supports a local configuration file (
rulesync.local.jsonc) for machine-specific or developer-specific settings. This file is automatically added to .gitignore by rulesync gitignore and should not be committed to the repository.Configuration Priority (highest to lowest):
1. CLI options
2.
rulesync.local.jsonc
3. rulesync.jsonc
4. Default valuesExample usage:
`jsonc
// rulesync.local.jsonc (not committed to git)
{
"$schema": "https://raw.githubusercontent.com/dyoshikawa/rulesync/refs/heads/main/config-schema.json",
// Override targets for local development
"targets": ["claudecode"],
// Enable verbose output for debugging
"verbose": true,
}
`$3
When multiple targets write to the same output file, the last target in the array wins. This is the "last-wins" behavior.
For example, both
agentsmd and opencode generate AGENTS.md:`jsonc
{
// opencode wins because it comes last
"targets": ["agentsmd", "opencode"],
"features": ["rules"],
}
`In this case:
1.
agentsmd generates AGENTS.md first
2. opencode generates AGENTS.md second, overwriting the previous fileIf you want
agentsmd's output instead, reverse the order:`jsonc
{
// agentsmd wins because it comes last
"targets": ["opencode", "agentsmd"],
"features": ["rules"],
}
`Each File Format
$3
Example:
`md
---
root: true # true that is less than or equal to one file for overview such as AGENTS.md, false for details such as .agents/memories/*.md
localRoot: false # (optional, default: false) true for project-specific local rules. Claude Code: generates CLAUDE.local.md; Others: appends to root file
targets: [""] # = all, or specific tools
description: "Rulesync project overview and development guidelines for unified AI rules management CLI tool"
globs: ["*/"] # file patterns to match (e.g., [".md", ".txt"])
agentsmd: # agentsmd and codexcli specific parameters
# Support for using nested AGENTS.md files for subprojects in a large monorepo.
# This option is available only if root is false.
# If subprojectPath is provided, the file is located in ${subprojectPath}/AGENTS.md.
# If subprojectPath is not provided and root is false, the file is located in .agents/memories/*.md.
subprojectPath: "path/to/subproject"
cursor: # cursor specific parameters
alwaysApply: true
description: "Rulesync project overview and development guidelines for unified AI rules management CLI tool"
globs: ["*"]
antigravity: # antigravity specific parameters
trigger: "always_on" # always_on, glob, manual, or model_decision
globs: ["*/"] # (optional) file patterns to match when trigger is "glob"
description: "When to apply this rule" # (optional) used with "model_decision" trigger
---Rulesync Project Overview
This is Rulesync, a Node.js CLI tool that automatically generates configuration files for various AI development tools from unified AI rule files. The project enables teams to maintain consistent AI coding assistant rules across multiple tools.
...
`$3
Hooks run scripts at lifecycle events (e.g. session start, before tool use). Events use canonical camelCase in this file; Cursor uses them as-is; Claude Code gets PascalCase in
.claude/settings.json.Event support:
- Shared (Cursor and Claude):
sessionStart, sessionEnd, preToolUse, postToolUse, beforeSubmitPrompt, stop, subagentStop, preCompact
- Cursor-only: postToolUseFailure, subagentStart, beforeShellExecution, afterShellExecution, beforeMCPExecution, afterMCPExecution, beforeReadFile, afterFileEdit, afterAgentResponse, afterAgentThought, beforeTabFileRead, afterTabFileEdit
- Claude-only: permissionRequest, notification, setupUse optional override keys so tool-specific events and config live in one file without leaking to the other:
cursor.hooks for Cursor-only events, claudecode.hooks for Claude-only. Events in shared hooks that a tool does not support are skipped for that tool (and a warning is logged at generate time).Example:
`json
{
"version": 1,
"hooks": {
"sessionStart": [{ "type": "command", "command": ".rulesync/hooks/session-start.sh" }],
"postToolUse": [{ "matcher": "Write|Edit", "command": ".rulesync/hooks/format.sh" }],
"stop": [{ "command": ".rulesync/hooks/audit.sh" }]
},
"cursor": {
"hooks": {
"afterFileEdit": [{ "command": ".cursor/hooks/format.sh" }]
}
},
"claudecode": {
"hooks": {
"notification": [
{ "matcher": "permission_prompt", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/notify.sh" }
]
}
}
}
`$3
Example:
`md
---
description: "Review a pull request" # command description
targets: [""] # = all, or specific tools
copilot: # copilot specific parameters (optional)
description: "Review a pull request"
antigravity: # antigravity specific parameters
trigger: "/review" # Specific trigger for workflow (renames file to review.md)
turbo: true # (Optional, default: true) Append // turbo for auto-execution
---target_pr = $ARGUMENTS
If target_pr is not provided, use the PR of the current branch.
Execute the following in parallel:
...
`$3
Example:
`md
---
name: planner # subagent name
targets: [""] # = all, or specific tools
description: >- # subagent description
This is the general-purpose planner. The user asks the agent to plan to
suggest a specification, implement a new feature, refactor the codebase, or
fix a bug. This agent can be called by the user explicitly only.
claudecode: # for claudecode-specific parameters
model: inherit # opus, sonnet, haiku or inherit
copilot: # for GitHub Copilot specific parameters
tools:
- web/fetch # agent/runSubagent is always included automatically
opencode: # for OpenCode-specific parameters
mode: subagent # must be set so OpenCode treats the agent as a subagent
model: anthropic/claude-sonnet-4-20250514
temperature: 0.1
tools:
write: false
edit: false
bash: false
permission:
bash:
"git diff": allow
---You are the planner for any tasks.
Based on the user's instruction, create a plan while analyzing the related files. Then, report the plan in detail. You can output files to @tmp/ if needed.
Attention, again, you are just the planner, so though you can read any files and run any commands for analysis, please don't write any code.
`$3
Example:
`md
---
name: example-skill # skill name
description: >- # skill description
A sample skill that demonstrates the skill format
targets: [""] # = all, or specific tools
claudecode: # for claudecode-specific parameters
allowed-tools:
- "Bash"
- "Read"
- "Write"
- "Grep"
codexcli: # for codexcli-specific parameters
short-description: A brief user-facing description
---This is the skill body content.
You can provide instructions, context, or any information that helps the AI agent understand and execute this skill effectively.
The skill can include:
- Step-by-step instructions
- Code examples
- Best practices
- Any relevant context
Skills are directory-based and can include additional files alongside SKILL.md.
`$3
Example:
`json
{
"mcpServers": {
"serena": {
"description": "Code analysis and semantic search MCP server",
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"ide-assistant",
"--enable-web-dashboard",
"false",
"--project",
"."
],
"env": {}
},
"context7": {
"description": "Library documentation search server",
"type": "stdio",
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"],
"env": {}
}
}
}
`$3
Rulesync supports a single ignore list that can live in either location below:
-
.rulesync/.aiignore (recommended)
- .rulesyncignore (project root)Rules and behavior:
- You may use either location.
- When both exist, Rulesync prefers
.rulesync/.aiignore (recommended) over .rulesyncignore (legacy) when reading.
- If neither file exists yet, Rulesync defaults to creating .rulesync/.aiignore.Notes:
- Running
rulesync init will create .rulesync/.aiignore if no ignore file is present.Example:
`ignore
tmp/
credentials/
`Global Mode
You can use global mode via Rulesync by enabling
--global option. It can also be called as user scope mode.Currently, supports rules and commands generation for Claude Code. Import for global files is supported for rules and commands.
1. Create an any name directory. For example, if you prefer
~/.aiglobal, run the following command.
`bash
mkdir -p ~/.aiglobal
`
2. Initialize files for global files in the directory.
`bash
cd ~/.aiglobal
rulesync init
`
3. Edit ~/.aiglobal/rulesync.jsonc to enable global mode.
`jsonc
{
"global": true,
}
`
4. Edit ~/.aiglobal/.rulesync/rules/overview.md to your preferences.
`md
---
root: true
--- # The Project Overview
...
`5. Generate rules for global settings.
`bash
# Run in the ~/.aiglobal directory
rulesync generate
`> [!NOTE]
> Currently, when in the directory enabled global mode:
>
> -
rulesync.jsonc only supports global, features, delete and verbose. Features can be set "rules" and "commands". Other parameters are ignored.
> - rules/*.md only supports single file has root: true, and frontmatter parameters without root are ignored.
> - Only Claude Code is supported for global mode commands.Simulate Commands, Subagents and Skills
Simulated commands, subagents and skills allow you to generate simulated features for cursor, codexcli and etc. This is useful for shortening your prompts.
1. Prepare
.rulesync/commands/.md, .rulesync/subagents/.md and .rulesync/skills/*/SKILL.md for your purposes.
2. Generate simulated commands, subagents and skills for specific tools that are included in cursor, codexcli and etc.
`bash
rulesync generate \
--targets copilot,cursor,codexcli \
--features commands,subagents,skills \
--simulate-commands \
--simulate-subagents \
--simulate-skills
`
3. Use simulated commands, subagents and skills in your prompts.
- Prompt examples:
`txt
# Execute simulated commands. By the way, s/ stands for simulate/.
s/your-command # Execute simulated subagents
Call your-subagent to achieve something.
# Use simulated skills
Use the skill your-skill to achieve something.
`Modular MCP (Deprecated)
Rulesync supports compressing tokens consumed by MCP servers d-kimuson/modular-mcp for context saving. When enabled with
--modular-mcp, it additionally generates modular-mcp.json.`bash
Enable modular-mcp via CLI
rulesync generate --targets claudecode --features mcp --modular-mcpOr via configuration file
{
"modularMcp": true
}
`When enabling modular-mcp, each MCP server must have a
description field. Example:`diff
// .rulesync/mcp.json
{
"mcpServers": {
"context7": {
+ "description": "Up-to-date documentation and code examples for libraries",
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp"
],
"env": {}
}
}
`You can also configure
exposed to exclude specific MCP servers from modular-mcp. It is optional and default to false. If you specify exposed: true, the MCP server is always loaded in the initial context.`diff
// .rulesync/mcp.json
{
"mcpServers": {
"context7": {
+ "exposed": true,
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp"
],
"env": {}
}
}
`To demonstrate the effect of modular-mcp, please see the following example:
Example of effect
Please see examples using Claude Code.
When using following mcp servers:
`json
// .rulesync/mcp.json{
"mcpServers": {
"serena": {
"description": "Semantic coding tools for intelligent codebase exploration and manipulation",
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"ide-assistant",
"--enable-web-dashboard",
"false",
"--project",
"."
],
"env": {}
},
"context7": {
"description": "Up-to-date documentation and code examples for libraries",
"type": "stdio",
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"],
"env": {}
},
"fetch": {
"description": "This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.",
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {}
}
}
}
`Once run
rulesync generate --targets claudecode --features mcp, /context result on Claude Code is as follows:`
Context Usage
โ โ โ โ โ โ โ โ โ โ claude-sonnet-4-5-20250929 ยท 82k/200k tokens (41%)
โ โ โ โ โ โ โ โ โ โ
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ System prompt: 2.5k tokens (1.3%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ System tools: 13.9k tokens (6.9%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ MCP tools: 15.7k tokens (7.9%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ Memory files: 5.2k tokens (2.6%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ Messages: 8 tokens (0.0%)
โถ โถ โถ โถ โถ โถ โถ โ โ โ โถ Free space: 118k (58.8%)
โ โ โ โ โ โ โ โ โ โ โ Autocompact buffer: 45.0k tokens (22.5%)
โ โ โ โ โ โ โ โ โ โ
`On the other hand, once run
rulesync generate --targets claudecode --features mcp --modular-mcp, /context result on Claude Code is as follows:`
Context Usage
โ โ โ โ โ โ โ โ โ โ claude-sonnet-4-5-20250929 ยท 68k/200k tokens (34%)
โ โ โ โถ โถ โถ โถ โถ โถ โถ
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ System prompt: 2.5k tokens (1.3%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ System tools: 13.5k tokens (6.8%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ MCP tools: 1.3k tokens (0.6%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ Memory files: 5.2k tokens (2.6%)
โถ โถ โถ โถ โถ โถ โถ โถ โถ โถ โ Messages: 8 tokens (0.0%)
โถ โถ โถ โถ โถ โถ โถ โ โ โ โถ Free space: 132k (66.2%)
โ โ โ โ โ โ โ โ โ โ โ Autocompact buffer: 45.0k tokens (22.5%)
โ โ โ โ โ โ โ โ โ โ
`Focus on the difference of MCP tools usage.
| | Context Usage |
| -------------------- | ------------------- |
| Disabled Modular MCP | 15.7k tokens (7.9%) |
| Enabled Modular MCP | 1.3k tokens (0.6%) |
So, in this case, approximately 92% reduction in MCP tools consumption!
Official Skills
Rulesync provides official skills that you can install using the fetch command:
`bash
rulesync fetch dyoshikawa/rulesync --features skills
`This will install the Rulesync documentation skill to your project.
Rulesync MCP Server
Rulesync provides an MCP (Model Context Protocol) server that enables AI agents to manage your Rulesync files. This allows AI agents to discover, read, create, update, and delete files dynamically.
> [!NOTE]
> The MCP server exposes the only one tool to minimize your agent's token usage. Approximately less than 1k tokens for the tool definition.
$3
#### Starting the MCP Server
`bash
rulesync mcp
`This starts an MCP server using stdio transport that AI agents can communicate with.
#### Configuration
Add the Rulesync MCP server to your
.rulesync/mcp.json:`json
{
"mcpServers": {
"rulesync-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "rulesync", "mcp"],
"env": {}
}
}
}
`FAQ
$3
You can try adding the following to
.claude/settings.json or .claude/settings.local.json:`diff
{
+ "enableAllProjectMcpServers": true
}
``According to the documentation, this means:
> Automatically approve all MCP servers defined in project .mcp.json files
MIT License