一键导入
chezmoi-drift
Audit chezmoi dotfiles for drift, unmanaged files, and broken agent skill symlinks across Claude Code, Codex, Gemini, and other harnesses.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit chezmoi dotfiles for drift, unmanaged files, and broken agent skill symlinks across Claude Code, Codex, Gemini, and other harnesses.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scan Claude/Codex session logs to find agent behavior patterns, Toolsmith adoption gaps, repeated frustrations, and candidates for new skills/tools.
Generate user-facing changelog entries from git history — plain language, audience-segmented, with optional CHANGELOG.md update.
Consolidate/dedupe contacts from macOS, iCloud, Google, Zoho, or VCF with provenance-aware review, backups, and optional approved dossiers.
Capture a technical or product decision with chosen option, rejected alternatives, and rationale — in a format a future agent can read to reconstruct context.
Audit repos for SHA/digest dependency pinning and release cooldowns across Docker, CI, and major language ecosystems; report violations, fix with approval.
Run/triage Django/DRF security smoke checks — settings, throttling, safe HTML, ORM races, model integrity — before shipping or on scanner findings.
| name | chezmoi-drift |
| description | Audit chezmoi dotfiles for drift, unmanaged files, and broken agent skill symlinks across Claude Code, Codex, Gemini, and other harnesses. |
| display_name | Chezmoi Drift |
| brand_color | #2563EB |
| local_only | true |
| group | Dev Workflow |
| usage | /chezmoi-drift:run |
| summary | Catch when your dotfiles have drifted from what's committed, and when a skill install silently broke. |
| default_prompt | Audit this machine or dotfiles setup for chezmoi drift and broken shared skill installs. Report first; don't mutate anything unless I explicitly ask. |
Use this skill as a dotfiles weekly checkup. Report first; mutate later.
src_dir=$(chezmoi source-path)
chezmoi status 2>&1
chezmoi unmanaged 2>&1 | grep -Ev '\.DS_Store|__pycache__|/Library/|/Caches/' | head -60
If chezmoi status is empty, managed files are in sync.
Run:
chezmoi status 2>&1
Interpret status codes:
M = modified in targetA = present in source but not appliedR = present in target but removed from sourceReport exact paths and codes. Do not paraphrase away the useful bits.
Run:
chezmoi unmanaged 2>&1 | grep -Ev '\.DS_Store|__pycache__|/Library/|/Caches/' | head -60
Flag 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.
Run:
src_dir=$(chezmoi source-path)
comm -23 \
<(ls ~/.local/bin | sort) \
<(ls "$src_dir/dot_local/bin" | sed 's/^executable_//' | sort)
comm -23 \
<(ls ~/.config | sort) \
<(ls "$src_dir/dot_config" | sort)
Report new scripts or config directories that look worth managing.
If a local agent-skills repo exists (e.g. ~/dev/me/agent-skills/skills), 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 =="
ls -ld "$host"/chezmoi-drift 2>/dev/null || true
readlink "$host"/chezmoi-drift 2>/dev/null || true
done
Call out:
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 has bitten this setup before (the carl-tools marketplace overlapping the live repo symlinks); keep it dead.
Use command ls, not bare ls. Carl's shells alias ls to eza, which prints
name -> target for symlinks — every symlinked skill then fails to match and the
check silently reports only the real directories. This under-reported 9 of 10
duplicates on gauss (2026-07-08).
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:
agent-skills repo is checked out and edited (any of Carl's boxes — gauss/euler/vesta), symlinks are canonical (live edits show instantly). Remove the plugin: claude plugin uninstall <name>@<marketplace>.Never install a carl-tools (or any agent-skills-derived) plugin on a box 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>.
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.
chezmoi add, chezmoi re-add, chezmoi apply, rm, or git commands unless the user explicitly asks.chezmoi source-path over hard-coding the source repo path.ln -sfn <repo>/skills/<skill> <target> over copying directories around.