Skip to content
Back to skills

Agent File Synchronization

ASecurity

Maintains AGENTS.md as the single canonical project instruction file and reports legacy CLAUDE.md, GEMINI.md, and .github/copilot-instructions.md mirrors without copying into them by default. Explicit target syncing remains an opt-in compatibility operation. Also reports drift between .agent/rules/ and matching plugins/*/rules/ sources. Triggers: "sync instructions", "sync AGENTS.md", "check instruction drift", "replicate instruction files", "check rule drift".

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonbashgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill agent-file-synchronization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent File Synchronization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent File Synchronization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-agent-file-synchronization/badge)](https://www.skillsdirectory.com/skills/richfrem-agent-file-synchronization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-file-synchronization
plugin: cli-agents
description: >
  Maintains AGENTS.md as the single canonical project instruction file and reports legacy
  CLAUDE.md, GEMINI.md, and .github/copilot-instructions.md mirrors without copying into them
  by default. Explicit target syncing remains an opt-in compatibility operation. Also reports
  drift between .agent/rules/ and matching plugins/*/rules/ sources. Triggers: "sync instructions",
  "sync AGENTS.md", "check instruction drift", "replicate instruction files", "check rule drift".
allowed-tools: Bash, Read, Write
---

# Agent File Synchronization (`agent-file-synchronization`)

Maintains AGENTS.md as the canonical project instruction file and inspects rule drift without blind overwrites.

## Contents

- [Constraints](#constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [Target Preservations](#target-preservations)
- [References](#references)

## Constraints

1. **Dry-run first**: Always execute with `--dry-run` before `--execute`.
2. **Canonical authority**: `AGENTS.md` is the sole canonical source; legacy mirrors are opt-in compatibility targets only.
3. **No blind copies**: Preserve platform-specific sections (headers/tool mapping) automatically.
4. **Scope boundary**: This skill owns mechanical replication and drift detection, not instruction authoring or optimization.

## Quick start

Preview instruction synchronization across project instruction files:

```bash
python3 scripts/sync_instruction_files.py --dry-run
```

## Workflow

1. **Dry-Run Inspection**: Run `python3 scripts/sync_instruction_files.py --dry-run` and review diff summary.
2. **Execute Sync**: After human confirmation, run `python3 scripts/sync_instruction_files.py --execute`.
3. **Rule Drift Check**: Compare `.agent/rules/*.md` against matching `plugins/<plugin>/rules/*.md` sources:
   ```bash
   python3 scripts/sync_instruction_files.py --check-rules
   ```
4. **Reconcile Diffs**: On detected diffs, manually reconcile stale copies.

## Verification

Run the test suite to verify synchronization logic and preserved sections:

```bash
pytest plugins/cli-agents/skills/agent-file-synchronization/tests/test_sync_instruction_files.py
```

## Target Preservations

| Target | Preserved Section | Detection |
|---|---|---|
| `GEMINI.md` | `## Gemini CLI Tool Mapping` table | Tail marker match |
| `.github/copilot-instructions.md` | `# Copilot Instructions` header block | Header before body anchor |
| `AGENTS.md` | Custom header lines before anchor | Header before anchor |
| `CLAUDE.md` | Custom header lines before anchor | Header before anchor |

## References

- [acceptance-criteria.md](references/acceptance-criteria.md) — Acceptance criteria for canonical instruction synchronization.

Files in this skill

  • SKILL.md5.9 KB
  • evals/evals.json1.1 KB
  • references/acceptance-criteria.md69 B
  • scripts/sync_instruction_files.py42 B
  • tests/test_sync_instruction_files.py3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.