name: zsh description: Apply Zsh shell scripting conventions for error safety and logging. Use when authoring, modifying, or reviewing Zsh scripts, including mise file tasks and bootstrap scripts.
Zsh Scripting Conventions
Error Safety
- Use
set -euo pipefailat the top of every Zsh script to fail fast on errors, undefined variables, and broken pipes.
Logging
- Use consistent logging functions across scripts in the same project; detect and reuse existing helpers before introducing new ones.
File Naming
- Use
.zshfor Zsh scripts, including Zsh-based mise file tasks.
Cross-references
- For broader script-authoring guidance (project pattern detection, environment configuration, testing, integration) see the
scriptsskill. - For mise-specific task authoring (file tasks, TOML tasks, usage directives) see the
mise-tasksskill.