Skip to content
Source
Sign inSign up
franky47/dotfiles

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.

SkillWhat it doesOriginal Source
audit-github-actionsAudit GitHub Actions for supply-chain / CI-CD vulns (Shai-Hulud-class worms, expression injection, token exfil)✏️
proseWrite human-readable prose: PRs, docs, emails, memos✏️
htmlRender a document, diagram, or report as HTML for humans✏️
show-meUnderstand things visually rather than a wall of textDex Horthy
walk-me-throughGuide you through a repo, PR, or diff one step at a time✏️
issueResearch and word a good GitHub issue (never posts it)✏️
github-stars-listsScrape repos from your GitHub Stars lists (no API for them)✏️
researchResearch a question from primary sources and save cited findings in the repoMatt Pocock
taildropSend files to Tailscale devices via Taildrop✏️
openusageRead AI plan limits and pacing, run tasks until the pace line or reset✏️
plannotator-reviewReview a worktree or pull request in Plannotatorbacknotprop/plannotator v0.27.3
plannotator-annotateAnnotate a file, web page, or folder in Plannotatorbacknotprop/plannotator v0.27.3
plannotator-lastAnnotate the last assistant response in Plannotatorbacknotprop/plannotator v0.27.3
workPick one open beans task and implement it end-to-end✏️
premortemAssume the plan already failed, work backward to find why (Gary Klein)Ohle Lehmann
brainstormInterview you relentlessly to stress-test a plan or designMatt Pocock
wayfinderMap out plans for huge chunks of workMatt Pocock
frontend-designBuild distinctive, production-grade UIs that dodge generic AI aestheticsAnthropic
handoffCompact the conversation into a handoff doc for a fresh agentMatt Pocock
docsWrite short docs built around what readers need to doAlem Tuzlak
no-ai-slopEdit drafts or flag AI writing patterns while keeping the author's voicePeter Yang
unslopCut AI tells from writing and keep a direct human voiceLauren Tan (@poteto)
improveSurvey a codebase read-only and produce prioritized handoff plans for other agentsshadcn
improve-codebase-architectureSurface deep-module refactors (Ousterhout) for testabilityMatt Pocock
prd-to-issuesSplit a PRD into independently-grabbable beans issues (tracer bullets)Matt Pocock
prototypePrototype ideas for UI & logicMatt Pocock
reproBuild a minimal, self-contained bug reproductionMatt Pocock
retroReview a coding session and suggest changes to the agent environmentMatt Pocock
tddRed-green-refactor with behavior-focused integration testsMatt Pocock
typescript-advanced-typesGenerics, conditional/mapped/template-literal types, utility typesMatt Pocock
ubiquitous-languageExtract a DDD glossary from the conversationMatt Pocock
write-a-prdCreate a PRD via interview, codebase exploration, module designMatt Pocock
writing-for-agentsWrite skills, CLAUDE.md and docs that agents follow the same way each runMatt 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 /done to 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

  1. Shared vs local: Top-level directories hold configs shared across all machines. local/<machine>/ mirrors the same structure for machine-specific overrides.
  2. 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.
  3. Stow for symlinking: dot- prefixed directories are symlinked into ~/ by stow's --dotfiles flag (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 managed dot-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:

  1. Runs stow --dotfiles --restow to symlink .zshrc, .zshenv, .zprofile, and dot-claude/ contents into ~
  2. Mirrors shared skills into ~/.agents/skills/
  3. Symlinks machine-local skills into ~/.claude/skills/ and ~/.agents/skills/
  4. Links Firefox styles into existing default-release profiles when uv is 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+v binding forwards Cmd+V to Pi when it cannot paste text. dot-pi/agent/keybindings.json binds it to Pi's clipboard action and keeps Ctrl+V available.
  • VS Code sends an empty bracketed paste. The inline-skills editor 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

  • .zshenv is sourced by every zsh invocation (interactive, non-interactive, login, non-login). Use zshenv/ for environment variables that non-interactive scripts may need.
  • .zprofile is sourced by login shells, including non-interactive zsh -lc agent commands. It adds Docker Desktop's CLI directory, initializes Homebrew when available, and selects Node with fnm when installed.
  • .zshrc is sourced only by interactive shells. Use zsh/ 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 .zsh files 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

  1. For stow-managed configs: create dot-<tool>/ with files mirroring ~/.<tool>/
  2. For sourceable configs: create <tool>/ with numbered files
  3. For machine-specific overrides: add files under local/<machine>/<tool>/
  4. Update .stow-local-ignore if adding internal-only directories