Config Sync — 16 AI Tools, 1 Source
/install config-sync
Config Sync — 16 AI Tools, 1 Source
Reads .claude/rules/ (or CLAUDE.md) as canonical source and generates native config files for every major AI coding assistant.
Problem
Each AI coding tool uses a different config file:
- Claude Code →
CLAUDE.md+.claude/rules/*.md - Codex CLI →
AGENTS.md - Gemini CLI →
GEMINI.md - Cursor →
.cursor/rules/*.mdc - GitHub Copilot →
.github/copilot-instructions.md - Windsurf →
.windsurf/rules/*.md - Cline/Roo →
.clinerules/*.md - Aider →
CONVENTIONS.md - Kiro →
.kiro/steering/*.md - Amazon Q →
.amazonq/rules/*.md - Goose →
.goosehints - Trae AI →
.trae/rules/*.md - Zed →
.rules - Amp/OpenCode/Warp →
AGENTS.md(shared)
Maintaining 16 files for the same instructions is absurd. Config-sync fixes it.
How It Works
- Source of truth:
.claude/rules/*.md(most expressive format — supports glob patterns, frontmatter conditions, always/attached/triggered modes) - Fallback source:
CLAUDE.mdat repo root if.claude/rules/doesn't exist - Transform: Concatenates all rule files, strips Claude-specific frontmatter, generates each format
- Output: Only generates configs for tools you select (or all by default)
Usage
Generate all configs
python3 ~/.openclaw/skills/config-sync/scripts/config-sync.py /path/to/repo
Generate specific tools only
python3 ~/.openclaw/skills/config-sync/scripts/config-sync.py /path/to/repo --tools codex,gemini,cursor
Preview without writing
python3 ~/.openclaw/skills/config-sync/scripts/config-sync.py /path/to/repo --dry-run
Init from existing CLAUDE.md
python3 ~/.openclaw/skills/config-sync/scripts/config-sync.py /path/to/repo --init
This creates .claude/rules/ from your existing CLAUDE.md as the canonical source.
Supported Tools
| Tool | Output File | Notes |
|---|---|---|
| Claude Code | .claude/rules/*.md (source, not generated) |
Already the canonical format |
| Codex CLI | AGENTS.md |
Flat markdown, no frontmatter |
| Gemini CLI | GEMINI.md |
Flat markdown |
| Cursor | .cursor/rules/config-sync.mdc |
MDC format with description + globs |
| GitHub Copilot | .github/copilot-instructions.md |
Flat markdown |
| Windsurf | .windsurf/rules/config-sync.md |
Flat markdown |
| Cline/Roo | .clinerules/config-sync.md |
Flat markdown |
| Aider | CONVENTIONS.md |
Flat markdown, concise style |
| Kiro | .kiro/steering/config-sync.md |
Flat markdown |
| Amazon Q | .amazonq/rules/config-sync.md |
Flat markdown |
| Goose | .goosehints |
Line-per-rule, no markdown |
| Trae AI | .trae/rules/config-sync.md |
Flat markdown |
| Zed | .rules |
Flat markdown |
Transformation Rules
Stripped from source
- YAML frontmatter (--- blocks) — tool-specific, not portable
alwaysApply: true/false— Claude Code specific- Glob patterns in frontmatter — converted to natural language headers
Added to each output
- Header comment:
\x3C!-- Generated by config-sync. Edit source at .claude/rules/ --> - Tool-specific header if needed (e.g., MDC frontmatter for Cursor)
Format adaptations
- Goose (
.goosehints): Each rule becomes one line, no markdown - Cursor (
.mdc): Gets MDC frontmatter withdescriptionandglobs: ** - Aider (
CONVENTIONS.md): Condensed to bullet points, no long explanations - AGENTS.md: Standard markdown, used by Codex/Amp/OpenCode/Warp (4 tools, 1 file)
Workflow
- Edit
.claude/rules/*.md(your canonical source) - Run
config-syncto generate all other formats - Commit all generated files together
- Repeat when rules change
Auto-detect installed tools
The script checks for:
.cursor/directory → Cursor installed.github/copilot-instructions.mdexists → Copilot in use.windsurf/→ Windsurf installed.clinerules/→ Cline installed.kiro/→ Kiro installed.amazonq/→ Amazon Q installed.trae/→ Trae installedAGENTS.mdexists → Codex/Amp/OpenCode in useGEMINI.mdexists → Gemini CLI in use
If --tools is not specified, generates all formats (belt-and-suspenders approach).
Philosophy
One source of truth. Many outputs. Like a compiler: write once in the richest language, emit to every target.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install config-sync - 安装完成后,直接呼叫该 Skill 的名称或使用
/config-sync触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Config Sync — 16 AI Tools, 1 Source 是什么?
Sync AI coding assistant config files from a single source. Generates CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules/, .github/copilot-instructions.md, .wind... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 105 次。
如何安装 Config Sync — 16 AI Tools, 1 Source?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install config-sync」即可一键安装,无需额外配置。
Config Sync — 16 AI Tools, 1 Source 是免费的吗?
是的,Config Sync — 16 AI Tools, 1 Source 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Config Sync — 16 AI Tools, 1 Source 支持哪些平台?
Config Sync — 16 AI Tools, 1 Source 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Config Sync — 16 AI Tools, 1 Source?
由 nadalpiantini(@nadalpiantini)开发并维护,当前版本 v1.0.0。