sync-agent-rules

Installation
SKILL.md

sync-agent-rules

Keeps the user-level agent instructions in sync with a remote git repo that stores one canonical copy. There is a single source of truth locally too:

  • ~/AGENTS.md — the full canonical instructions (the only file that is synced)
  • ~/.claude/CLAUDE.md — a one-line stub @~/AGENTS.md that imports it, so Claude Code loads the same rules without keeping a duplicate copy

The repo (any git repo, e.g. a Gitea/GitHub repo like …/you/AGENTS) holds a single file. Pull overwrites ~/AGENTS.md with it (backing it up first) and (re)writes the CLAUDE.md stub. Push sends ~/AGENTS.md up and refuses to silently clobber remote changes.

The @~/AGENTS.md stub uses an absolute path on purpose: Claude Code resolves @-imports relative to the importing file, so a bare @AGENTS.md inside ~/.claude/CLAUDE.md would look for ~/.claude/AGENTS.md (wrong file). init and pull manage this stub for you — you don't edit it by hand.

Installs
5
GitHub Stars
1
First Seen
Jul 9, 2026