← 返回
未分类 中文

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...
从单一来源同步AI编程助手配置文件,生成CLAUDE.md、AGENTS.md、GEMINI.md、.cursor/rules/、.github/copilot-instructions.md等配置文件。
nadalpiantini
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 371
下载
💾 0
安装
1
版本
#ai#config#cross-platform#latest#tools

概述

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

  1. Source of truth: .claude/rules/*.md (most expressive format — supports glob patterns, frontmatter conditions, always/attached/triggered modes)
  2. Fallback source: CLAUDE.md at repo root if .claude/rules/ doesn't exist
  3. Transform: Concatenates all rule files, strips Claude-specific frontmatter, generates each format
  4. 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

ToolOutput FileNotes
------------------------
Claude Code.claude/rules/*.md (source, not generated)Already the canonical format
Codex CLIAGENTS.mdFlat markdown, no frontmatter
Gemini CLIGEMINI.mdFlat markdown
Cursor.cursor/rules/config-sync.mdcMDC format with description + globs
GitHub Copilot.github/copilot-instructions.mdFlat markdown
Windsurf.windsurf/rules/config-sync.mdFlat markdown
Cline/Roo.clinerules/config-sync.mdFlat markdown
AiderCONVENTIONS.mdFlat markdown, concise style
Kiro.kiro/steering/config-sync.mdFlat markdown
Amazon Q.amazonq/rules/config-sync.mdFlat markdown
Goose.goosehintsLine-per-rule, no markdown
Trae AI.trae/rules/config-sync.mdFlat markdown
Zed.rulesFlat 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:
  • 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 with description and globs: **
  • 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

  1. Edit .claude/rules/*.md (your canonical source)
  2. Run config-sync to generate all other formats
  3. Commit all generated files together
  4. Repeat when rules change

Auto-detect installed tools

The script checks for:

  • .cursor/ directory → Cursor installed
  • .github/copilot-instructions.md exists → Copilot in use
  • .windsurf/ → Windsurf installed
  • .clinerules/ → Cline installed
  • .kiro/ → Kiro installed
  • .amazonq/ → Amazon Q installed
  • .trae/ → Trae installed
  • AGENTS.md exists → Codex/Amp/OpenCode in use
  • GEMINI.md exists → 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.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 08:59 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,370 📥 319,638
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,223 📥 267,289
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,919