Dotfiles
Skill0 starsChanged 4 months agoMITView on GitHub
Set up, repair, upgrade, and optimize dotfiles with chezmoi, plus a first-class SECRETS path — version-control your config files (shell, editor, git, tools) in one git-backed source. Use to SET UP dotfiles (init, or bootstrap a new machine from the repo), REPAIR a broken state (apply fails, unreconcilable drift, source conflicts), UPGRADE day-to-day (add/edit/apply and sync across machines), OPTIMIZE the source (untracked configs, cruft, plaintext that should be encrypted), or handle SECRETS safely (never commit plaintext; a secret's value never enters the model's context). Verified with chezmoi diff/status/doctor; treats secrets as a first-class safety concern.
- Reads credentials
6 other projects use a version of this.
Adopted by
Most recently taken up by
- alumpe/skillstheir own version, first seen Sep 11, 2026
- 0xrizz/os-managertheir own version, first seen Aug 28, 2026
- AntheaLaffy/missing-semester-skills-dshtheir own version, first seen Aug 16, 2026
- AntheaLaffy/the-missing-semester-skillstheir own version, first seen Aug 16, 2026
- Jinbae10/skillstheir own version, first seen Jul 7, 2026
- Cogni-AI-OU/cogni-ai-agent-skillstheir own version, first seen May 19, 2026
Used with
Projects with it also use testing.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- 0xrizz/os-manager★ 1same name
- AntheaLaffy/the-missing-semester-skills★ 1same name
- alumpe/skills★ 0same name
- AntheaLaffy/missing-semester-skills-dsh★ 0same name
- Jinbae10/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- Brew DoctorSkill
- Credential StoreSkill
- Dev EnvironmentSkill
- Ghostty ConfigSkill
- Git SetupSkill
- Identity ProfilesSkill
- macOS DefaultsSkill
- Neovim ConfigSkill
- Runtime VersionsSkill
- Shell SyncSkill
- SSH ConfigSkill
- Terminal ThemeSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Run scripts/chezmoi_status.py — it prints all of the following as key<TAB>value lines:
- Very specific: line 76
Verify with chezmoi, not by eyeballing: After changes, re-run scripts/chezmoi_status.py: status_drift and diff_pending back to 0 means …
- Very specific: line 86
Don't assume inventory: Read chezmoi managed and the source tree each time.
- Very specific: line 90
Read ~/.config/devenv/config.toml before prompting.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dotfiles (chezmoi)
Manage config files as a git-backed source of truth with chezmoi. The source dir
(chezmoi source-path, a git repo) is authoritative; live files in $HOME are generated by
chezmoi apply. chezmoi-first (detect and respect other setups, but drive chezmoi).
Route to a workflow
| The user wants to… | Workflow |
| Set up dotfiles (first time, or bootstrap a new machine from the repo) | reference/setup.md |
| Fix a broken state — apply fails, drift won't reconcile, source conflict | reference/repair.md |
| Add / edit / apply configs day-to-day, and sync across machines | reference/upgrade.md |
| Review & tighten the source — untracked configs, cruft, plaintext to encrypt | reference/optimize.md |
| Store a secret safely (tokens, keys) — value never enters context | reference/secrets.md |
The scripts (prefer these over ad-hoc bash)
Stable, tested helpers live in scripts/ — call them instead of
re-deriving the chezmoi discovery / status / secret-scan commands each session. Run by absolute path
from this skill's directory. All three are read-only, resolve the source dir internally (never
hardcode ~/.local/share/chezmoi), and degrade gracefully when chezmoi is absent/uninitialized.
| Need | Script |
| Environment + health (installed? source dir, remote, drift counts, doctor summary) — run first | scripts/chezmoi_status.py |
Managed inventory with per-file drift status (-- in sync / MM differs); --unmanaged for add-gaps | scripts/dotfiles_inventory.py |
| Secret-hygiene tripwire (uses gitleaks if installed, else built-in patterns) — paths + reason only, never values (exit 1 = findings) | scripts/secret_scan.py [path] |
Full contract + a worked example: scripts/README.md. The inline commands in the sections and reference files below is what these run under the hood — reach for it only for novel, one-off checks.
Discovery (always run first)
Run scripts/chezmoi_status.py — it prints all of the following as key<TAB>value lines:
- Not initialized (
initialized no) → this issetup. - Initialized → the script's
status_drift/diff_pendingcounts flag drift, andscripts/dotfiles_inventory.pyshowsmanaged/unmanagedfor gaps. - The source repo, config (
~/.config/chezmoi/chezmoi.toml), and any.tmpl/.chezmoiignore/ encryption settings (all surfaced by the status script) tell you how the user's dotfiles are organized — read before editing.
<details><summary>Under the hood — the raw commands the status script runs</summary>command -v chezmoi && chezmoi --version | head -1
# NOTE: `chezmoi source-path` prints a path even when NOT initialized — don't use it as the test.
test -d "$(chezmoi source-path)/.git" && echo "(source repo exists)" || echo "(not initialized)"
chezmoi managed 2>/dev/null | head # empty + no source repo => this is `setup`
chezmoi status 2>/dev/null # drift (empty = in sync)
chezmoi git -- remote -v 2>/dev/null # is there a remote?</details>Core model (don't fight it)
- Source is truth.
chezmoi applywrites source →$HOME. Home edits are drift until captured back into source. - Pick ONE editing flow and stick to it (mixing causes drift):
chezmoi edit --apply <target>— edit the source copy, then apply. Preferred.- or edit the home file, then
chezmoi re-addto pull it back into source.
.tmplfiles template per-machine values ({{ .chezmoi.hostname }},{{ .chezmoi.os }}) and pull secrets from a password manager at apply time.
Core principles
- Verify with chezmoi, not by eyeballing. After changes, re-run
scripts/chezmoi_status.py:status_driftanddiff_pendingback to0means source == home,doctor warning=0 error=0means healthy. See reference/verification.md. Confirmapplyis idempotent (a second run leaves both counts at0). - Secrets never land in git as plaintext. This is the #1 dotfiles hazard. Before any commit,
run
scripts/secret_scan.py(paths + reason only, never values; exit 1 = findings) and route anything it flags through encryption or password-manager templates (reference/secrets.md). Make the dotfiles repo private. - Diff before apply.
chezmoi applyoverwrites home files from source — showchezmoi diffand confirm before applying onto an existing, hand-maintained config. - Don't assume inventory. Read
chezmoi managedand the source tree each time.
Settings
Read ~/.config/devenv/config.toml before prompting; if a [dotfiles] section exists, use it as
defaults (precedence: explicit answer this session > config.toml > ask). Had to ask? Offer to save
the answer back. Managed by the devenv skill. Keys honored:
manager— dotfiles manager (e.g.chezmoi).repo— remote repo name (keep it private).ignore— extra.chezmoiignorepatterns to apply.
Safety
- A secret's plaintext never enters the model's context. Detection is paths-and-reason only
(
secret_scan.pyreports only paths + a reason, never the matched text); verification is by exit code,encrypted_*.agemarkers, and unresolved{{ ... }}references — never by reading the value. Ops needing the real plaintext (age key, password-manager unlock, moving a private key) run out of band via!. See reference/secrets.md. - Never open a flagged file to "see" or confirm the finding. Once the scanner flags a path,
that line is the evidence — the reason names the rule (token shape, key block, secret-by-location),
which is everything needed to classify and route it. Reading, grepping, or
chezmoi cat-ing the file to double-check pulls the very value into context that the whole pipeline exists to keep out — one "let me verify" read undoes the guarantee. Classify by path + reason alone; if genuinely ambiguous, ask the user what the file holds rather than looking. For secret-by-location paths (private keys,.netrc,.aws/credentials) the plugin's PreToolUse guard (scripts/secret_read_guard.py) enforces this mechanically — a denial from it is the contract working, not an obstacle to route around. - The source repo is personal and often sensitive — private remote, and never publish it as an Artifact or paste its contents outward.
- On a fresh machine,
chezmoi init --applyoverwrites local configs — back up or diff first. .chezmoiignoreexcludes machine-local-only files from management; use it rather than deleting.
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.

