write-zsh-scripts

write-zsh-scripts is a skill for Claude Code from cboone/agent-harness-plugins. It costs 63 tokens per session (822 once invoked), scanned A, original, MIT.

A style guide for writing and reviewing Zsh scripts, shell configuration, plugins, and completion files. Zsh is a command-line shell, similar to Bash, with its own syntax and conventions.

In plain words
What is it for?
Creating, editing, or reviewing Zsh scripts, configuration files, plugins, and command-completion functions.
Why use it?
It helps keep Zsh code consistent and avoids mistakes caused by applying Bash habits to Zsh.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the write-zsh-scripts plugin — 1 skill shipped together

Good fit Creating, editing, or reviewing Zsh scripts, configuration files, plugins, and command-completion functions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cboone/agent-harness-plugins/write-zsh-scripts
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cboone/agent-harness-plugins --skill write-zsh-scripts
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code.

Or install write-zsh-scripts, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-zsh-scripts

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-zsh-scripts/github.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/write-zsh-scripts)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-zsh-scripts"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-zsh-scripts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-zsh-scripts

Your own site · 80×15
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-zsh-scripts"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-zsh-scripts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 822 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.00822
Opus 5.5 $0.00025 $0.00329
Sonnet 5.5 $0.00013 $0.00164
Haiku 4.5 $0.00006 $0.00082

Measured 3d ago against content hash 29aa5228a288, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-zsh-scripts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/write-zsh-scripts/skills/write-zsh-scripts/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zsh Style Guide

Apply the zsh conventions from ./references/ZSH.md when creating or editing zsh scripts, configurations, and plugins.

Key Conventions

Read ./references/ZSH.md for the complete guide. Summary:

Script Structure

  • Shebang: #!/usr/bin/env zsh
  • Strict mode: setopt ERR_EXIT NO_UNSET PIPE_FAIL
  • Main function called at end: main "${@}"

Naming

  • Functions: snake_case
  • Local variables: lower_case
  • Constants: ALL_CAPS with readonly
  • Private/internal: _underscore_prefix

Syntax

  • Variable expansion: ${var} not $var
  • Command substitution: $(...) not backticks
  • Tests: [[ ]] not [ ]
  • Function syntax: function name() { } with both keyword and parentheses
  • Arithmetic: (( )) for statements, $(( )) for expressions

Quoting

  • Always quote variable expansions: "${var}"
  • Always quote command substitutions: "$(cmd)"
  • Use arrays for lists, not word splitting
  • Use "${(@)array}" to preserve elements in quoted context

Variables and Scope

  • Use typeset over declare
  • Use local for all function variables
  • Arrays are 1-based (not 0-based like Bash)
  • Use typeset -A for associative arrays
  • Separate local declaration from command substitution

Zsh-Specific Features

  • Expansion flags: ${(L)var}, ${(s:/:)path}, ${(u)array}
  • Glob qualifiers: *(.) for files, *(/) for dirs, *(N) for null glob
  • Extended glob: setopt EXTENDED_GLOB for ^, ~, # patterns
  • always blocks: { ... } always { ... } for try/finally
  • Named traps: TRAPINT(), TRAPZERR(), TRAPEXIT()
  • Process substitution: =(...) creates a temp file (zsh-only)

Completions

For zsh completion function conventions, read ./references/completions.md. Key points:

  • Use _description for all group descriptions; never pass text directly to compadd
  • Every compadd call must include "${expl[@]}"
  • Make curcontext local in functions using _arguments -C
  • Register tags before offering matches
  • Return zero if matches were added, non-zero otherwise

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +2 lines · +15 tokens per session 29aa5228a288
  2. 8d ago Changed · +1 lines · +9 tokens per session 4ca9feb7ecb1
  3. 25d ago Changed · +4 lines fc9291cb6737
  4. 26d ago Changed · -3 lines · -38 tokens per session 0d2f727d33ff
  5. 1mo ago First seen · 82 lines · 77 tokens per session scan A 2b2f18a93c6a

Subscribe to this mod's changes

write-zsh-scripts is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 822 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

swift-testing-pro

Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use Swift Testing.

jacklandrin/OnlySwitch · 34 tokens

starcat-cli-release

A release process for Starcat’s command-line program and its Homebrew package. Homebrew is a tool for installing software on macOS and Linux from package definitions.

starcat-app/Starcat · 85 tokens

starcat-supports-ops

A set of procedures for running and maintaining Starcat’s self-hosted Go services locally and on Fly.io, a cloud hosting platform. It covers service status, health checks, secrets, backups, and data restoration.

starcat-app/Starcat · 97 tokens

swift-expert

Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.

personamanagmentlayer/pcl · 76 tokens

ci-tests

Run the test suite for the current repo, auto-detecting Python (pytest/uv), Node (vitest/pnpm), or Rust (cargo test).

FlorianBruniaux/claude-code-plugins · 35 tokens

expo-modules

Writing Swift/Kotlin native modules with the Expo Modules API, requireNativeModule, async functions, view modules, and the event-emitter pattern. Triggers on expo modules, native module, swift, kotlin, requireNativeModule, expo-module-scripts, expo.modules.json, view module, event emitter, native function, async…

fatihkan/badi · 77 tokens