shell

shell is a skill for Claude Code, Codex from fmind/dot. It costs 24 tokens per session (1,370 once invoked), scanned C, original, MIT.

A guide for writing and checking POSIX shell, Bash, and Fish scripts, which are command-line programs used to automate operating-system tasks. It covers portability, formatting, and safety checks.

In plain words
What is it for?
Use it for bootstraps, entrypoints, Git hooks, continuous-integration commands, Fish functions, and other small command-line automations.
Why use it?
It helps prevent quoting mistakes, accidental path changes, shell-dialect mix-ups, and scripts that behave differently on other systems. It also indicates when a longer script should become a Python program.

Skill for Claude CodeCodex

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

Good fit Use it for bootstraps, entrypoints, Git hooks, continuous-integration commands, Fish functions, and other small command-line automations.

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

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/fmind/dot/shell/github.svg)](https://agentmods.dev/skills/fmind/dot/shell)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/shell"><img src="https://agentmods.dev/badge/skills/fmind/dot/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/fmind/dot/shell"><img src="https://agentmods.dev/badge/skills/fmind/dot/shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,370 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.00024 $0.01370
Opus 5.5 $0.00010 $0.00548
Sonnet 5.5 $0.00005 $0.00274
Haiku 4.5 $0.00002 $0.00137

Measured 2d ago against content hash c9f7f8f98e4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2d 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.

1. **Quote every expansion and protect paths**: wrap every variable and command substitution (`"${var}"`, `"$(cmd)"`), store argument lists in arrays `"${arr[@]}"` (or `set --` in `sh`) rather than space-delimited string
skills/shell/SKILL.md · 53 lines

How it starts

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

Shell Scripting, Portability & Safety

Keep shell scripts small, strict, and auditable across POSIX sh, bash, zsh, and fish (bootstraps, entrypoints, Fish functions, git hooks, CI run: blocks). Once logic passes ~100 lines or needs retries, structured JSON/YAML parsing, or complex branching, graduate to a PEP 723 Python script (python/script).

Workflow

  1. Pick a dialect-true shebang and strict header:
    • Strict POSIX sh (dash/Alpine/BSD): #!/bin/sh + set -eu (no bashisms: no [[ ]], arrays, pipefail, local where strict portability applies, or $'...').
    • Bash: #!/usr/bin/env bash + set -euo pipefail.
    • Zsh: #!/usr/bin/env zsh + emulate -L zsh + set -euo pipefail (syntax-check via zsh -n).
    • Fish: #!/usr/bin/env fish (never mix POSIX syntax; use set -gx—never set -U—inside tracked config files so persistent universal state is never mutated).
  2. Quote every expansion and protect paths: wrap every variable and command substitution ("${var}", "$(cmd)"), store argument lists in arrays "${arr[@]}" (or set -- in sh) rather than space-delimited strings, pass -- before variable paths (rm -rf -- "${dir:?}/sub"), and split local out; out="$(cmd)" so local/export/readonly never mask non-zero exits under set -e.
  3. Bound temp files, traps & non-TTY runs: create temp dirs via mktemp -d with trap cleanup EXIT; trap 'trap - EXIT; cleanup; trap - INT; kill -INT $$' INT; trap 'trap - EXIT; cleanup; trap - TERM; kill -TERM $$' TERM (avoids double cleanup and preserves signal exits; guard unset vars under set -u), disable prompts (--yes, </dev/null), and keep operations idempotent (ln -sfn, pre-checks over blind >>).
  4. Eliminate injection & brittle parsing: never interpolate variables into eval, sh -c "...", or sed/awk—pass positional args (sh -c 'cmd "$1"' _ "$arg"), and verify checksums/signatures before running downloaded installers.
    • Structured data: parse JSON with jq and YAML with Go yq (mikefarah/yq, e.g. yq -i '.key = strenv(VAL)' file.yml—distinct from Python kislyuk/yq).
    • Safe file iteration: in POSIX sh, use find ... -exec ... {} + or safe globs; in Bash, use while IFS= read -r -d '' f; do ...; done < <(find ... -print0) (never for f in $(ls ...)).
  5. Verify with deterministic linters and syntax checks:

Read the full file on GitHub · 53 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. 2d ago Changed c9f7f8f98e4f
  2. 3d ago Changed · +5 lines e6057ef4af10
  3. 8d ago First seen · 48 lines · 24 tokens per session scan C ded98c6760fb

Subscribe to this mod's changes

shell is a skill published in the GitHub repository fmind/dot (14 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 1,370 once invoked, about $0.0001 per session on Opus 5.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-11-22.

Related

shell compared with skills from other repositories

shell next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
shellfmind/dotSkill14yesterdayMITC24Claude Code, Codex
go-stackfmind/dotfilesSkill43mo agoMITA31Claude Code, Codex
python-stackfmind/dotfilesSkill43mo agoMITA41Claude Code, Codex
python-scriptfmind/dotfilesSkill43mo agoMITA34Claude Code, Codex
scaffold-nodeurmzd/dotfilesSkill65d agoApache-2.0A119Claude Code
write-codeurmzd/dotfilesSkill65d agoApache-2.0A112Claude Code
cloud-runfmind/dotfilesSkill43mo agoMITA28Claude Code, Codex