zsh-path-skill
Skill0 starsChanged 9 months agoMITView on GitHub
Manage and troubleshoot PATH configuration in zsh. Use when adding tools to PATH (bun, nvm, Python venv, cargo, go), diagnosing "command not found" errors, validating PATH entries, or organizing shell configuration in .zshrc and .zshrc.local files.
In this repository97 other files it gives its agents.
- skills/obsidian-second-brain-skill/templates/CLAUDE.mdCLAUDE.md
- 1passwordSkill
- alz-accelerator-skillSkill
- ArgocdAppInstallSkill
- argocd-applicationset-skillSkill
- ArgocdClusterBootstrappingSkill
- argocd-cluster-bootstrappingSkill
- ArgoCdCommandSkill
- ArgocdImageUpdaterSkill
- argocd-image-updaterSkill
- ArgoCDReviewSkill
- argocd-cliSkill
- ArgoRolloutsSkill
- atuinSkill
- az-aks-agentSkill
- aztfexport-skillSkill
- azure-ad-ssoSkill
- azure-devops-skillSkill
- azure-devops-wikiSkill
- AzureFinOpsSkill
- BmadOrchestrateSkill
- cloudflare-dnsSkill
- commit-skillSkill
- consulting-designSkill
- Context7Skill
- defectdojoSkill
- dependency-track-skillSkill
- direnvSkill
- external-dnsSkill
- external-urlsSkill
- GithubPagesSkill
- gitops-principles-skillSkill
- git-advanced-workflowsSkill
- git-advanced-workflowsSkill
- git-worktreeSkill
- grafana-skillSkill
- holmesgpt-skillSkill
- Iterm2Skill
- json-canvasSkill
- justfile-skillSkill
- k8s-clustersSkill
- k8s-timezone-configSkill
- kargo-skillSkill
- keyvault-csi-driverSkill
- knativeSkill
- lokiSkill
- looking-up-docsSkill
- macos-cleanerSkill
- macos-setupSkill
- managing-infraSkill
- markitdown-skillSkill
- merge-and-cleanup-skillSkill
- mimirSkill
- mkdocsSkill
- neovimSkill
- NotebookLMSkill
- obsidian-basesSkill
- obsidian-markdownSkill
- obsidian-master-skillSkill
- obsidian-nvimSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when:
- Distinctive: line 241
After making PATH changes:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
Zsh PATH Management Skill
This skill provides comprehensive guidance for managing PATH environment variables in zsh, including troubleshooting missing commands, adding new tools, and organizing shell configuration.
When to Use This Skill
Use this skill when:
- Getting "command not found" errors for installed tools
- Adding new tools to PATH (bun, nvm, cargo, go, Python venv, etc.)
- Validating and auditing current PATH entries
- Organizing PATH configuration between .zshrc and .zshrc.local
- Troubleshooting shell startup issues related to PATH
- Setting up version managers (nvm, pyenv, rbenv)
Diagnostic Commands
Check Current PATH
# List all PATH entries
echo $PATH | tr ':' '\n'
# Check if specific command is in PATH
which bun 2>/dev/null || echo "bun not found in PATH"
# Find where a command is installed
command -v node
type -a pythonValidate PATH Entries
# Check for broken/non-existent PATH entries
echo $PATH | tr ':' '\n' | while read p; do
[[ -d "$p" ]] || echo "MISSING: $p"
done
# Check for duplicate PATH entries
echo $PATH | tr ':' '\n' | sort | uniq -dCommon Tool PATH Configurations
Bun (JavaScript runtime)
# Add to .zshrc
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"Default location: ~/.bun/bin/bun
NVM (Node Version Manager)
# Add to .zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"Default location: ~/.nvm/
Note: NVM is a shell function, not a binary. It modifies PATH dynamically to point to the active Node version.
Python Virtual Environment
# Add to .zshrc for global tools venv
export PATH="$HOME/.venv/tools3/bin:$PATH"
# For pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"Rust/Cargo
# Add to .zshrc
export PATH="$HOME/.cargo/bin:$PATH"Go
# Add to .zshrc
export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"Homebrew (macOS)
# Intel Mac
export PATH="/usr/local/bin:$PATH"
# Apple Silicon Mac
export PATH="/opt/homebrew/bin:$PATH"
eval "$(/opt/homebrew/bin/brew shellenv)"Local bin directories
# User-local binaries
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/bin:$PATH"File Organization Best Practices
.zshrc (Team/Shared Configuration)
Keep in .zshrc:
- Oh My Zsh configuration
- Common team aliases
- Standard PATH additions (homebrew, local bin)
- Plugin configuration
# ===== ZSH-TOOL MANAGED SECTION BEGIN =====
# Team-wide PATH modifications
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/bin:$PATH"
# Bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# ===== ZSH-TOOL MANAGED SECTION END =====
# Load local customizations
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local.zshrc.local (Personal/Machine-Specific)
Keep in .zshrc.local:
- Machine-specific PATH entries
- Personal tool configurations
- Experimental settings
- Integrations that may override keybindings
# Machine-specific tools
export PATH="/opt/custom-tool/bin:$PATH"
# Personal integrations
if command -v atuin >/dev/null 2>&1; then
eval "$(atuin init zsh)"
fiPATH Order Matters
PATH is searched left-to-right. First match wins.
# This order means ~/.local/bin takes priority over system bins
export PATH="$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin"Recommended PATH Order
- Project-specific bins (added by direnv)
- User local bins (
~/.local/bin,~/bin) - Language version managers (nvm, pyenv, rbenv)
- Package managers (homebrew, cargo)
- System paths (
/usr/local/bin,/usr/bin)
Troubleshooting
Command Not Found After Installation
# 1. Find where tool was installed
ls -la ~/.bun/bin/bun 2>/dev/null
ls -la ~/.cargo/bin/rustc 2>/dev/null
ls -la ~/.nvm/versions/node/*/bin/node 2>/dev/null
# 2. Check if PATH includes the directory
echo $PATH | tr ':' '\n' | grep -E "(bun|cargo|nvm)"
# 3. Add missing PATH entry to .zshrc
# 4. Reload shell
source ~/.zshrc
# or
exec $SHELLPATH Changes Not Taking Effect
# Check which file sets the variable
grep -r "export PATH" ~/.zshrc ~/.zshrc.local ~/.zprofile 2>/dev/null
# Source the correct file
source ~/.zshrc
# Or start fresh shell
exec $SHELLStartup Hook Errors
Common causes:
- Missing PATH entries for tools used in hooks
- Broken references to non-existent directories
- Version managers not finding expected versions
# Debug startup
zsh -x 2>&1 | head -100
# Check for errors in specific config
bash -n ~/.zshrcDuplicate PATH Entries
# Remove duplicates (add to .zshrc)
typeset -U PATH pathVerification Commands
After making PATH changes:
# Reload configuration
source ~/.zshrc
# Verify tool is accessible
which bun && bun --version
which node && node --version
command -v nvm && nvm --version
# Verify PATH includes new entries
echo $PATH | tr ':' '\n' | grep -E "(bun|nvm|venv)"Quick Reference
| Tool | PATH Entry | Check Command |
| bun | $HOME/.bun/bin | bun --version |
| nvm | $NVM_DIR/versions/node/*/bin | nvm --version |
| cargo | $HOME/.cargo/bin | cargo --version |
| go | $GOPATH/bin | go version |
| pyenv | $PYENV_ROOT/bin | pyenv --version |
| brew (ARM) | /opt/homebrew/bin | brew --version |
| brew (Intel) | /usr/local/bin | brew --version |
Common Patterns
Conditional PATH Addition
# Only add if directory exists
[[ -d "$HOME/.bun/bin" ]] && export PATH="$HOME/.bun/bin:$PATH"
# Only add if command not already available
command -v bun >/dev/null || export PATH="$HOME/.bun/bin:$PATH"Lazy Loading for Faster Startup
# Lazy load nvm (faster shell startup)
lazy_load_nvm() {
unset -f nvm node npm npx
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
}
nvm() { lazy_load_nvm && nvm "$@"; }
node() { lazy_load_nvm && node "$@"; }
npm() { lazy_load_nvm && npm "$@"; }
npx() { lazy_load_nvm && npx "$@"; }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.

