shell

shell is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 34 tokens per session (1,048 once invoked), scanned C, original, MIT.

A guide to writing Bash scripts and command-line automation. It covers error handling, safe path handling, argument parsing, cleanup, and compatibility across common Unix systems.

In plain words
What is it for?
Use it to write or review scripts for CI, deployments, scheduled jobs, and developer tools, including scripts that run on both macOS and Linux.
Why use it?
It helps prevent silent failures, broken paths containing spaces, inconsistent exit codes, and leftover temporary files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to write or review scripts for CI, deployments, scheduled jobs, and developer tools, including scripts that run on both macOS and Linux.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/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 nimadorostkar/Claude-Skills-collection --skill shell
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

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 shell

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/shell"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,048 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00034 $0.01048
Opus 5 $0.00017 $0.00524
Sonnet 5 $0.00007 $0.00210
Haiku 4.5 $0.00003 $0.00105

Measured 9d ago against content hash 71c8897b9222, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade C, and why

shell scanned grade C with 1 finding 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 9d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

trap 'rm -rf "$workdir"' EXIT
skills/languages/shell/SKILL.md · 117 lines

How it starts

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

Shell

Purpose

Write shell scripts that fail loudly instead of silently, handle paths with spaces, and clean up after themselves. Most shell bugs are one missing quote or one unchecked exit code.

When to Use

  • Writing or reviewing Bash scripts.
  • Building CI steps, deployment scripts, or developer tooling.
  • Hardening a script that "works on my machine".
  • Deciding whether a task has outgrown shell entirely.

Capabilities

  • Strict mode and error handling that actually stops the script.
  • Safe quoting, arrays, and IFS handling.
  • Argument parsing and usage output.
  • Cleanup via trap, temp file discipline, and idempotence.
  • Portability between Bash, POSIX sh, and macOS's older toolchain.

Inputs

  • The script, its invocation context (CI, cron, interactive), and target shells.
  • Whether it must run on macOS (BSD utilities) as well as Linux (GNU).

Outputs

  • A script passing shellcheck -x with no warnings.
  • Deterministic exit codes and a usage message.
  • Cleanup guaranteed on every exit path.

Workflow

  1. Start strictset -Eeuo pipefail and an IFS you control.
  2. Parse arguments explicitly — Validate required inputs and print usage on error.
  3. Quote everything — Every variable expansion is "$var" unless you have a specific reason otherwise.
  4. Register cleanuptrap before you create the first temporary resource.
  5. Gate — Run ShellCheck; run the script under bash -n and, where practical, with set -x in a dry run.

Best Practices

  • set -e alone does not catch failures inside pipelines. pipefail is what makes a | b fail when a does.
  • Unquoted $var splits on whitespace and glob-expands. This is the root cause of most "it broke on a filename with a space" bugs.
  • Use mktemp -d and remove it in a trap — never hardcode /tmp/mything.
  • Prefer [[ ]] over [ ] in Bash; it does not word-split and supports pattern matching.
  • Check that required commands exist up front rather than failing halfway through.
  • When a script exceeds roughly 100 lines or needs data structures, rewrite it in Python. Shell is glue, not a language for logic.

Read the full file on GitHub · 117 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. 9d ago First seen · 117 lines · 34 tokens per session scan C 71c8897b9222

Subscribe to this mod's changes

shell is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 25d ago), licensed MIT. It adds 34 tokens to every session and 1,048 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

pinocchio-development

Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework. Covers account validation, CPI patterns, optimization techniques, and migration from Anchor.

sendaifun/skills · 44 tokens

solana-kit

Complete guide for @solana/kit - the modern, tree-shakeable, zero-dependency JavaScript SDK from Anza. Covers RPC connections, signers, transaction building with pipe, signing, sending, and account fetching with full TypeScript support.

sendaifun/skills · 56 tokens

solana-kit-migration

Helps developers understand when to use @solana/kit vs @solana/web3.js (v1), provides migration guidance, API mappings, and handles edge cases for Solana JavaScript SDK transitions.

sendaifun/skills · 47 tokens

datarobot-setup

Sets up DataRobot for local development including Python SDK, dr-cli, Agent Assist, and all required dependencies. Use when the user has not yet worked with DataRobot on this machine, OR when any DataRobot task fails due to missing or invalid credentials. Covers first-time setup, re-authentication, and credential…

datarobot-oss/datarobot-agent-skills · 70 tokens

xcode-makefiles

Install strict Xcode Makefile tooling for iOS/macOS projects, including build/run/test scripts with AGENTNAME-based per-agent isolation under build/. Use when a project needs reproducible local CLI builds without full app scaffolding.

robertguss/claude-code-toolkit · 52 tokens

neo-rust

Use this skill when writing, refactoring, debugging, or auditing Rust code. Trigger for .rs files, Cargo projects, ownership/borrowing/lifetime issues, Result/Option error handling, unnecessary clone/performance work, unsafe code review, or modern Rust architecture.

Benknightdark/neo-skills · 58 tokens