dotfiles/docs/config/agents.md
Felipe Martin 2494760df1
Manage ~/.agents so skills follow the machines, and keep knowledge in git.
npx-managed skills stay copies so an installer update cannot land in the repo by accident; knowledge is a symlink outside home/ so maintain writes are tracked instead of dying on the next apply. Verified the live ~/.agents/knowledge link and that the lockfile is named dot_skill-lock.json so chezmoi does not ignore it.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 18:27:53 +02:00

1.1 KiB

.agents

~/.agents is owned so skills land on every machine. Most of skills/ is not hand-maintained: npx skills installs and updates those trees, and .skill-lock.json is its lock file (source, hash, timestamps). Skills absent from the lock file are local.

~/.agents/knowledge is a symlink to agents/knowledge/ at the repo root — outside home/, so chezmoi does not copy it. Writes from knowledge-maintain land in git. The target is .chezmoi.workingTree, not a hardcoded checkout path: install.sh clones to ~/.local/share/chezmoi, this machine uses a different path.

Skills stay copies. Pointing that tree at the repo would let npx skills commit third-party files. After an npx skills run, chezmoi add ~/.agents and commit; re-add misses new skill folders. dotfiles apply checks the repo, not the target, so an un-added update dies on the next apply.

CLAUDE.md is a symlink to AGENTS.md so both CLIs read one file.

Requirements

  • npx (Node) to add or update lockfile-managed skills. Apply does not need it; the files are already in the tree.