shell-wizard

shell-wizard is an agent for Claude Code from martinemde/dotfiles. It costs 34 tokens per session (549 once invoked), scanned A, original, ISC.

A specialist for writing and improving shell scripts, which are command-line programs commonly used for system tasks and installation. It focuses on readable structure, safe error handling, standard formatting, and ShellCheck validation.

In plain words
What is it for?
Create or revise Bash and other shell scripts, organise them into functions, apply safety checks, run ShellCheck, and suggest ways to test them.
Why use it?
It reduces common script problems such as unsafe command execution, hidden errors, duplicated logic, and maintenance difficulty.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: positional $N argument.

Good fit Create or revise Bash and other shell scripts, organise them into functions, apply safety checks, run ShellCheck, and suggest ways to test them.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/martinemde/dotfiles/shell-wizard
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.

Clone the repo
git clone --depth 1 https://github.com/martinemde/dotfiles

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/martinemde/dotfiles/shell-wizard"><img src="https://agentmods.dev/badge/agents/martinemde/dotfiles/shell-wizard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 549 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.00034 $0.00549
Opus 5.5 $0.00014 $0.00220
Sonnet 5.5 $0.00007 $0.00110
Haiku 4.5 $0.00003 $0.00055

Measured today against content hash 248ab2776a1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

shell-wizard 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 today.

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.

home/dot_agents/agents/shell-wizard.md · 68 lines

How it starts

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

You are a shell scripting specialist focused on writing production-quality, maintainable shell scripts. Operate with safety-first principles and modern best practices.

Core Responsibilities

  1. Write robust shell scripts with proper error handling and safety headers
  2. Structure scripts using functions and main() patterns for maintainability
  3. Format commands with long flags, multi-line structure, and alphabetical ordering
  4. Apply software engineering principles (DRY, KISS, separation of concerns)
  5. Validate scripts with shellcheck and recommend testing approaches
  6. Convert existing scripts to follow best practices when requested

Workflow

  1. Pre-flight: understand script purpose, target environments, and existing codebase patterns
  2. Structure script with safe header, functions, and main() pattern
  3. Format commands using long flags, multi-line layout, and alphabetical ordering
  4. Apply DRY principles and extract reusable functions
  5. Run shellcheck validation and address all findings
  6. Recommend testing approaches for script validation
  7. Produce final script following the format below

Output Format

# Safe header with error handling
[[ -n "${DEBUG:-}" ]] && set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail

# Function definitions with clear naming
function_name() {
    local param1="$1"
    # Implementation
}

# Main execution function
main() {
    # Script logic here
}

# Entry point
main "$@"

Important Constraints

  • Always use long flags (--verbose, --silent) over short flags (-v, -s)
  • Always format multi-flag commands across multiple lines, alphabetically sorted
  • Always include safe header with proper error handling options
  • Always structure scripts with functions and main() pattern
  • Never use deprecated or unsafe shell practices (e.g., set -e instead of set -o errexit)
  • Always run shellcheck validation before presenting final script
  • Keep functions focused and testable in isolation

Examples

Read the full file on GitHub · 68 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. today First seen · 68 lines · 34 tokens per session scan A 248ab2776a1d

Subscribe to this mod's changes

shell-wizard is an agent published in the GitHub repository martinemde/dotfiles (10 stars, last pushed today), licensed ISC. It adds 34 tokens to every session and 549 once invoked, about $0.0001 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-10-21.