chezmoi-drift
Skill6 starsChanged 4 months agoMITView on GitHub
Check chezmoi dotfiles for drift, unmanaged files, and broken skill links.
In this repository27 other files it gives its agents.
- agent-skills-agentsAGENTS.md
- agent-skills-claudeCLAUDE.md
- agent-log-forensicsSkill
- changelog-writerSkill
- contacts-unifySkill
- decision-logSkill
- dependency-pinningSkill
- django-smoke-alarmSkill
- empathy-auditSkill
- first-contactSkill
- handle-prSkill
- launch-sequenceSkill
- parallel-isolated-app-testingSkill
- post-mortemSkill
- pre-mortemSkill
- profile-meSkill
- ralph-loopSkill
- release-operatorSkill
- remote-host-verifierSkill
- research-personSkill
- scope-hammerSkill
- second-opinionsSkill
- status-copy-trust-auditSkill
- support-stormSkill
- trust-auditSkill
- visual-qa-loopSkill
- wide-open-brainstormSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 15
Use this skill as a dotfiles weekly checkup.
- Very specific: line 25
If chezmoi status is empty, managed files are in sync.
- Very specific: line 80
If a local agent-skills repo checkout exists (e.g.
- Very specific: line 111
Use command ls, not bare ls.
- Distinctive: line 125
Never install a plugin derived from the skills repo on a machine that already symlinks the live repo.
- Very specific: line 150
Do not run chezmoi add, chezmoi re-add, chezmoi apply, rm, or git commands unless the user explicitly asks.
- Very specific: line 151
Prefer chezmoi source-path over hard-coding the source repo path.
- Distinctive: line 152
Never add secrets or token-bearing files without converting them to a safe template first.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chezmoi Drift
Use this skill as a dotfiles weekly checkup. Report first; mutate later.
Quick Start
src_dir=$(chezmoi source-path)
chezmoi status 2>&1
chezmoi unmanaged 2>&1 | grep -Ev '\.DS_Store|__pycache__|/Library/|/Caches/' | head -60If chezmoi status is empty, managed files are in sync.
Workflow
1. Check managed-file drift
Run:
chezmoi status 2>&1Interpret status codes:
M= modified in targetA= present in source but not appliedR= present in target but removed from source
Report exact paths and codes. Do not paraphrase away the useful bits.
2. Find unmanaged files worth tracking
Run:
chezmoi unmanaged 2>&1 | grep -Ev '\.DS_Store|__pycache__|/Library/|/Caches/' | head -60Flag only files that look intentional and reusable, especially in:
~/~/.local/bin/~/.config/~/.claude/,~/.codex/,~/.gemini/,~/.continue/,~/.cursor/~/.local/share/opencode/
Skip app noise, caches, session files, logs, and secrets.
3. Check script and config coverage
Run:
src_dir=$(chezmoi source-path)
comm -23 \
<(command ls ~/.local/bin | sort) \
<(command ls "$src_dir/dot_local/bin" | sed 's/^executable_//' | sort)
comm -23 \
<(command ls ~/.config | sort) \
<(command ls "$src_dir/dot_config" | sort)Report new scripts or config directories that look worth managing.
4. Check shared skill install health
If a local agent-skills repo checkout exists (e.g. ~/dev/agent-skills/skills; ask or search if unsure), prefer symlinks from the live skill directories back to that repo rather than copying.
Inspect:
for host in \
~/.claude/skills \
~/.codex/skills \
~/.agents/skills \
~/.local/share/opencode/skills \
~/.gemini/skills \
~/.continue/skills \
~/.cursor/skills; do
[ -d "$host" ] || continue
echo "== $host =="
command ls -ld "$host"/chezmoi-drift 2>/dev/null || true
readlink "$host"/chezmoi-drift 2>/dev/null || true
doneCall out:
- missing installs
- copied directories where a symlink should exist
- stale links (broken or pointing to a moved/deleted source)
5. Detect double-installed skills (symlink + plugin)
A skill must load through one mechanism only. The expensive failure mode is a skill present both as a symlink in ~/.claude/skills/<name> and as an installed plugin (<name>@<marketplace>). It then appears twice in every agent's skill list — wasted context and confusing UX. This happens when a plugin marketplace built from the same skills repo overlaps live repo symlinks.
This check is Claude Code specific: skip it if the claude CLI isn't installed (say so in the report).
Use command ls, not bare ls. If ls is aliased to eza or similar, it prints
name -> target for symlinks, so symlinked skills fail to match and the
check silently under-reports.
comm -12 \
<(command ls -1 ~/.claude/skills 2>/dev/null | sort -u) \
<(claude plugin list 2>/dev/null | grep '❯' | sed 's/^[^❯]*❯ *//; s/@.*//' | grep . | sort -u)Any name printed is double-installed. The fix is to keep one mechanism:
- On a machine where the skills repo is checked out and edited, symlinks are canonical (live edits show instantly). Remove the plugin:
claude plugin uninstall <name>@<marketplace>. - On a machine without the repo, plugin install is canonical. Remove the stray symlink instead.
Never install a plugin derived from the skills repo on a machine that already symlinks the live repo.
A marketplace with "autoUpdate": true in ~/.claude/settings.json will keep
reinstating its plugins. Uninstalling the plugins is not enough — remove the
marketplace too: claude plugin marketplace remove <name>.
6. Report
Use this format:
DRIFT REPORT
============
Managed files with drift: ...
Unmanaged files worth tracking: ...
Scripts not in chezmoi: ...
Config dirs not in chezmoi: ...
Shared skill install issues: ...
Double-installed skills (symlink + plugin): ...Then propose exact commands for anything worth fixing.
Action Rules
- Do not run
chezmoi add,chezmoi re-add,chezmoi apply,rm, or git commands unless the user explicitly asks. - Prefer
chezmoi source-pathover hard-coding the source repo path. - Never add secrets or token-bearing files without converting them to a safe template first.
- For shared skills, prefer
ln -sfn <repo>/skills/<skill> <target>over copying directories around.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

