Zsh Config

Document and validate Zsh dotfiles configuration across macOS, Linux, and MSYS.

Updated Feb 24, 2013
One-click install
npx skills add https://github.com/ysano/dotfiles --skill zsh-config-ysano
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Zsh Config
Source: https://github.com/ysano/dotfiles/tree/main/.claude/skills/zsh-config
Command: npx skills add https://github.com/ysano/dotfiles --skill zsh-config-ysano

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, timeout, and includes scripts (resource) components.

What problem does it solve?

Provides architecture knowledge and modification guidelines for the dotfiles Zsh configuration, covering dual-stage loading, plugin management, and OS-aware behavior to help users safely modify their shell environment.

Core Features & Use Cases

  • Architecture: Dual-stage loading with .zprofile (login) and .zshrc (interactive) to organize startup tasks and environment setup.
  • Plugin & tooling: Zinit plugin manager with modular setup and safe-guard patterns (has_command) to gracefully degrade when tools are unavailable.
  • PATH safety: safe_path_prepend/safe_path_append usage to build a robust PATH across macOS, Linux, and MSYS environments.
  • OS-specific aliases: OS-tailored aliases files and load guards to ensure correct behavior per platform, plus cross-platform checks.
  • Validation tooling: scripts/validate.sh, scripts/cross_platform_check.sh, and scripts/benchmark.sh to verify syntax, cross-platform behavior, and startup performance.
  • Large codebase awareness: git-worktree.zsh and associated tests are documented to avoid excessive reads on large files.

Quick Start

Start a login shell to load the Zsh config (zsh -l) and run the validation scripts: bash .claude/skills/zsh-config/scripts/validate.sh

Frequently Asked Questions about Zsh Config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize Zsh dotfiles to handle both login and interactive shell loading?

Build a robust PATH across macOS, Linux, and MSYS environments using safe_path_prepend and safe_path_append functions. These helpers prevent duplicate entries and ensure correct path ordering without overwriting existing system paths.

How can I manage Zsh plugins safely so the shell still works if a tool is missing?

Run validation scripts like bash .claude/skills/zsh-config/scripts/validate.sh and scripts/cross_platform_check.sh. These scripts verify Zsh syntax and test OS-specific alias behavior across macOS, Linux, and MSYS environments.

How do I benchmark Zsh startup time to find slow plugins or configuration?

Benchmark Zsh startup time using the included scripts/benchmark.sh script, which relies on python3 and timeout for cross-platform measurement. This identifies slow-loading plugins and configuration bottlenecks in your dotfiles.

What is the best way to configure OS-specific aliases in Zsh for macOS, Linux, and MSYS?

The Zsh Config Skill automates and documents comprehensive Zsh configuration to guide safe modifications of dotfiles. It covers dual-stage loading, plugin management, and OS-aware behavior to help users safely modify their shell environment.