dotfiles / zsh
CLAUDE.md78 starsChanged 4 months agoMITView on GitHub
This is a zsh dotfiles configuration system with a modular architecture centered around performance optimization and lazy loading. The configuration uses Oh-My-Zsh as the base framework with custom plugin management. The configuration implements a sophisticated 3-tier plugin loading system: Configuration is split into focused modules in modules/: Core Modules: Function Modules (split for maintainability): The configuration includes several performance features: Key environment variables set in zprofile.symlink:
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 133
Use timezsh to benchmark shell startup performance
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.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
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Zsh Configuration Architecture
This is a zsh dotfiles configuration system with a modular architecture centered around performance optimization and lazy loading. The configuration uses Oh-My-Zsh as the base framework with custom plugin management.
Core Structure
- Main config:
zshrc.symlink- Entry point with performance-optimized plugin loading - Modules:
modules/- Modular configuration files loaded on demand - Functions:
functions.zsh- Custom function definitions - Symlinks: Files ending in
.symlinkare designed to be symlinked to~/.zsh*
Plugin Loading Strategy
The configuration implements a sophisticated 3-tier plugin loading system:
- EAGER_PLUGINS: Core plugins loaded immediately (git, zsh-lazyload, fast-syntax-highlighting)
- PROMPT_PLUGINS: Loaded on first prompt display (zsh-autosuggestions)
- KEYPRESS_PLUGINS: Loaded on first keypress (zsh-vi-mode, fzf-tab, zsh-autopair)
- DEFERRED_PLUGINS: Loaded in background after shell start (colored-man-pages, copyfile, etc.)
Module System
Configuration is split into focused modules in modules/:
Core Modules:
alias.zsh: Command aliases and shortcutsfzf.zsh: FZF fuzzy finder configurationnote_related.zsh: Note-taking and documentation functions
Function Modules (split for maintainability):
fn_navigation.zsh: Navigation & file managers (ya, fcd, mkcd, up, gitop)fn_git.zsh: Git workflows (zgit, ygit, dp, dotrelease, gist)fn_fzf.zsh: FZF-related functions (fzf-pre, rgnv, vg, neovim_fzf)fn_utils.zsh: Utilities (notify, timezsh, topdf, ex, swap)fn_dev.zsh: Development tools (chrome-debug, brew-switch, netlify_pub)fn_notes.zsh: Note-taking (hh, study, dia, drafts, anki)fn_media.zsh: Media processing (yt-mp3, joinmp4, convert_mp4_to_gif)fn_macos.zsh: macOS-only functions (unlock, unblock, ignoredropbox*)fn_cookbook.zsh: Safety/audit/perf/enrichment toolkit (new-script, confirm, dryrun, dotdoctor, brewaudit, pathaudit, zbench, bench, zmodtime, zprofile, gf, fkill, fns, workon)
Common Development Commands
Zsh Configuration Management
zshconfig- Edit main zsh configurationreload- Reload shell configurationtimezsh- Benchmark shell startup time
Navigation and File Management
ya- Yazi file manager with directory changingfcd- Fuzzy find and change directorymkcd <dir>- Create and change to directorycdf- Fuzzy find directory and cd
Development Tools
vf- Fuzzy find and edit files with nvimgitop- Navigate to git repository rootdp- Commit and push dotfiles with AI-generated commit messagezgit- Add, commit with AI, and push in one command
Note Taking and Documentation
hh- Search and edit markdown files in Dropboxstudy- Navigate medical documentationdia- Create/edit daily diary entriesrgnv- Ripgrep search with nvim opening
Utilities
unlock- Remove macOS app quarantineremind <text> <date>- Add system reminderstopdf <file>- Convert documents to PDFya- Yazi file manager integration
Performance Optimizations
The configuration includes several performance features:
Cached Path Checking
- Uses
_cached_path_check()to cache expensive directory existence checks - Caches results in
$ZSH_CACHE_DIR/.path_cache
Async Loading
- Completions loaded asynchronously with
_load_completions_async() - Deferred initialization for heavy tools like forgit
- Background loading of plugin systems
Compilation
- Automatic compilation of completion dumps to
.zwcfiles - Lazy compilation triggered only when needed
Environment Variables
Key environment variables set in zprofile.symlink:
DOTFILES: Path to dotfiles directoryEDITOR/VISUAL: Set to nvimPIPX_DEFAULT_PYTHON: Fixed Python version for pipx- Various PATH additions for tools and scripts
Function Ecosystem
The configuration includes 100+ custom functions covering:
- Git workflow automation (
zgit,ygit,gitacp) - File management (
ya,fcd,mkcd) - Note-taking (
hh,study,dia) - Media processing (
yt-mp3,convert_mp4_to_gif) - Development shortcuts (
vf,gitop) - System utilities (
unlock,remind)
Shell Integration
- Tmux: Auto-starts tmux in WezTerm
- FZF: Configured with custom colors and fd integration
- Powerlevel10k: Theme with instant prompt for fast startup
- Atuin: History search integration (deferred loading)
- Python venv: Auto-activation of
.venvif present
Testing and Maintenance
- Use
timezshto benchmark shell startup performance - Debug with
ZSH_DEBUGRC=1environment variable to enable zprof - Plugin loading errors are handled gracefully with warning messages
- Failed plugins don't break the shell startup process
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- claude.symlink/CLAUDE.mdCLAUDE.md
- hammerspoon.symlink/CLAUDE.mdCLAUDE.md
- pyscripts.symlink/CLAUDE.mdCLAUDE.md
- shellscripts/CLAUDE.mdCLAUDE.md
- start/CLAUDE.mdCLAUDE.md
- tmux/CLAUDE.mdCLAUDE.md
- housekeepingSkill
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.

