sync-agent-instructions
GitHub同步AI编程工具指令文件,确保CLAUDE.md、GEMINI.md和AGENTS.md内容一致。通过检测变更确定源文件并复制内容,支持自动同步或人工选择,最后暂存更改并报告结果。
Trigger Scenarios
Install
npx skills add ReflexioAI/claude-smart --skill sync-agent-instructions -g -y
SKILL.md
Frontmatter
{
"name": "sync-agent-instructions",
"description": "Sync AI coding tool instruction files (CLAUDE.md, GEMINI.md, AGENTS.md) so they stay aligned. Detects which file changed and copies it to the others. Use when syncing md files, syncing instructions, updating GEMINI.md, or updating AGENTS.md."
}
Sync Agent Instructions
Keep CLAUDE.md, GEMINI.md, and AGENTS.md in sync so all AI coding tools share the same project instructions.
Workflow
-
Detect changes — Run
git diff HEAD -- CLAUDE.md GEMINI.md AGENTS.mdto see which file(s) have uncommitted changes. -
Determine source file:
- One file changed — That file is the source. Copy its content to the other two.
- Multiple files changed — Ask the user which file to use as the source.
- No files changed — Compare all three with
diff. If they differ, report which sections differ and ask the user which file to use as source. If identical, report "All instruction files are in sync." and stop.
-
Sync — Read the source file and write its exact content to the other two files.
-
Stage — Run
git addon the two modified files. -
Report — Tell the user which file was the source and that the other two have been updated.
Version History
- 951e081 Current 2026-07-24 11:42


