dotfiles
AGENTS.md16 starsChanged 4 months agoMITView on GitHub
These dotfiles are an operating system on top of macOS. Not just a set of configs, but a living, evolving workspace management system. New here? Read docs/repo-map.md — it tiers every directory by importance (Core / Important / Secondary / Peripheral / Experiment), so you know what matters and what's just an experiment. Each directory also has its own AGENTS.md with operational detail. The installer is plain zsh, not make. Makefile is a one-line wrapper (install: ; @./install.sh) kept only…
- Deletes or force-pushes
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,773 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 repository105 other files it gives its agents.
- ableton/AGENTS.mdAGENTS.md
- aichat/AGENTS.mdAGENTS.md
- aider/AGENTS.mdAGENTS.md
- annepro2/AGENTS.mdAGENTS.md
- atuin/AGENTS.mdAGENTS.md
- btop/AGENTS.mdAGENTS.md
- chromium-vimium-extension/AGENTS.mdAGENTS.md
- claude-code/AGENTS.mdAGENTS.md
- codex/AGENTS.mdAGENTS.md
- contextMenu/AGENTS.mdAGENTS.md
- cron/AGENTS.mdAGENTS.md
- crush/AGENTS.mdAGENTS.md
- docker/AGENTS.mdAGENTS.md
- docker-logger/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- eqmac/AGENTS.mdAGENTS.md
- eza/AGENTS.mdAGENTS.md
- firefox-vimium-addon/AGENTS.mdAGENTS.md
- fork/AGENTS.mdAGENTS.md
- hammerspoon/AGENTS.mdAGENTS.md
- hermes/AGENTS.mdAGENTS.md
- heroic/AGENTS.mdAGENTS.md
- homebrew/AGENTS.mdAGENTS.md
- iina/AGENTS.mdAGENTS.md
- immich/AGENTS.mdAGENTS.md
- install/AGENTS.mdAGENTS.md
- iterm/AGENTS.mdAGENTS.md
- karabiner/AGENTS.mdAGENTS.md
- keyboard-layout/AGENTS.mdAGENTS.md
- lazydocker/AGENTS.mdAGENTS.md
- lazygit/AGENTS.mdAGENTS.md
- litellm/AGENTS.mdAGENTS.md
- macos/AGENTS.mdAGENTS.md
- macos_cleanup/AGENTS.mdAGENTS.md
- macos_update/AGENTS.mdAGENTS.md
- marta/AGENTS.mdAGENTS.md
- mistral-vibe/AGENTS.mdAGENTS.md
- noti/AGENTS.mdAGENTS.md
- npm/AGENTS.mdAGENTS.md
- opencode/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- qdrant/AGENTS.mdAGENTS.md
- qwen-code/AGENTS.mdAGENTS.md
- rag/AGENTS.mdAGENTS.md
- rtk/AGENTS.mdAGENTS.md
- tmux/AGENTS.mdAGENTS.md
- uv/AGENTS.mdAGENTS.md
- voiceink/AGENTS.mdAGENTS.md
- vscode/AGENTS.mdAGENTS.md
- xcode/AGENTS.mdAGENTS.md
- zap/AGENTS.mdAGENTS.md
- zsh/AGENTS.mdAGENTS.md
- ableton/CLAUDE.mdCLAUDE.md
- aichat/CLAUDE.mdCLAUDE.md
- aider/CLAUDE.mdCLAUDE.md
- annepro2/CLAUDE.mdCLAUDE.md
- atuin/CLAUDE.mdCLAUDE.md
- btop/CLAUDE.mdCLAUDE.md
- chromium-vimium-extension/CLAUDE.mdCLAUDE.md
- claude-code/CLAUDE.mdCLAUDE.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
When adding new shared commands, agents, or skills — add them to claude-code/ only.
- Very specific: line 29
Never brew uninstall --zap codex — its zap stanza deletes ~/.codex.
- Distinctive: line 33
Fail-fast philosophy: Do NOT add existence checks for dependencies, tools, or paths.
- Very specific: line 34
Linting: No linting required - this is a configuration repository (shell scripts, Lua scripts, dotfiles)
- Very specific: line 65
Adding an app config: add a "$DOTFILES/<app>/<file>" "<dest>" pair to the right link_all table in install/07-config-links.sh (app configs) …
- Very specific: line 127
State: Default-app handling was fully reworked.
- Very specific: line 148
If after login .cs still opens in Rider, the user default did NOT beat Rider's Info.plist Editor claim — escalate (make VSCode declare the …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Agent Guidelines for Dotfiles Repository
These dotfiles are an operating system on top of macOS. Not just a set of configs, but a living, evolving workspace management system.
New here? Read docs/repo-map.md — it tiers every directory by importance
(Core / Important / Secondary / Peripheral / Experiment), so you know what
matters and what's just an experiment. Each directory also has its own
AGENTS.md with operational detail.
Build/Test Commands
make- Full dotfiles installation & symlink setup (thin wrapper:makejust runs./install.sh)up- System-wide update & cleanup (brew, npm, macOS, cache)
Architecture & Structure
- Dotfiles repo: Configuration files symlinked to system locations (~/.zshrc, ~/.gitconfig, etc.)
- Package management: Homebrew with brewfile for app installations and documentation in
/opt/homebrew/docs/ - Automation: Hammerspoon for window management, URL routing, keyboard layouts
- Keyboard: Karabiner-Elements for advanced keyboard customization
- Shell: Zsh + Oh My Zsh with extensive plugin ecosystem
- No databases or APIs: Pure configuration repository
- Symlinks: Created by
install.sh/install/*.sh(e.g., ~/.gitconfig → git/gitconfig; app configs link to respective directories) - Reference: See
README.mdfor detailed setup
AI Coding Tools — Shared Configuration
Claude Code (claude-code/) is the single source of truth for commands/, agents/, skills/; Qwen Code, and Codex consume them via symlinks the installer creates (install/ai-tools-links.sh). Codex keeps its own global config in codex/.
When adding new shared commands, agents, or skills — add them to claude-code/ only.
Detached (opt-in, per-folder) skills and MCP servers live in claude-code/detached_skills/ and claude-code/detached_mcp/ — attach with skill-attach <name> [dir] / mcp-attach <name> [dir].
Full symlink map, tool-specific configs, and Codex operational rules (1024-char description limit, vendored openai-docs, install via cask only): see claude-code/AGENTS.md.
Never brew uninstall --zap codex — its zap stanza deletes ~/.codex.
Code Style Guidelines
- Theme: Gruvbox Dark Hard. If possible modern Apple-glass Gruvbox
- Fail-fast philosophy: Do NOT add existence checks for dependencies, tools, or paths. If something required is missing, the script should fail loudly. This is intentional — it surfaces setup issues immediately.
- Linting: No linting required - this is a configuration repository (shell scripts, Lua scripts, dotfiles)
Install conventions
The installer is plain zsh, not make. Makefile is a one-line wrapper
(install: ; @./install.sh) kept only so make and CI still work.
install/is the whole installation as a numbered ladder —install/01-macos-defaults.sh…install/15-ci-guarded.sh.ls install/shows first step to last. Steps that are just a wrapper around an existing script elsewhere (defaults, xcode, zsh, dock, iterm, ableton) are one-lineexec zsh "$DOTFILES/…"files, so the ladder stays complete.install.shis a trivial loop:for step in install/[0-9]*.sh→ run in order (numbered━━ [NN/15]framing + per-step timing), abort on the first failure. Each step runs in its own subshell (zsh "$step"), reproducing the old Makefile model. Everything is tee'd to a timestamped logfile under~/.local/state/dotfiles/.lib.sh(no number prefix) is excluded by the glob.- Strict mode: each logic step (03, 05–08, 12, 14, 15) sets
set -euo pipefail, so a failure inside a step surfaces immediately instead of being swallowed. Wrappers justexec; external scripts run as subprocesses soset -edoesn't leak into them. install/lib.shholds full-word path vars (DOTFILES,APP_SUPPORT,CONFIG,CLAUDE_CODE, …) and the helperssection,link,link_all,copy_dir.link <source> <destination>does mkdir-parent +sudo rm -rf+sudo ln -sfvh— thesudois kept from the old Makefile on purpose (some targets are system paths; existing $HOME symlinks may be root-owned from prior runs).link_all <src1> <dst1> <src2> <dst2> …links a flat list of pairs, so a step reads as a scannable table instead of onelinkper line.- Each step starts with
source "${0:a:h}/lib.sh", so it's runnable on its own for debugging (e.g.zsh install/07-config-links.sh). - Adding an app config: add a
"$DOTFILES/<app>/<file>" "<dest>"pair to the rightlink_alltable ininstall/07-config-links.sh(app configs) orinstall/08-ai-tools-links.sh(AI tools). Full paths, quoted — readable, no$(call …). - CI-only skips live in
install/15-ci-guarded.shbehindif [[ -n "$CI" ]](GitHub Actions setsCI=true; this replaced the Makefileifdef CI).
zsh gotcha: unmatched globs
The installer runs under zsh, where an unmatched glob is a fatal error, not a
literal. In a for header it aborts the whole script (even without
set -e); as a command argument it only skips that command. Any loop over
/Applications/Foo* or similar needs setopt null_glob first — see the Rider
loop in install/config-links.sh. This class of bug once took down
make install via ableton/setup-mcp.sh when Ableton was absent.
Default apps: written straight to the LaunchServices plist, no duti
macos/set_default_apps.sh sets default apps by writing LSHandlers entries
directly into com.apple.launchservices.secure.plist (extensions keyed by
LSHandlerContentTag, UTIs by LSHandlerContentType) then lsregister -r.
It does not use duti: on macOS 15+ every duti -s pops a per-type
confirmation dialog (running the whole list = dozens of dialogs) and errors
-50 on any extension with no registered UTI. The direct write has neither
problem, and a user default set this way overrides an app's own Info.plist
claim — e.g. Rider declares .cs/.csproj/.xaml/.sln/.slnx as Editor,
but we send the source files to VSCode and keep only .sln/.slnx on Rider.
Bindings apply after the next login. Full filenames (Brewfile/Makefile/…) have
no by-filename mechanism and are intentionally absent.
Safari is deliberately not configured: its prefs live in a sandboxed container
that defaults cannot write without Full Disk Access (which we don't grant),
and IncludeDevelopMenu is dead since Safari 17. See the comment in
macos/set_defaults.sh.
Adding New Applications/Tools
See docs/app-integration.md for detailed integration guide.
Keyboard Setup
See docs/keyboard-setup.md for complete keyboard customization documentation.
Documentation Structure
- docs/ - Specialized guides that AI can read selectively when needed
docs/commands.md— catalog of customzsh/bin/commands (usable from any shell/tool). Prefer these over inline heredocs.- Reference by plain path in backticks (
`docs/filename.md`) — NEVER via@pathimport syntax:@force-loads the file into every session's context, recursively following the imported file's own@refs
Handoff
State (install refactor). The Makefile install target (298 lines of
$(call link,…) + $(D)/$(H)/$(A) shorthands + SHELL := /bin/zsh -c) was
extracted into plain zsh. Makefile is now a one-line wrapper install: ;
@./install.sh. Logic lives in install.sh (orchestrator / table of contents)
and install/*.sh steps, sharing install/lib.sh (path vars + link /
copy_dir / section). Behaviour is 1:1 with the old Makefile — same order,
same @echo headings (now section), same sudo on links, same ifdef CI
skips (now if [[ -n "$CI" ]] in install/ci-guarded.sh). Verified with
zsh -n on all steps + pre-commit (lint-shell → zsh -n) green. Not run
end-to-end here — the link steps need sudo/TTY; make install on a machine
or the CI macos-install job is the real test.
State. Default-app handling was fully reworked. macos/set_default_apps.sh
no longer uses duti (on macOS 15+ every duti -s pops a per-type confirm
dialog — dozens of them — and errors -50 on UTI-less extensions). It now writes
LSHandlers straight into com.apple.launchservices.secure.plist (extensions
via LSHandlerContentTag, UTIs via LSHandlerContentType) then lsregister -r
— no dialogs, no errors, and a user default written this way overrides an app's
own Info.plist claim. The old set_extension_handlers.sh was folded into it (one
HANDLERS map). Bare filenames (Brewfile/Makefile/…) dropped — macOS has no
by-filename mechanism. Last run: added 0, retargeted 0, unchanged 171, clean.
duti stays installed only for read-only duti -x queries.
Also this session: aoe (Agent of Empires) fully removed — its hooks, config dir, brewfile/cargo entries, Makefile symlink, zap launcher, and all 3 binaries.
Next steps.
- Log out / in, then verify resolution (LaunchServices reloads the plist at
session start):
for e in cs csproj xaml sln slnx go rs vue txt docx pdf mp4 png als; do printf "%-8s -> %s\n" ".$e" "$(duti -x $e | head -1)"; doneExpected:sln/slnx→ Rider; everything else → itsHANDLERSapp.
Open questions.
- If after login
.csstill opens in Rider, the user default did NOT beat Rider's Info.plist Editor claim — escalate (make VSCode declare the type, or strip Rider's claim). Standard LS behavior says the user default wins. - pre-commit + voiceink gotcha: the
vk-json-normalize(jq -S .) clean filter onvoiceink/VoiceInk_Settings_Backup.jsonmakes pre-commit's stash unrestorable when that file is modified-but-unstaged — it silently ROLLS BACK all uncommitted edits. Commit that file first (with--no-verify) or keep it clean before committing anything else. ableton/setup-mcp.shinstalls the upstream remote script, but the machine runs theableton-mcp-extendedfork (~/projects/ableton_setup, pinned in brewfile). Everymakesilently downgrades it. Owner is deciding.- Five taps in
homebrew/minimum_brewfileare untrusted, sobrew cuandbrew autoupdatecurrently refuse to run. Owner is handling this. - Full Disk Access will NOT be granted — don't propose fixes that need it.
- An external process auto-commits with the message
1, sweeping in whatever is in the working tree. Don't leave junk uncommitted, and expect noisy history.
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.

