dotfiles
Sync chezmoi-managed agent dotfiles between machines.
- License 许可
- MIT
- 最近更新
- 2026-10-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dotfiles
- description
- Sync chezmoi-managed agent dotfiles between machines.
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml237 B
03 SKILL.md 正文
Dotfiles (chezmoi)
Shared config for AI coding agents (Claude Code, Codex CLI, pi) synced between machines with chezmoi.
Authority chain, where to edit
GitHub repo ← shared truth between machines
└─ chezmoi source ~/.local/share/chezmoi/ ← local clone (source state)
└─ ~/.agents/skills/ ← applied skills (canonical on the machine)
└─ ~/.claude/skills, ~/.codex/skills, ~/.pi/agent/skills ← symlinks into ~/.agents/
- Never edit tool skill dirs (
~/.claude/skills/...), they are symlinks. - There are deliberately no global agent instructions (
AGENTS.md/CLAUDE.md). - A local change is not "real" until committed and pushed from the source repo, otherwise it never reaches the other machines.
Common operations
| Task | Commands |
|---|---|
| Pull changes made on another machine | chezmoi update (git pull + apply in one) |
| Edit a managed file and share it | chezmoi edit <target> → chezmoi apply → chezmoi cd → git add -A && git commit && git push |
| A tool (or you) edited the target file directly | chezmoi re-add <file>; for templates use chezmoi merge <file>, re-add breaks templates |
| Check drift / preview | chezmoi status, chezmoi diff |
Adding a new canonical skill
- Create
dot_agents/skills/<name>/SKILL.md(frontmatter:name,description) in the source:$(chezmoi source-path). - Keep invocation metadata portable:
- For an explicit-only skill, keep Claude Code's
disable-model-invocation: trueinSKILL.mdand addpolicy.allow_implicit_invocation: falseinagents/openai.yamlfor Codex and ChatGPT. - Claude Code's
user-invocable: falsehas no Codex equivalent. Preserve it for Claude Code; Codex may still expose the skill for explicit use.
- For an explicit-only skill, keep Claude Code's
chezmoi applymaterializes it to~/.agents/skills/<name>/, instantly visible to all tools via their symlinks.- Commit + push from
chezmoi cd. Other machines pick it up withchezmoi update.
Bootstrap a new machine
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b ~/.local/bin
~/.local/bin/chezmoi init --apply <repo-url>
Prereq: the agent tools themselves must be installed and logged in separately. This repo manages their config, not their auth.
Gotchas
- Push or it didn't happen. The most common sync failure is an applied, committed-but-unpushed change sitting on one machine.
- Template sources (
.tmpl) must be edited viachezmoi edit/merge, neverre-add, which would replace the template with its rendered output. ~/.config/chezmoi/chezmoi.tomlis per-machine local state and is never in the repo. Don't try to sync it.- Skills carrying
disable-model-invocation: trueregister but stay slash-only. That is their config, not a broken link.
04 同仓库更多 Skills
wait-what
Stop. That last message did not land: re-pitch it.
video
Record self-narrating product walkthrough videos of web apps with Playwright, including before/after A/B comparisons of two versions joined by a sweeping divider. Use when the user asks to record a demo, walkthrough, or feature showcase video of a web UI, wants a before-and-after or old-vs-new comparison video, or wants video evidence of a workflow for feedback or documentation.
probe
Probe the AI models' built-in knowledge before trying to automate in the information.
Read before drafting an email or other communication handoff.
domain-modeling
Domänkort and domain model discipline. Use when creating or updating DOMAIN.md or CONTEXT.md, preparing a project overview for a stakeholder meeting, re-entering a project after a context switch, defining or challenging domain terms, building a glossary, or visualizing a domain as a card (domänkort), side-by-side spread (uppslag), or mind map (domänkarta).
diagnosing-bugs
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.