I wrote this post with AI (edited) based on the output of a Claude Code session where I prompted Claude: “my shell is starting slow. help me fix it”.
I noticed that Claude Code was slow to create a git commit, taking ~5 seconds to run git status, git diff --stat, git commit. These commands should be fast. The culprit was slow shell startup time. My non-interactive zsh took 1 second to start. Interactive was 1.9 seconds. That’s before any command runs. I asked Claude Code to analyze my shell startup. It found that nvm, pyenv, yarn, and brew shell inits were taking ~2 seconds with every shell startup.