dotfiles
AGENTS.md3 starsChanged 8 months agoApache-2.0View on GitHub
[chezmoi-dotfiles] Dotfiles Management & Agent Skills Registry Cross-platform dotfiles managed by chezmoi. Targets macOS (primary) with Nix/Homebrew for package management. Also serves as the source-of-truth for a portable agent skills catalog and a small set of subagents (architect, curator, debugger, guardian, ideator, strategist, technical-documentation-architect, writer). The catalog is cross-project: once installed via agentspec, the same skills and subagents are available to any tool (claude-code, codex, gemini, copilot) from any project, not just this repo. This is the canonical reference for…
- Pipes a download into a shell
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- dot_agents/AGENTS.mdAGENTS.md
- pack-template/AGENTS.mdAGENTS.md
- llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 1 is common, 0 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
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
- could be automatic: a setting could enforce it
- Very specific: line 51
Use tree for directory layout and ripgrep/ag for finding files and patterns.
- Very specific: line 90
Use conventional commits: feat:, fix:, chore:, docs:
- Common: line 95
Never commit secrets, API keys, or tokens
- Very specific: line 96
Use private_ prefix for sensitive config files
- Very specific: line 97
Use .tmpl with chezmoi data or environment variables for secrets
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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-dotfiles] Dotfiles Management & Agent Skills Registry
Project Overview
Cross-platform dotfiles managed by chezmoi. Targets macOS (primary) with Nix/Homebrew for package management. Also serves as the source-of-truth for a portable agent skills catalog and a small set of subagents (architect, curator, debugger, guardian, ideator, strategist, technical-documentation-architect, writer). The catalog is cross-project: once installed via agentspec, the same skills and subagents are available to any tool (claude-code, codex, gemini, copilot) from any project, not just this repo.
Build & Apply
chezmoi apply # Deploy dotfiles to $HOME
chezmoi diff # Preview pending changes
chezmoi add <file> # Track a new file
chezmoi edit <file> # Edit source, then applyFile Naming Conventions
| Prefix/Suffix | Meaning |
dot_ | Maps to . (e.g., dot_zshrc -> ~/.zshrc) |
private_ | Restrictive file permissions |
.tmpl | Go text/template with chezmoi data |
run_once_before_ | Run-once setup script (before apply) |
run_once_after_ | Run-once setup script (after apply) |
run_onchange_ | Re-runs when content hash changes |
This is the canonical reference for chezmoi naming. CONTRIBUTING.md and other docs should link here rather than duplicating the table.
Key Directories
These paths are chezmoi source paths inside this repo. After chezmoi apply they are deployed to the locations in the "Deployed at" column, which is where they are picked up by tools and other projects.
| Source path | Deployed at | Contents |
dot_agents/skills/ | ~/.agents/skills/ | Portable agent skills (following Agent Skills Spec) |
dot_agents/agents/ | ~/.agents/agents/ | Subagent definitions (architect, curator, debugger, guardian, ideator, strategist, technical-documentation-architect, writer) |
dot_config/ | ~/.config/ | Tool configs (Neovim, Ghostty, Tmux, direnv) |
dot_zsh/ | ~/.zsh/ | Zsh functions and customizations |
dot_codex/ | ~/.codex/ | Codex CLI config: workspace-write "Auto" base + writer/reviewer/plan/guardian profile overlays and matching /agent subagents in dot_codex/agents/ |
dot_gemini/ | ~/.gemini/ | Legacy Gemini CLI settings, kept as Antigravity CLI (agy) first-run migration seed; agy config lives in ~/.gemini/antigravity-cli/ |
dot_config/opencode/ | ~/.config/opencode/ | OpenCode instructions; native install, update, and status managed by dotfiles; portable agents rendered by agentspec |
dot_copilot/ | ~/.copilot/ | GitHub Copilot CLI config (settings.json: model, effort, theme) |
catalog.toml | (not deployed) | Optional packages, skill packs (skills), and [[bundle]] groups with their presets. Selected per machine at [data].packages; rendered by Brewfile.tmpl; skill packs gated by .chezmoitemplates/skills; managed with the dotfiles CLI in cli/ |
themes/ | (not deployed) | Color themes (Ghostty, Neovim, tmux, dotfiles output); cyberdream.toml is the default and the base others merge onto; resolved by .chezmoitemplates/theme (mirrored by theme::resolve in cli/src/theme.rs); format in themes/README.md |
pack-template/ | (not deployed) | Starter template for a pack (company, team, or role overlay); one repo can hold a folder per role |
cli/ | (not deployed) | Rust source for the dotfiles CLI; built and attached to every release by release.yml |
| (not tracked) | ~/.config/packs/<repo>/ or local folders | Optional packs, stacked in order from packs (git URL, url//folder, or local path); fetched by run_after_sync-packs.sh.tmpl (never fatal) and resolved for every hook by .chezmoitemplates/packs (mirrored by Pack::parse in cli/src/chezmoi.rs). Each pack's optional catalog.toml joins the package catalog through .chezmoitemplates/catalog (validated copies only). Never add pack files to this repo |
Discovering Structure
Use tree for directory layout and ripgrep/ag for finding files and patterns. Do not rely on static file listings; discover the current state from the filesystem.
Using Skills and Subagents in Other Projects
Once chezmoi apply has run on the host, skills live at ~/.agents/skills/ and subagents at ~/.agents/agents/. They are not bound to this repo. From any project:
agentspec manage list # Inspect what's installed
agentspec manage link <name> claude-code # Link a skill/agent to claude-code
agentspec manage link <name> codex # ...or codex, gemini, etc.
agentspec sync --fast # Re-discover and re-link everythingThe guardian subagent and the orchestrate-agents skill are designed to work together for multi-agent fleets: orchestrate-agents drives the tmux panes, guardian supervises them.
Code Style
- Shell scripts: POSIX-compatible where possible, bash/zsh when needed. bash 3.2 is the floor:
#!/usr/bin/env bashfinds macOS's/bin/bash3.2 on a fresh Mac. Everyrun_andmodify_template starts with{{ includeTemplate "bash-modern.sh" . }}right after the shebang, which re-runs the script under Homebrew's bash 5 when present, but scripts must still work on 3.2. No associative arrays,mapfile,${x,,},|&,&>>,[[ -v, or heredocs inside$(...)(3.2 misparses them; useIFS= read -r -d '' var <<'EOF' || true). Guard array expansions underset -u(${a[@]+"${a[@]}"}; 3.2 aborts on empty arrays). Never pipe a download into a shell (curl | sh,sh -c "$(curl ...)"): a failed download runs an empty script that "succeeds"; usefetch_and_run <url> <shell>fromui.sh..github/scripts/lint-shell.shenforces all of this in CI. - Templates: Use
{{ .chezmoi.os }}guards for platform-specific blocks - Script output: every
run_script includes{{ includeTemplate "ui.sh" . }}and prints only through itsui_*helpers (oneui_section, quiet when nothing changed, aui_hintwith the next step under every warning or failure). No rawechostatus lines or emoji.
Testing
.github/scripts/check.sh # Render personal + work machines, bash -n every run_ script (same as CI)
chezmoi diff --use-builtin-diff # Dry-run before applying (diff.command is nvim; it hangs headless)
chezmoi verify # Verify source stateThe dotfiles CLI is a Rust crate in cli/ (see cli/README.md):
cd cli && cargo fmt --all -- --check && cargo clippy --all-targets -- -D warnings && cargo testCI (.github/workflows/ci.yml) runs check.sh on macOS and Linux plus the cli/ checks for every PR; release.yml runs CI again, then sr tags, bumps cli/Cargo.toml, writes CHANGELOG.md, and a matrix attaches dotfiles-<target> binaries with .sha256 files to the release.
Commit Guidelines
- Use conventional commits:
feat:,fix:,chore:,docs: - Scope by tool/area:
feat(nvim):,fix(zsh):,chore(brew):
Security
- Never commit secrets, API keys, or tokens
- Use
private_prefix for sensitive config files - Use
.tmplwith chezmoi data or environment variables for secrets - SSH keys are NOT managed by chezmoi (only
~/.ssh/config)
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.

