agentleFS
urmzdurmzd/dotfiles/AGENTS.md

dotfiles

AGENTS.md6 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 code style.

    Of the AGENTS.md files we read, the 35,266 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.

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
  1. Very specific:

    Use tree for directory layout and ripgrep/ag for finding files and patterns.

    line 51
  2. Very specific:

    Use conventional commits: feat:, fix:, chore:, docs:

    line 90
  3. Common:

    Never commit secrets, API keys, or tokens

    line 95
  4. Very specific:

    Use private_ prefix for sensitive config files

    line 96
  5. Very specific:

    Use .tmpl with chezmoi data or environment variables for secrets

    line 97

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

[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 apply

File Naming Conventions

Prefix/SuffixMeaning
dot_Maps to . (e.g., dot_zshrc -> ~/.zshrc)
private_Restrictive file permissions
.tmplGo 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 pathDeployed atContents
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/ (settings.json merged: auto mode + terminal sandbox baseline)
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 foldersOptional 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 everything

The 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 bash finds macOS's /bin/bash 3.2 on a fresh Mac. Every run_ and modify_ 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; use IFS= read -r -d '' var <<'EOF' || true). Guard array expansions under set -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"; use fetch_and_run <url> <shell> from ui.sh. .github/scripts/lint-shell.sh enforces 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 its ui_* helpers (one ui_section, quiet when nothing changed, a ui_hint with the next step under every warning or failure). No raw echo status 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 state

The 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 test

CI (.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 .tmpl with chezmoi data or environment variables for secrets
  • SSH keys are NOT managed by chezmoi (only ~/.ssh/config)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.