Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
SkillAn toànQuy trình & bộ nhớ agentCần cài đặt chút

ai-rules-sync

lbb00 · lbb00/ai-rules-sync

Công cụ này giúp đồng bộ hóa, quản lý và chia sẻ các quy tắc, kỹ năng và lệnh của tác nhân AI trên nhiều dự án và công cụ bằng cách sử dụng liên kết tượng trưng.

Dễ dàng đồng bộ hóa, quản lý và chia sẻ các rule AI, skill, command, subagent của bạn (Cursor, Claude Code, Copilot, OpenCode, Trae AI, Codex, Gemini CLI, Warp) với dễ dàng.

38 sao1Giấy phép: UnlicenseCập nhật 2 tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Cập nhật các quy tắc Cursor phổ biến trên tất cả các kho lưu trữ dự án cục bộ của bạn.
  • Chia sẻ một bộ kỹ năng Claude Code tiêu chuẩn với nhóm của bạn thông qua một kho lưu trữ Git.
  • Cài đặt và quản lý các gói prompt chuyên biệt cho Copilot, đảm bảo tính nhất quán.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ 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

AISOther tools
Symlinks — upstream changes are instantCopy files — must re-run to update
One source → many projectsOne project at a time
Native assets — no format conversionRewrite / re-generate your files
Import → publish → review workflowOne-way consumption only
370 KB, 5 dependenciesOften 10+ MB with deep dependency trees
Git-native — works with any Git remoteTied 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.

ToolrulesskillscommandsagentsAGENTS.mdtoolspromptsinstructions
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 │
└─────────────────┘               └──────────────────┘           └──────────┘
  1. Clone — AIS clones your asset repositories to a global cache (~/.config/ai-rules-sync/repos/)
  2. Symlink — Each project gets symbolic links pointing into the cache
  3. Update — When you pull changes in the repo, every project sees them instantly

Three Configuration Layers

FileScopeCommitted to Git
ai-rules-sync.local.jsonPrivate, per-projectNo
ai-rules-sync.jsonShared, per-projectYes
user.json (~/.config/ai-rules-sync/)Global, per-userOptional (dotfiles)

Three Core Operations

CommandWhat it does
ais addLink an asset from a repository to your project
ais importCopy an asset from your project into the repository, then replace with symlink
ais installRestore 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
Xem mã nguồn trên GitHub