shell

shell is a command for Claude Code from dotclaude/marketplace. It costs 9 tokens per session (472 once invoked), scanned D, original, MIT.

A guide for creating Bash shell scripts with error handling, input checks, safe variable use, temporary files, permissions, and cleanup. Shell scripts are small programs that run commands on a computer.

In plain words
What is it for?
Use it when writing scripts that execute commands, handle external input, access files or networks, manage temporary files, or need controlled permissions and cleanup.
Why use it?
It helps reduce mistakes such as command injection, accidental file changes, leaked secrets, and unclear behavior when a command fails. It also highlights the system access a script may have.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; positional $N argument.

Part of the cli-mastery plugin — 5 commands, 6 agents shipped together

Good fit Use it when writing scripts that execute commands, handle external input, access files or networks, manage temporary files, or need controlled permissions and cleanup.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dotclaude/marketplace/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.

Clone the repo
git clone --depth 1 https://github.com/dotclaude/marketplace

Made for: Claude Code.

Or install cli-mastery, the plugin that ships this one along with the rest of its 5 commands, 6 agents.

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/commands/dotclaude/marketplace/shell/github.svg)](https://agentmods.dev/commands/dotclaude/marketplace/shell)
Your own site
<a href="https://agentmods.dev/commands/dotclaude/marketplace/shell"><img src="https://agentmods.dev/badge/commands/dotclaude/marketplace/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/commands/dotclaude/marketplace/shell"><img src="https://agentmods.dev/badge/commands/dotclaude/marketplace/shell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 472 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 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.00009 $0.00472
Opus 5.5 $0.00004 $0.00189
Sonnet 5.5 $0.00002 $0.00094
Haiku 4.5 $0.00001 $0.00047

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

Security

Grade D, and why

shell scanned grade D 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 1mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- [ ] **Safe file permissions**: chmod 700 for scripts, 600 for configs

Recursive force deletehighDestructive command

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

- `rm -rf` with variables
plugins/cli-mastery/commands/shell.md · 68 lines

What it actually says

Shell Command

Shell script creation with error handling and best practices

SECURITY WARNING

CRITICAL: This command creates shell scripts with Bash execution capabilities.

Scripts you create will have the power to:

  • Execute system commands
  • Modify/delete files
  • Access network resources
  • Change permissions and ownership
  • Potentially escalate privileges

BEFORE requesting a script, consider:

  • What's the blast radius if this script is exploited?
  • Does this script handle any untrusted input?
  • Will this script access sensitive data or credentials?
  • What's the minimum privilege level needed?

Security Requirements Checklist

EVERY shell script must include:

  • Strict error handling: set -euo pipefail
  • Input validation: Validate ALL external inputs with regex
  • Quoted variables: ALWAYS quote variables to prevent injection
  • No hardcoded secrets: Use env vars or secret management
  • Secure temp files: Use mktemp, never predictable names
  • Least privilege: Run with minimum necessary permissions
  • Cleanup handlers: Use trap to clean up on exit/error
  • Safe file permissions: chmod 700 for scripts, 600 for configs
  • Command validation: Validate commands before execution
  • Audit logging: Log security-relevant operations

Dangerous Operations to Avoid

STOP and think before using:

  • rm -rf with variables
  • chmod 777 or similar overly permissive modes
  • sudo without specific command limits
  • eval with external input
  • Unquoted variables in commands
  • Shell injection via unsanitized input

Arguments

$1 (Required): script-purpose

$2 (Optional): robustness (production requires strict security)

Examples

/shell "Backup database with rotation" production
/shell "Deploy application with health checks"

Invoke the shell-scripter agent with: $ARGUMENTS

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. 1mo ago First seen · 68 lines · 9 tokens per session scan D b06f2f431580

Subscribe to this mod's changes

shell is a command published in the GitHub repository dotclaude/marketplace (43 stars, last pushed 6mo ago), licensed MIT. It adds 9 tokens to every session and 472 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.