This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Personal dotfiles configuration using Dotbot for installation and symlink management. Configures macOS development environment with terminal, shell, keyboard remappings, window management, and editor settings.
make install # Run dotbot install script (./install)
make link # Run dotbot link only (./install --only link)make karabiner # Build karabiner.json from TypeScript
make karabiner-dev # Watch mode with auto-rebuild
# Direct: deno run --allow-env --allow-read --allow-write karabiner/karabiner.tsmake vscode-install # Install extensions from vscode/extensions.txt
make vscode-save # Save current extensions to extensions.txtmake brew # Save Brewfile snapshot + cleanup
make brew-restore # Install Homebrew and restore from Brewfilemake macos # Apply macOS defaults from macos/set-defaults.sh
make claude # Apply Claude Code defaults from claude/set-defaults.sh
make claude-plugins # Sync Claude Code local pluginsTypeScript-based Karabiner-Elements config using Deno and deno_karabiner.
Key files:
karabiner.ts: Main config, builds JSONlib/hyper.ts: Hyper key helpers (hyper(),hyperCmd(),hyperFocusApp())lib/conditions.ts: App-based conditionslib/apps.ts: Application mappingslib/remap.ts: Basic key remapping utilities
Hyper key setup:
- CapsLock →
left_shift + left_control + left_option - CapsLock alone → Escape
- CapsLock+Cmd →
left_shift + left_control + left_option + left_command
Architecture pattern: Export rule builders from lib/, compose in main karabiner.ts using KarabinerComplexModifications class.
Main file: zshrc.zsh (symlinked to ~/.zshrc)
Uses zgenom plugin manager with:
- oh-my-zsh base + plugins
- Powerlevel10k theme
- Custom config:
p10k.customizations.zsh - Aliases:
../aliases/*.aliases.sh(sourced from$DOTFILES/aliases) - Functions:
../functions/*.sh(sourced from$DOTFILES/functions)
Loading order: zgenom plugins → p10k theme → customizations → aliases → functions
Aliases (aliases/): Organized by tool (git, node, zsh, claude, vim)
Functions (functions/): fzf-based utilities, git helpers, Claude commands
git.functions.sh: Git workflow helpersclaude.functions.sh: Claude Code integrationfpr.sh,fyr.sh: fzf PR/year selectorsgl.sh: Enhanced git log
Dotbot handles:
- Submodule init
- Homebrew setup via
macos/setup-homebrew.sh - vim-plug download
- Symlink creation (supports glob patterns, platform conditionals)
- mise activation (version manager for node, pnpm, bun, go)
- Git config via
git/set-gitconfig.sh
Symlink pattern: Uses path: for single files, glob: true for directories. force: true overwrites existing.
Before adding symlinks: Check install.conf.yaml for existing glob patterns that may already cover the path (e.g., claude/* covers all subdirectories).
Terminal multiplexer config using KDL format.
Key files:
config.kdl: Main config (VS Code Dark theme, session persistence, keybinds)layouts/default.kdl: Custom layout with zjstatus plugin for pill-style tab bar
Keybind overrides:
Ctrl+b→ Session mode (was Ctrl+o, conflicts with Claude)Ctrl+.→ Tab mode (was Ctrl+t)Ctrl+y→ zellij-forgot plugin (keybind hints)Ctrl+Space→ room plugin (tab switcher)Alt+;→ Toggle floating panes
Bash script setting macOS preferences via defaults write. Categories:
- System (show hidden folders, keyboard backlight)
- Keyboard/Mouse (key repeat, smart quotes off, tap-to-click)
- Finder
- Dock
- Safari
Run after OS install or updates.
TypeScript hooks in claude/hooks/ use Deno's built-in test runner:
deno test claude/hooks/git-guardrails.test.ts
deno test claude/hooks/pure-md-prompt-rewriter.test.tsKarabiner: Deno with no deps → single karabiner.json output
Claude hooks: Deno with TypeScript → no compilation needed (executed directly)