zsh-done-assertion-word-splitting

Diagnose zsh shell verification blocks failing due to missing word splitting and PATH clobbering.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill zsh-done-assertion-word-splitting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zsh-done-assertion-word-splitting
Source: https://github.com/cajias/claude-skills/tree/main/plugins/testing/skills/zsh-done-assertion-word-splitting
Command: npx skills add https://github.com/cajias/claude-skills --skill zsh-done-assertion-word-splitting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose shell verification blocks that behave correctly in bash but fail on macOS zsh, especially when path checks report everything missing or commands suddenly stop working.

Core Features & Use Cases

  • Word-splitting diagnosis: Explains why unquoted variable iteration behaves differently in zsh versus bash.
  • PATH clobber prevention: Warns against using a lowercase path variable that can break command lookup in zsh.
  • Portable shell guidance: Recommends bash forcing, deliberate quoting, and explicit IFS handling for reliable verification scripts.
  • Use Case: Use it when a done-assertion or file-resolution loop returns false missing counts on a Mac even though the files exist.

Quick Start

Ask for help rewriting your shell verification block so it works correctly in both bash and zsh without using a variable named path.

Frequently Asked Questions about zsh-done-assertion-word-splitting

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

FAQPage Schema
Why does my shell script work in bash but fail with word splitting on macOS zsh?

Word splitting on macOS zsh fails because zsh does not split unquoted variables by default like bash. Your shell verification blocks need deliberate quoting, explicit IFS handling, or bash forcing to iterate correctly.

How do I fix a done-assertion check that reports files as missing when they exist?

Fix the done-assertion check by rewriting your shell verification block with careful quoting and explicit IFS handling to ensure word splitting operates correctly across both bash and zsh environments.

What causes command lookup to break in zsh after running a path check?

Command lookup breaks in zsh because using a lowercase path variable clobbers the system PATH. Avoid lowercase path variables in your shell scripts to prevent breaking command resolution on macOS.

How do I write portable shell scripts that run reliably on both bash and zsh?

Write portable shell scripts by forcing bash execution, applying deliberate quoting, and handling IFS explicitly. This ensures your verification blocks avoid word splitting errors on macOS zsh.

Why does my file existence loop return false missing counts on a Mac?

Your file existence loop returns false missing counts on a Mac because zsh handles unquoted variable iteration differently than bash. Diagnose the word splitting behavior to correct the loop verification.