English | 简体中文
agentsync is a small Go CLI that keeps AI coding-agent instructions and reusable skills in one canonical place.
It prevents drift between tools such as Codex, Claude Code, and OpenCode by converging their global instruction files and SKILL.md directories into shared sources under ~/.config/agentsync.
Canonical instruction file:
~/.config/agentsync/AGENTS.md
Tool-specific instruction aliases:
~/.codex/AGENTS.md
~/.config/opencode/AGENTS.md
~/.claude/CLAUDE.md
Canonical skill directory:
~/.config/agentsync/skills/<skill-name>/SKILL.md
Tool-specific skill aliases:
~/.claude/skills/<skill-name>
~/.codex/skills/<skill-name>
~/.config/opencode/skill/<skill-name>
Each skill is managed as a whole directory. A skill must contain SKILL.md; any scripts, templates, references, or assets next to it stay with that skill.
go install github.com/x0c/agentsync@latestOr from a checkout:
go install .Preview changes without writing anything:
agentsync --checkConverge global instructions and skills:
agentsyncRunning agentsync repeatedly is intended to be idempotent. After the first convergence, later runs should report ok for managed aliases.
Inside a Git repository:
agentsync --repoThis uses the repository AGENTS.md as the source and manages:
CLAUDE.md -> AGENTS.md
Batch process repositories under a directory:
agentsync --all ~/Codes--checkis read-only.- Existing unique instruction content is appended to the canonical source before aliases are created.
- Existing skill directories are copied into the canonical skill directory before aliases are created.
- Replaced files and directories are backed up under
~/.config/agentsync/backups/. - Hidden skill directories such as Codex
.systeminternals are ignored. - macOS and Linux use symlinks first.
- Windows tries symlinks first, then hardlinks, then a managed copy with a marker comment.
Project documentation starts at docs/OVERVIEW.md.
go test ./...
go build ./...
agentsync --checkMIT