My approach to global AI engineering hub via dotfiles
I use several coding agents: Claude Code, Codex, Cursor, OpenCode... across personal and work laptops. The failure mode is familiar: each tool wants its own instruction file, the files drift, and a new machine means redoing the wiring.
My fix was not to “sync ~/.claude through Dropbox/Drive”, but rather a small, curated hub in git, deployed with GNU Stow:
- Repo: benoror/dotfiles/stow/agents
- Published notes: notes.benoror.com/Agents/README
Three layers
- Global personal defaults that travel with me:
~/.agents/AGENTS.md - Project / Team: Committed repo
AGENTS.md/CLAUDE.md(facts and conventions for that codebase). - Local override: gitignored
CLAUDE.local.mdwhen I need private exceptions.
Global stays lean. Project files own architecture. I do not force personal quirks into team repos.
One Stow package
Under stow/agents/, Stow installs the hub and tool entrypoints in one shot:
~/.agents/AGENTS.md+RESOLVER.md(canonical + discovery playbook)~/.claude/CLAUDE.md→@~/.agents/AGENTS.md~/.codex/AGENTS.md(and OpenCode / generic paths) → hub symlinks
Bootstrap on a new machine:
$ cd ~/dotfiles
$ make agents-install
$ make agents-verify
No fan-out shell scripts. Stow owns the links; Make owns install / restow / verify. Details: stow/agents/README.md
Cursor is the exception: global User Rules (and Settings Sync) matter more than a home-level AGENTS.md today. Project AGENTS.md still wins inside a workspace.
What goes in the hub
Short personal rules only: small diffs, no secrets, commits when asked, lint before “done,” prefer project docs for facts.
A RESOLVER.md tells the agent how to find instructions—repo root guides, nested packages, domain signals—not a dump of
every repo’s standards.
Workflow prompts I reuse live in notes, e.g. the Prompt Engineering Cheatsheet: /research, /implement, /refactor, /test, /debug, /document. The hub points at modes; skills can absorb the heavy versions later.
What not to sync
I do not cloud-sync whole ~/.cursor, ~/.claude, or ~/.codex trees. Those hold caches, locks, machine paths, and secrets. Chat history already follows vendor accounts. Sync textual config through the dotfiles repo; leave session blobs to the vendors.
Why this shape
- Edit once: One AGENTS.md, many tools.
- Replicable: Make agents-install on the next laptop.
- Safe with teams: Personal layer never has to land in a shared PR.
- Fits existing dotfiles: Same Stow model as zsh, git, nvim.