writing-shell

writing-shell is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 132 tokens per session (703 once invoked), scanned C, original, MIT.

Guidance for writing shell scripts and command-line automation in languages such as POSIX sh, Bash, Zsh, and Fish.

In plain words
What is it for?
Use it for shell files, hooks, continuous-integration commands, command pipelines, and small scripts that connect command-line tools.
Why use it?
It reduces common scripting problems involving quoting, unsafe file handling, portability, processes, and command pipelines.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for shell files, hooks, continuous-integration commands, command pipelines, and small scripts that connect command-line tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexei-led/cc-thingz/writing-shell
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 alexei-led/cc-thingz --skill writing-shell
Clone the repo
git clone --depth 1 https://github.com/alexei-led/cc-thingz

Made for: Claude Code, Codex.

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 writing-shell

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-shell/github.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/writing-shell)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-shell"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-shell/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 writing-shell

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-shell"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 703 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00132 $0.00703
Opus 5.5 $0.00053 $0.00281
Sonnet 5.5 $0.00026 $0.00141
Haiku 4.5 $0.00013 $0.00070

Measured 2mo ago against content hash 302e8c05023b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

writing-shell scanned grade C with 2 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 2mo 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- No `curl | sh`: download, verify, then run.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- No `curl | sh`: download, verify, then run.
src/skills/writing-shell/SKILL.md · 47 lines

How it starts

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

Shell Development

In GitHub Actions, this skill owns the shell inside run: blocks; operating-infra owns the workflow YAML around it (jobs, permissions, actions, secrets, caching). Mixed changes use both.

Shell Choice

  • Follow the existing shebang and tooling. New portable scripts: POSIX sh for simple logic; Bash when you need arrays, pipefail, [[ ]], or regex.
  • Zsh and Fish only for existing files, interactive config, or explicit requests.
  • Never rely on the agent's own shell. Name the shell in the shebang, and invoke it explicitly in tests.
  • Shell is glue. Move data modeling, business logic, or CPU-heavy work to the project's real language.

Safety and Portability

  • Bash: set -euo pipefail, knowing it does not fire inside conditionals or &&/|| lists. POSIX sh: set -eu and explicit pipeline checks.
  • Build commands with arrays, never strings plus eval. Put -- before user-controlled operands.
  • NUL- or newline-safe loops for filenames; never parse ls or use for x in $(cmd).
  • mktemp plus a cleanup trap for temp files, locks, and partial outputs.
  • No curl | sh: download, verify, then run.
  • Destructive actions list their targets first and require confirmation unless the script runs non-interactively with explicit inputs.
  • macOS/BSD vs GNU: avoid sed -i, date -d, readlink -f, and GNU-only grep flags unless the dependency is documented. Prefer printf to echo.
  • Every shellcheck disable carries a short reason.

CLI Tools

  • Use non-interactive, pipe-friendly tools with stable stdout and exit codes: no TUI, pager, color, or prompts when output is consumed.
  • Parse structured data with jq, yq, mlr, or dasel, not grep/sed scraping. Search with rg and fd.
  • Preview replacements before applying them (sd -p, rg --replace).
  • Check for non-standard tools and fail with a clear message. Never install them silently.
  • Look up exact flags with looking-up-docs instead of guessing.

References

  • testing.md: gate commands (shfmt, ShellCheck, checkbashisms, Bats, ShellSpec) and test design; read when adding tests or choosing checks.

Read the full file on GitHub · 47 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago Changed · -30 lines 302e8c05023b
  2. 3mo ago First seen · 77 lines · 132 tokens per session scan C 3bd1a8d55195

Subscribe to this mod's changes

writing-shell is a skill published in the GitHub repository alexei-led/cc-thingz (37 stars, last pushed yesterday), licensed MIT. It adds 132 tokens to every session and 703 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

writing-shell compared with skills from other repositories

writing-shell next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
writing-shellalexei-led/cc-thingzSkill37yesterdayMITC132Claude Code, Codex
coding-standardshashgraph-online/awesome-codex-pluginsSkill1.6ktodayApache-2.0A28Claude Code, Codex
rust-skillsleonardomso/rust-skillsSkill7814d agoMITA56Claude Code, Codex
refactoring-csharpCodeAlive-AI/ai-driven-developmentSkill1942d agoMITA60Claude Code
ring:adopting-lib-commons-huma-wrapperLerianStudio/ringSkill2181mo agoApache-2.0A142Cursor
ring:applying-licensesLerianStudio/ringSkill2181mo agoApache-2.0A94Cursor
ring:auditing-dependency-securityLerianStudio/ringSkill2181mo agoApache-2.0A102Cursor