ai-rules-sync
lbb00 · lbb00/ai-rules-sync
This tool helps synchronize, manage, and share AI agent rules, skills, and commands across multiple projects and tools using symbolic links.
Synchronize, manage, and share your ai rules, skills, commands, subagents (Cursor, Claude Code, Copilot, OpenCode, Trae AI, Codex, Gemini CLI, Warp) with ease.
Preview
What you can do with it
- Keep common Cursor rules updated across all your local project repositories.
- Share a standard set of Claude Code skills with your team via a Git repository.
- Install and manage specialized prompt packs for Copilot, ensuring consistency.
Safety check
No risky patterns found in the files we scanned.
Automated scan of the repo files. Always review code you run.
From the README
AI Rules Sync
English · 中文 · Documentation
AI Rules Sync (AIS) — Install, compose, update, and publish native agent assets from multiple Git repositories across all your projects.
AIS is an asset federation toolkit, not a format converter. It keeps your files exactly as they are — skills, rules, commands, agents — and syncs them via symbolic links across every project you work on. Edit once, update everywhere.
How AIS is Different
| AIS | Other tools |
|---|---|
| Symlinks — upstream changes are instant | Copy files — must re-run to update |
| One source → many projects | One project at a time |
| Native assets — no format conversion | Rewrite / re-generate your files |
| Import → publish → review workflow | One-way consumption only |
| 370 KB, 5 dependencies | Often 10+ MB with deep dependency trees |
| Git-native — works with any Git remote | Tied to specific registries or APIs |
AIS is complementary to format-conversion tools. If you also need cross-tool format conversion, you can use AIS for asset management and another tool for generation — they solve different problems.
Supported Tools
This table is generated from docs/supported-tools.json via npm run docs:sync-tools.
| Tool | rules | skills | commands | agents | AGENTS.md | tools | prompts | instructions |
|---|---|---|---|---|---|---|---|---|
| Universal | — | — | — | — | ✅ | — | — | — |
| Aider | — | ✅ | — | — | — | — | — | — |
| Amp | — | ✅ | — | — | — | — | — | — |
| Antigravity CLI | — | ✅ | ✅ | — | — | — | — | — |
| Augment Code | ✅ | ✅ | ✅ | ✅ | — | — | — | — |
| Claude Code | ✅ | ✅ | — | ✅ | ✅ | — | — | — |
| Cline | ✅ | ✅ | ✅ | ✅ | — | — | — | — |
| CodeBuddy | ✅ | ✅ | ✅ | — | ✅ | — | — | — |
| Codex | ✅ | ✅ | — | ✅ | ✅ | — | — | — |
| Continue | ✅ | ✅ | — | — | — | — | ✅ | — |
| Cursor | ✅ | ✅ | ✅ | ✅ | — | — | — | — |
| DeepAgents | — | ✅ | — | ✅ | ✅ | — | — | — |
| DeepSeek | — | ✅ | — | — | ✅ | — | — | — |
| Factory Droid | — | ✅ | ✅ | ✅ | ✅ | — | — | — |
| Gemini CLI | — | ✅ | ✅ | ✅ | ✅ | — | — | — |
| GitHub Copilot | — | ✅ | — | ✅ | — | — | ✅ | ✅ |
| Goose | — | ✅ | — | — | — | — | — | — |
| Hermes Agent | ✅ | ✅ | — | — | — | — | — | — |
| Junie | ✅ | ✅ | ✅ | ✅ | ✅ | — | — | — |
| Kilo Code | — | ✅ | ✅ | ✅ | ✅ | — | — | — |
| Kimi Code | — | ✅ | — | ✅ | ✅ | — | — | — |
| Kiro | ✅ | ✅ | — | ✅ | — | — | — | — |
| OpenCode | ✅ | ✅ | ✅ | ✅ | — | ✅ | — | — |
| Pi | — | ✅ | — | — | ✅ | — | ✅ | — |
| Qwen Code | ✅ | ✅ | ✅ | ✅ | ✅ | — | — | — |
| Trae | ✅ | ✅ | ✅ | ✅ | — | — | — | — |
| Warp | ✅ | ✅ | — | — | — | — | — | — |
| Windsurf | ✅ | ✅ | ✅ | — | — | — | — | — |
| WorkBuddy | — | ✅ | — | — | — | — | — | — |
| Zed | — | ✅ | — | — | — | — | — | — |
📋 Full directory reference — source paths, modes, suffixes, and documentation links.
Also supports User Mode for personal AI config files.
Installation
Via npm (Recommended)
npm install -g ai-rules-sync
Via Homebrew (macOS only)
brew tap lbb00/ai-rules-sync https://github.com/lbb00/ai-rules-sync
brew install ais
Verify:
ais --version
Optional: Enable tab completion
ais completion install
Quick Start
Use assets from a repository
cd your-project
# Add a rule (specify repository URL the first time)
ais cursor add react -t https://github.com/your-org/rules-repo.git
# After first use, omit -t
ais cursor add vue
ais copilot instructions add coding-standards
ais claude skills add code-review
Share your existing assets
# Import a rule from your project into the repository
ais cursor rules import my-custom-rule
# Optionally push to remote
ais cursor rules import my-rule --push
Restore assets (team onboarding / CI)
# Restore all assets from ai-rules-sync.json
ais install
User-level sync (personal AI configs)
# Sync personal configs to $HOME
ais claude md add CLAUDE --user
ais gemini md add GEMINI --user
# Restore on a new machine
ais user install
Core Concepts
How It Works
Git Repository Global Cache Your Projects
┌─────────────────┐ clone ┌──────────────────┐ symlink ┌──────────┐
│ .claude/skills/ │ ───────────→ │ ~/.config/ │ ────────→ │ projectA │
│ .cursor/rules/ │ │ ai-rules-sync/ │ ────────→ │ projectB │
│ .github/inst... │ │ repos/ │ ────────→ │ projectC │
└─────────────────┘ └──────────────────┘ └──────────┘
- Clone — AIS clones your asset repositories to a global cache (
~/.config/ai-rules-sync/repos/) - Symlink — Each project gets symbolic links pointing into the cache
- Update — When you pull changes in the repo, every project sees them instantly
Three Configuration Layers
| File | Scope | Committed to Git |
|---|---|---|
ai-rules-sync.local.json | Private, per-project | No |
ai-rules-sync.json | Shared, per-project | Yes |
user.json (~/.config/ai-rules-sync/) | Global, per-user | Optional (dotfiles) |
Three Core Operations
| Command | What it does |
|---|---|
ais add | Link an asset from a repository to your project |
ais import | Copy an asset from your project into the repository, then replace with symlink |
ais install | Restore all symlinks from ai-rules-sync.json (team onboarding, CI) |
Basic Usage
Setup a Repository
# Use an existing remote repository
ais use https://github.com/your-org/rules-repo.git
# Use a local path (for development / testing)
ais use ~/my-rules-repo
# List all configured repositories
ais ls
# Switch between repositories
ais use company-rules
ais use personal-rules
Add Assets to Your Project
cd your-project
# First time: specify reposit