---
name: Sync Agent Instructions
slug: sync-agent-instructions
category: Automation
description: Sync Agent Instructions keeps CLAUDE.md, GEMINI.md, and AGENTS.md aligned by copying the changed file to the others. Use it when updating shared instructions for Claude, Gemini, or other coding agents.
github: "https://github.com/ReflexioAI/claude-smart/tree/main/.agents/skills/sync-agent-instructions"
language: Python
stars: 771
forks: 85
install: "npx degit https://github.com/ReflexioAI/claude-smart/tree/main/.agents/skills/sync-agent-instructions ~/.claude/skills/sync-agent-instructions"
installs_to: ~/.claude/skills/sync-agent-instructions
source_path: .agents/skills/sync-agent-instructions/SKILL.md
collection_size: 13
category_size: 1523
collection_url: "https://dirskills.com/collections/ReflexioAI/claude-smart"
added: 2026-08-23T05:19:12.719Z
last_synced: 2026-08-23T05:19:12.719Z
canonical_url: "https://dirskills.com/skills/sync-agent-instructions"
---

# Sync Agent Instructions

Sync Agent Instructions keeps CLAUDE.md, GEMINI.md, and AGENTS.md aligned by copying the changed file to the others. Use it when updating shared instructions for Claude, Gemini, or other coding agents.

**Install:**

```bash
npx degit https://github.com/ReflexioAI/claude-smart/tree/main/.agents/skills/sync-agent-instructions ~/.claude/skills/sync-agent-instructions
```

## README

# Sync Agent Instructions

Keep CLAUDE.md, GEMINI.md, and AGENTS.md in sync so all AI coding tools share the same project instructions.

## Workflow

1. **Detect changes** — Run `git diff HEAD -- CLAUDE.md GEMINI.md AGENTS.md` to see which file(s) have uncommitted changes.

2. **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.

3. **Sync** — Read the source file and write its exact content to the other two files.

4. **Stage** — Run `git add` on the two modified files.

5. **Report** — Tell the user which file was the source and that the other two have been updated.
