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.
npx skills add ancoleman/ai-design-components --skill shell-scriptinggit clone --depth 1 https://github.com/ancoleman/ai-design-componentsWrote 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.
[](https://agentmods.dev/skills/ancoleman/ai-design-components/shell-scripting)<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/shell-scripting"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/shell-scripting/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.
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/shell-scripting"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/shell-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.02183 |
| Opus 5.5 | $0.00016 | $0.00873 |
| Sonnet 5.5 | $0.00008 | $0.00437 |
| Haiku 4.5 | $0.00004 | $0.00218 |
Grade C, and why
shell-scripting scanned grade C 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$TEMP_DIR" Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
name=$(curl -sSL https://api.example.com/user | jq -r '.name') How it starts
The opening of the file, as written. The whole thing — 374 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shell Scripting
Purpose
Provides patterns and best practices for writing maintainable shell scripts with error handling, argument parsing, and portability considerations. Covers POSIX sh vs Bash decision-making, parameter expansion, integration with common utilities (jq, yq, awk), and testing with ShellCheck and Bats.
When to Use This Skill
Use shell scripting when:
- Orchestrating existing command-line tools and system utilities
- Writing CI/CD pipeline scripts (GitHub Actions, GitLab CI)
- Creating container entrypoints and initialization scripts
- Automating system administration tasks (backups, log rotation)
- Building development tooling (build scripts, test runners)
Consider Python/Go instead when:
- Complex business logic or data structures required
- Cross-platform GUI needed
- Heavy API integration (REST, gRPC)
- Script exceeds 200 lines with significant logic complexity
POSIX sh vs Bash
Use POSIX sh (#!/bin/sh) when:
- Maximum portability required (Linux, macOS, BSD, Alpine)
- Minimal container images needed
- Embedded systems or unknown target environments
Use Bash (#!/bin/bash) when:
- Controlled environment (specific OS, container)
- Arrays or associative arrays needed
- Advanced parameter expansion beneficial
- Process substitution
<(cmd)useful
For detailed comparison and testing strategies, see references/portability-guide.md.
Essential Error Handling
Fail-Fast Pattern
#!/bin/bash
set -euo pipefail
# -e: Exit on error
# -u: Exit on undefined variable
# -o pipefail: Pipeline fails if any command fails
Use for production automation, CI/CD scripts, and critical operations.
Explicit Exit Code Checking
#!/bin/bash
if ! command_that_might_fail; then
echo "Error: Command failed" >&2
exit 1
fi
Use for custom error messages and interactive scripts.
Trap Handlers for Cleanup
#!/bin/bash
set -euo pipefail
TEMP_FILE=$(mktemp)
cleanup() {
rm -f "$TEMP_FILE"
}
trap cleanup EXIT
What ships with it
15 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/error-handling.sh 7.3 KB runs code
- examples/getopts-advanced.sh 5.4 KB runs code
- examples/getopts-basic.sh 2.4 KB runs code
- examples/json-yaml-processing.sh 9.3 KB runs code
- examples/long-options.sh 4.0 KB runs code
- examples/production-template.sh 9.4 KB runs code
- outputs.yaml 13 KB
- references/argument-parsing.md 17 KB
- references/common-utilities.md 12 KB
- references/error-handling.md 14 KB
- references/parameter-expansion.md 14 KB
- references/portability-guide.md 13 KB
- references/testing-guide.md 12 KB
- scripts/lint-script.sh 7.8 KB runs code
- scripts/test-script.sh 5.9 KB runs code
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.
- 1mo ago First seen · 374 lines · 39 tokens per session scan C 1662ac30f716
shell-scripting is a skill published in the GitHub repository ancoleman/ai-design-components (524 stars, last pushed 10mo ago), licensed MIT. It adds 39 tokens to every session and 2,183 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
devops
Comprehensive DevOps engineering practices for Kubernetes, CI/CD, Bash scripting, Ansible, and cloud infrastructure.
dep
Handles containerization, CI/CD pipelines, and deployment setup.
ci-cd-pipeline
Use near the end of a project to generate CI and make the app deploy-ready. Produces a polyglot GitHub Actions workflow (lint, typecheck, test, build) and multi-stage Dockerfiles. The finish line is CI-green and container-ready, not an actual deploy.
deployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.
github-actions-templates
Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.
devops-engineer
Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates. Handles deployment automation, GitOps configuration, incident response runbooks, and internal developer platform tooling. Use when setting up CI/CD pipelines, containerizing…