haacked dotfiles

June 23, 2026 ยท View on GitHub

Your dotfiles are how you personalize your system. These are mine.

They're so personal I copied much of them from https://github.com/holman/dotfiles including the approach to install them.

Install

On a brand-new Mac, run the one-liner. It installs the Xcode Command Line Tools (for git), clones this repo to ~/.dotfiles, and runs script/bootstrap:

curl -fsSL https://raw.githubusercontent.com/haacked/dotfiles/main/install.sh | bash

Or, if you prefer to do it by hand (and git, via the Xcode Command Line Tools, is already installed):

git clone https://github.com/haacked/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
script/bootstrap

Either way, bootstrap symlinks the appropriate files in .dotfiles into your home directory. Everything is configured and tweaked within ~/.dotfiles. The installer points the origin remote at SSH, so add an SSH key to GitHub before you push.

The main file you'll want to change right off the bat is zsh/zshrc.symlink, which sets up a few paths that'll be different on your particular machine.

dot is a simple script that installs some dependencies, sets sane macOS defaults, and so on. Tweak this script, and occasionally run dot from time to time to keep your environment fresh and up to date. You can find this script in bin/.

ZSH

~/.zshrc is managed by this repo via zsh/zshrc.symlink. Running script/bootstrap creates the symlink automatically.

Claude Code

The ai/ directory contains Claude Code configuration: a global CLAUDE.md, subagents, skills, and helper hooks. Run ai/install.sh to symlink them into ~/.claude and install the configured MCP servers. See ai/README.md for details.

Inventory

This repo ships a fair amount of tooling: Claude Code skills and subagents, shell scripts, git helpers, and macOS utilities. The tables below are an organized inventory so you (or a colleague) can find what's useful.

Claude skills

Skills live in ai/skills/ and are installed into ~/.claude/skills/ by ai/install.sh. Each skill is a self-contained directory with a SKILL.md and any supporting scripts.

SkillWhat it does
address-pr-reviewsEvaluate unresolved PR review comments from any reviewer, fix legitimate issues, reply to dismissed ones.
analyze-permissionsAnalyze accumulated Claude Code permissions and suggest smart wildcard patterns.
ci-monitorMonitor CI checks after pushing, distinguish flaky from real failures, auto-fix.
commitCommit staged/unstaged changes with a well-crafted commit message.
create-prCreate or update a GitHub PR with automatic template detection and filling.
goPlan, implement, and iteratively review a task end to end using Claude plus Copilot reviewers.
metabase-prod-queryGuarded workflow for querying PostHog production Metabase via hogli metabase:*.
noteCapture complex technical discoveries into structured, reusable notes.
ops-reportGenerate a 24-hour operational health report for a PostHog service via Grafana and Prometheus.
postmortemWrite incident postmortems using the DERP model (Detection, Escalation, Recovery, Prevention).
resolve-conflictsResolve git conflicts with mergiraf structural merging, lock file handling, stacked PR dedup.
review-fix-cycleOne review, fix, simplify, commit iteration.
sprint-planningBi-weekly sprint planning updates for the Feature Flags Platform team.
standupGenerate standup notes from your recent GitHub PR activity.
supportSupport hero workflow: start ticket investigations, find prior notes, generate weekly highlights.
test-planGenerate a manual test plan checklist focused on scenarios uncovered by existing tests.
triage-issuesIdentify unlabeled GitHub issues that may belong to a specific team.

The squash command lives at ai/commands/squash.md: squash developer commits on the current branch into one while preserving CI snapshot commits.

Claude subagents

Subagents live in ai/agents/ and are installed into ~/.claude/agents/.

AgentWhen to use it
bug-root-cause-analyzerFailing tests, intermittent bugs, or environment-specific defects that need a systematic investigation.
code-reviewerPre-commit correctness, security, and guideline review (use /simplify for readability).
implementation-plannerBreak down complex features into staged technical plans before writing code.
investigatorInvestigate a single operational hypothesis using Grafana, Prometheus, Loki, and PostHog data. Spawn in parallel for multi-hypothesis incident reviews.
note-takerPreserve non-obvious technical discoveries after a long exploration session.
prompt-optimizerRefine system prompts that aren't producing the output you want.
supportCustomer support investigations that need debugging plus documentation.
task-orchestratorDecide which agents to use, and in what order, for a complex task.
triage-feature-flagsIdentify GitHub issues that belong to the Feature Flags team domain. Used by the triage-issues skill.
unit-test-writerWrite comprehensive unit tests for new or untested code, or to set up TDD scaffolding.

Scripts

Scripts live in bin/ and are added to PATH via zsh/zshrc.symlink.

Git and PR workflow

ScriptPurpose
tree-meMinimal git worktree wrapper that organizes worktrees under ~/dev/worktrees/<repo>/<branch> and supports auto-cd and tab completion. See bin/README-tree-me.md.
git-branchesgit branch listing enhanced with associated open PR numbers and URLs.
git-bclean-emptyDelete local branches that are ancestors of the default branch with no upstream and no worktree.
git-bclean-localDelete local branches whose remote tracking branch is gone (post-merge cleanup), removing their worktrees first.
git-delete-othersDelete local branches you didn't create and haven't modified; keeps branches matching your configured prefix.
git-https-to-sshConvert HTTPS remotes to SSH across every repo under a directory (default ~/dev).
convert-to-blobless.shRe-clone an existing repo as a --filter=blob:none blobless partial clone, preserving local branches.
detect-pr.shDetect a PR from a URL, number, or current branch and emit TSV or JSON.
gh-resolve-threadsList and resolve GitHub PR review threads (outdated, all, or by comment ID).
pr-review.shManage your pending (draft) GitHub PR reviews: pending and submit subcommands. Aliased as pr-review / submit-review.
team-prs.shOpen GitHub search for open PRs by author team or review-requested team (defaults to team-feature-flags).

Automated PR review

These orchestrate Claude Code reviews of pull requests. They power the review-all-prs LaunchAgent.

ScriptPurpose
review-all-prs.shFind PRs awaiting your review in a GitHub org using the GraphQL API. Filters out PRs you've already reviewed and sorts by priority: PRs authored by --priority-team members, then flags-scoped titles, then the rest.
run-pr-reviews.shTake a list of PRs and run /review-code against each one in priority order, with per-review timeouts and Claude usage-limit detection.
review-all-prs-service.shManage the review-all-prs macOS LaunchAgent (install, start, stop, logs, run).
recent-reviews.shShow recent PR review activity from session state files.
seed-pr-failures.shRebuild the persistent PR-failure ledger from session history.
copilot-review-loop.shRequest Copilot reviews, fix legitimate issues, reply to and resolve Copilot threads, gather drafted replies to human reviewers for you to post, push, repeat.
review-fix-loop.shRun the /review-fix-cycle skill in a loop with fresh Claude context per iteration.

Disk and system

ScriptPurpose
check-disk-spaceDisk space monitor with warning (85%) and critical (90%) macOS notifications.
disk-cleanupModular cleanup orchestrator (Docker, Homebrew, Node, Python, Rust, Xcode caches).
kube-regionSwitch kubectl context between PostHog environments with AWS SSO integration.
copy-html-to-clipboard.swiftPipe HTML on stdin to the macOS clipboard as rich text.
set-defaults.shApply macOS defaults from macos/set-defaults.sh.
dotRun installers and apply settings; periodic refresh of the dotfiles environment.

Claude Code session helpers

ScriptPurpose
claude-sessionManage tmux sessions for Claude Code (new, attach, list, kill, status).
claude-session-tokensRead token usage from the current Claude Code session JSONL.
token-countCount tokens in a text file using tiktoken (cl100k_base) via uv's inline script deps.

Shell, git, and OS configuration

PathWhat's in it
zsh/zshrc.symlinkInteractive shell: oh-my-zsh, language managers (pyenv, rbenv, nvm, pnpm, direnv), PATH, helpers (listening, killpid).
zsh/zshenv.symlinkAlways-on environment: Homebrew, ~/.local/bin, Cargo.
zsh/zprofile.symlinkLogin shells: .NET tools, OrbStack.
zsh/aliases.zshAliases for disk tooling, PR review, pytest-changes.
zsh/claude-completion.zshZsh tab completion for the claude CLI.
zsh/gt-completion.zshZsh tab completion for Graphite (gt).
zsh/ssh-tmux.zshAuto-attach tmux for SSH sessions.
git/gitconfig.symlinkBase git config (aliases, signing, defaults).
git/gitconfig.aliases.symlinkGit aliases.
git/LaunchAgents/macOS LaunchAgents (including the PR review service).
macos/set-defaults.shmacOS defaults: Finder, Dock, screenshot location, etc.
homebrew/install.shHomebrew bootstrap.

Adopting pieces of this

You don't need to install the whole thing. A few common shapes:

  • Just the Claude skills/subagents: copy individual directories from ai/skills/ or ai/agents/ into your own ~/.claude/skills/ or ~/.claude/agents/. Most are self contained.
  • Just tree-me: copy bin/tree-me onto your PATH and add source <(tree-me shellenv) to your shell rc.
  • Just the PR review scripts: they depend on bin/lib/*.sh helpers; copy bin/lib/ alongside whichever scripts you want.

A handful of skills and scripts are PostHog-specific (metabase-prod-query, ops-report, sprint-planning, kube-region, triage-feature-flags). The rest are general.