who-ran-what: Skill for Claude Code

.claude/skills/shell-scripting/SKILL.md

shell-scripting is a skill for Claude Code from mylee04/who-ran-what. It costs 13 tokens per session (713 once invoked), scanned A, a copy of shell-scripting, MIT.

A set of guidelines for writing shell scripts, which are text files that automate command-line tasks. It covers structure, variables, conditions, dependency checks, and error handling.

In plain words
What is it for?
Writing or refactoring shell scripts and adding functions to command-line tools.
Why use it?
It gives developers consistent practices for scripts that need to work reliably across systems.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is mylee04/who-ran-what's own configuration. It tells Claude Code how to work on who-ran-what itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything who-ran-what configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mylee04/who-ran-what. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mylee04/who-ran-what/main/.claude/skills/shell-scripting/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mylee04/who-ran-what

Made for: Claude Code.

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-scripting

README.md
[![agentmods](https://agentmods.dev/badge/skills/mylee04/who-ran-what/shell-scripting.svg)](https://agentmods.dev/skills/mylee04/who-ran-what/shell-scripting)
Your own site
<a href="https://agentmods.dev/skills/mylee04/who-ran-what/shell-scripting"><img src="https://agentmods.dev/badge/skills/mylee04/who-ran-what/shell-scripting.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 713 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 86% copy Near-identical to another mod 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.00013 $0.00713
Opus 5 $0.00006 $0.00357
Sonnet 5 $0.00003 $0.00143
Haiku 4.5 $0.00001 $0.00071

Measured 8d ago against content hash e0e973ed43d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

shell-scripting 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 8d 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.

Origin

This is a copy

86% identical to shell-scripting — 57 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/shell-scripting/SKILL.md · 173 lines

How it starts

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

Shell Scripting Standards

When to Use

  • Writing new shell scripts
  • Refactoring existing scripts
  • Adding new functions

Script Structure

1. File Header

#!/bin/bash

# Script description
# https://github.com/mylee04/who-ran-what

set -e  # Exit on error

2. Constants (UPPER_CASE)

VERSION="0.1.0"
CONFIG_DIR="$HOME/.claude"

3. Functions (snake_case)

# Description of function
# Arguments: $1 = name, $2 = optional value
function_name() {
    local name="$1"
    local value="${2:-default}"

    # Function body
}

4. Main Logic

# Main execution
main() {
    validate_args "$@"
    do_work
    cleanup
}

main "$@"

Best Practices

Variable Handling

# Good - quoted variables
echo "$message"
path="$HOME/.config"

# Bad - unquoted
echo $message
path=$HOME/.config

Conditionals

# Good - double brackets
if [[ -n "$var" ]]; then
    echo "not empty"
fi

# Bad - single brackets
if [ -n "$var" ]; then
    echo "not empty"
fi

Command Existence Check

# Good
if command -v jq &> /dev/null; then
    value=$(jq -r '.key' "$file")
fi

# Bad
if which jq; then
    value=$(jq -r '.key' "$file")
fi

Error Handling

# Good - explicit error handling
if ! some_command; then
    echo "Error: command failed" >&2
    exit 1
fi

# Good - trap for cleanup
cleanup() {
    rm -f "$temp_file"
}
trap cleanup EXIT

Local Variables in Functions

# Good
my_function() {
    local input="$1"
    local result
    result=$(process "$input")
    echo "$result"
}

# Bad - pollutes global scope
my_function() {
    input="$1"
    result=$(process "$input")
    echo "$result"
}

Common Patterns

OS Detection

detect_os() {
    case "$(uname -s)" in
        Darwin*)    echo "macos" ;;
        Linux*)     echo "linux" ;;
        CYGWIN*|MINGW*|MSYS*) echo "windows" ;;
        *)          echo "unknown" ;;
    esac
}

JSON Handling

Read the full file on GitHub · 173 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. 8d ago First seen · 173 lines · 13 tokens per session scan A e0e973ed43d9

Subscribe to this mod's changes

shell-scripting is a skill published in the GitHub repository mylee04/who-ran-what (3 stars, last pushed 7mo ago), licensed MIT. It adds 13 tokens to every session and 713 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to shell-scripting, differing in 57 lines, and is treated as a copy.