franky47/dotfiles
README.md
dotfiles#
Cross-machine dotfile management with shared configs and per-machine overrides.
Skills#
Agent skills live in dot-claude/skills/ (shared) and local/<machine>/claude/skills/ (per-machine), and are symlinked to .agents for cross-agent use.
Original sources attributed, but skills have been adapted for my usage.
| Skill | What it does | Original Source |
|---|---|---|
audit-github-actions | Audit GitHub Actions for supply-chain / CI-CD vulns (Shai-Hulud-class worms, expression injection, token exfil) | ✏️ |
prose | Write human-readable prose: PRs, docs, emails, memos | ✏️ |
html | Render a document, diagram, or report as HTML for humans | ✏️ |
show-me | Understand things visually rather than a wall of text | Dex Horthy |
walk-me-through | Guide you through a repo, PR, or diff one step at a time | ✏️ |
issue | Research and word a good GitHub issue (never posts it) | ✏️ |
github-stars-lists | Scrape repos from your GitHub Stars lists (no API for them) | ✏️ |
research | Research a question from primary sources and save cited findings in the repo | Matt Pocock |
taildrop | Send files to Tailscale devices via Taildrop | ✏️ |
openusage | Read AI plan limits and pacing, run tasks until the pace line or reset | ✏️ |
plannotator-review | Review a worktree or pull request in Plannotator | backnotprop/plannotator v0.27.3 |
plannotator-annotate | Annotate a file, web page, or folder in Plannotator | backnotprop/plannotator v0.27.3 |
plannotator-last | Annotate the last assistant response in Plannotator | backnotprop/plannotator v0.27.3 |
work | Pick one open beans task and implement it end-to-end | ✏️ |
premortem | Assume the plan already failed, work backward to find why (Gary Klein) | Ohle Lehmann |
brainstorm | Interview you relentlessly to stress-test a plan or design | Matt Pocock |
wayfinder | Map out plans for huge chunks of work | Matt Pocock |
frontend-design | Build distinctive, production-grade UIs that dodge generic AI aesthetics | Anthropic |
handoff | Compact the conversation into a handoff doc for a fresh agent | Matt Pocock |
docs | Write short docs built around what readers need to do | Alem Tuzlak |
no-ai-slop | Edit drafts or flag AI writing patterns while keeping the author's voice | Peter Yang |
unslop | Cut AI tells from writing and keep a direct human voice | Lauren Tan (@poteto) |
improve | Survey a codebase read-only and produce prioritized handoff plans for other agents | shadcn |
improve-codebase-architecture | Surface deep-module refactors (Ousterhout) for testability | Matt Pocock |
prd-to-issues | Split a PRD into independently-grabbable beans issues (tracer bullets) | Matt Pocock |
prototype | Prototype ideas for UI & logic | Matt Pocock |
repro | Build a minimal, self-contained bug reproduction | Matt Pocock |
retro | Review a coding session and suggest changes to the agent environment | Matt Pocock |
tdd | Red-green-refactor with behavior-focused integration tests | Matt Pocock |
typescript-advanced-types | Generics, conditional/mapped/template-literal types, utility types | Matt Pocock |
ubiquitous-language | Extract a DDD glossary from the conversation | Matt Pocock |
write-a-prd | Create a PRD via interview, codebase exploration, module design | Matt Pocock |
writing-for-agents | Write skills, CLAUDE.md and docs that agents follow the same way each run | Matt Pocock |
Hermes plugins#
Shared Hermes plugins live in hermes/plugins/. When ~/.hermes already exists, install.sh links and enables them for the default profile and every existing named profile. Existing plugin directories are preserved beside the new symlink. Re-run the installer after creating a profile, then restart the Hermes gateway.
thread-done: adds/doneto Discord threads.
Firefox#
Firefox styles restore the flat dark colors and remove the close-button border in collapsed vertical tabs. install.sh uses uv to find existing default-release profiles on macOS and Linux, then links the CSS files from firefox/chrome/. It keeps other profile settings and backs up replaced files locally.
Restart Firefox after installation or CSS edits. Run the installer again after creating a profile or moving this repo.
Conventions#
- Shared vs local: Top-level directories hold configs shared across all machines.
local/<machine>/mirrors the same structure for machine-specific overrides. - Numbered files, glob-sourced: Sourceable configs (zsh) are loaded alphabetically. Numeric prefixes (00-, 10-, 20-, ...) control load order with gaps of 10 for future insertions.
- Stow for symlinking:
dot-prefixed directories are symlinked into~/by stow's--dotfilesflag (e.g.,dot-claude/becomes~/.claude/). Tools with their own layering (like Claude Code's user/project/local scopes) are stowed directly. Project-local Pi runtime directories (.pi/and.pi-subagents/) are excluded through.stow-local-ignore; only the manageddot-pi/tree is linked into the home directory.
<tool>/ # Shared sourceable configs (all machines)
dot-<tool>/ # Shared configs, stow-managed (symlinked into ~/.<tool>/)
local/<machine>/<tool>/ # Machine-specific overrides
Structure#
.zshrc # Loader: zsh/ then local/<machine>/zsh/
.zshenv # Loader: zshenv/ then local/<machine>/zshenv/
.zprofile # Login shell: Docker PATH, Homebrew, fnm
.stow-local-ignore # Excludes internal dirs from stow
.machine-name # Machine identifier (gitignored, per-clone)
install.sh # Install script: stow + link
firefox/ # Firefox CSS, profile installer, and tests (not stowed)
zsh/ # Shared interactive shell modules
00-environment.zsh # PATH, EDITOR
10-options.zsh # Shell options, autoloads
20-completion.zsh # Completion system
30-history.zsh # History config, search keybindings
40-aliases.zsh # General system aliases
41-javascript.zsh # fnm, bun, pnpm (env + aliases)
42-git.zsh # Git aliases
50-functions.zsh # Utility functions, crypto, network
51-docker.zsh # Docker functions and aliases
60-ai.zsh # AI tool functions and aliases
90-prompt.zsh # Prompt configuration
zshenv/ # Shared all-shell modules
00-cargo.zsh # Rust/Cargo environment
dot-claude/ # Stow-managed → ~/.claude/
CLAUDE.md # Global instructions
settings.json # Permissions, hooks, plugins, preferences
statusline-command.sh
hooks/
block-background-agent.sh # Blocks background Agent calls in T3 (use delegate_task)
block-dangerous-git.sh
agents/
deep-research.md
skills/ # Shared skills
brainstorm/
tdd/
...
local/<machine>/zsh/ # Machine-specific shell overrides
local/<machine>/zshenv/ # Machine-specific env overrides
local/<machine>/claude/skills/ # Machine-specific Claude skills
Install#
If this is ran by a coding agent like Claude code, first ask the user what the name of this machine should be.
Prerequisites: stow >= 2.4, zsh.
brew install stow # macOS
# or build stow 2.4+ from source on Linux (Debian ships 2.3.x which has --dotfiles bugs)
git clone <repo-url> ~/dotfiles
echo "<machine>" > ~/dotfiles/.machine-name
~/dotfiles/install.sh
The install script:
- Runs
stow --dotfiles --restowto symlink.zshrc,.zshenv,.zprofile, anddot-claude/contents into~ - Mirrors shared skills into
~/.agents/skills/ - Symlinks machine-local skills into
~/.claude/skills/and~/.agents/skills/ - Links Firefox styles into existing
default-releaseprofiles whenuvis available
Re-run install.sh after any changes. Stow's --restow handles re-runs cleanly.
Pi extensions#
User-level Pi extensions are stored in dot-pi/agent/extensions/. The statusline.ts extension shows the session ID, repository state, context usage, edit line counts, token and cost totals, and the active model's reasoning level while preserving statuses from other extensions. Optional rows are omitted when empty.
The inline-skills/ extension lets an idle TUI prompt refer to skills naturally, such as let's work on this with /tdd. It keeps the prompt unchanged and adds changed skill bodies as separate user-authority context. Typing an eligible / opens skill completion. Prompt-start commands remain under Pi's normal handling; streaming queue parity is deferred until Pi exposes message identity to extensions.
It builds on ideas from @tifan/pi-inline-skills, with stricter parsing, body-change tracking, and compaction handling.
Image paste on macOS#
Cmd+V keeps normal text and file-path paste. For an image-only clipboard:
- Ghostty's
performable:super+vbinding forwards Cmd+V to Pi when it cannot paste text.dot-pi/agent/keybindings.jsonbinds it to Pi's clipboard action and keeps Ctrl+V available. - VS Code sends an empty bracketed paste. The
inline-skillseditor passes that event to Pi's clipboard handler. No VS Code key mapping is needed. - cmux saves the image and pastes its file path as usual.
Pi saves clipboard images to temporary files and inserts their paths. If the terminal finds text or a file path on the clipboard, it pastes that instead, even if an image is also present. The empty-paste fallback needs the inline-skills editor; it does not run if another extension owns the editor. These handlers read the clipboard on the machine running Pi, not a remote client's clipboard.
After installing the config, reload Ghostty's configuration and run /reload in Pi. Check image-only, plain-text, and multiline-text paste in Pi, and text paste at a shell prompt. Automatic inline / completion stays enabled.
Other extensions#
The private-session/ extension adds user-only /private and /delete-session commands. /private stops future local transcript persistence without removing existing history; /delete-session first makes the process private, then explicitly removes the current transcript (trash first, unlink fallback). A persistent 🕵️ footer indicator marks non-persisted sessions, including Pi's built-in ephemeral mode.
The update.ts extension adds /update to update Pi and installed Pi packages in one run with pi update --all. After success, it shows the result before reloading the configuration once to load the extensions. Restart Pi to use a new Pi version. If an update fails, resolve the error and run /update again; some updates may have completed.
The π wrapper in zsh/60-ai.zsh launches Pi with PI_TASKS=off, keeping pi-tasks records in memory. @tintinweb/pi-subagents uses in-memory subagent sessions by default; dot-pi/agent/subagents.json also disables output transcripts and scheduled jobs so it does not write run records to disk.
Third-party packages are declared in dot-pi/agent/settings.json: @tintinweb/pi-subagents, pi-web-access, pi-add-dir, @tintinweb/pi-tasks, pi-btw, and @diegopetrucci/pi-openai-fast.
Plannotator#
Install Plannotator CLI 0.27.3 separately before using these files. Check the installed version with plannotator --version.
Claude Code and shared agents load the three Plannotator skills from dot-claude/skills/. dot-plannotator/config.json keeps web page annotation direct, disables external share links, and tells agents to implement validated review feedback without waiting for another confirmation.
Use claude-tailnet or pi-tailnet when an iPhone on the Tailnet needs access. These launchers bind Plannotator to ports 19432 through 19463 on all network interfaces. Remote mode has no HTTP login. claude-tailnet also skips Claude Code permission prompts, matching the normal c command. Use it only on trusted networks, keep the host firewall on, and limit Tailnet access with ACLs.
Start a review, then find its port:
plannotator sessions
Replace localhost with the development host's Tailnet DNS name and open the result on the iPhone. End the review when done, then clear stale sessions:
plannotator sessions --clean
Claude Code settings#
Claude Code has a built-in scope system (user → project → local). Stow symlinks dot-claude/ into ~/.claude/ as the user scope. Per-project overrides use Claude's native .claude/settings.json (shared) and .claude/settings.local.json (personal, gitignored) — no custom merge needed.
How the zsh loader works#
Both .zshrc and .zshenv resolve their own real path (following symlinks), then glob-source shared files first and machine-local files second:
DOTFILES=${0:A:h}
MACHINE_NAME=${$(cat ${DOTFILES}/.machine-name 2>/dev/null):-$(hostname -s)}
for f in ${DOTFILES}/zsh/*.zsh(N); do source "$f"; done
for f in ${DOTFILES}/local/${MACHINE_NAME}/zsh/*.zsh(N); do source "$f"; done
${0:A:h}resolves the directory of the script, following symlinks. The repo can be checked out anywhere.(N)is the zsh nullglob qualifier — no error if the directory or files don't exist.
Shell startup files#
.zshenvis sourced by every zsh invocation (interactive, non-interactive, login, non-login). Usezshenv/for environment variables that non-interactive scripts may need..zprofileis sourced by login shells, including non-interactivezsh -lcagent commands. It adds Docker Desktop's CLI directory, initializes Homebrew when available, and selects Node with fnm when installed..zshrcis sourced only by interactive shells. Usezsh/for everything else.
Both .zprofile and zsh/41-javascript.zsh enable fnm's --use-on-cd with recursive version-file lookup. Shells select Node from the nearest .node-version or .nvmrc in the current directory or its parents, and update it when you change directories.
If ~/.zprofile already exists as a regular file, review it for secrets before installing. The installer's Stow adoption can copy its contents into the repo. Keep credentials in the gitignored secrets.* files described below.
Machine identification#
Read from .machine-name in the repo root, falling back to hostname -s.
echo "<machine>" > /path/to/dotfiles/.machine-name
This file is gitignored (per-clone). The hostname fallback usually works, but can change due to network adapter conflicts — the file provides a stable override.
Current machines: echo (Ubuntu), m4x (macOS), pi3 (Linux).
Machine-local overrides#
- zsh: local
.zshfiles load after shared, overriding aliases, functions, exports - Claude skills: local skills appear alongside shared skills in
~/.claude/skills/
Secrets#
Files matching **/secrets.* are gitignored. Store API keys and credentials in machine-local files:
local/m4x/zsh/secrets.zsh # export SUPER_SECRET_API_KEY="..."
Adding a new tool#
- For stow-managed configs: create
dot-<tool>/with files mirroring~/.<tool>/ - For sourceable configs: create
<tool>/with numbered files - For machine-specific overrides: add files under
local/<machine>/<tool>/ - Update
.stow-local-ignoreif adding internal-only directories