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 agentmods add skills/0xdarkmatter/claude-mods/bash-opsnpx skills add 0xDarkMatter/claude-mods --skill bash-opsgit clone --depth 1 https://github.com/0xDarkMatter/claude-modsWrote 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/0xdarkmatter/claude-mods/bash-ops)<a href="https://agentmods.dev/skills/0xdarkmatter/claude-mods/bash-ops"><img src="https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/bash-ops.svg" alt="Measured on agentmods" 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 | $0.00108 | $0.03411 |
| Opus 5 | $0.00054 | $0.01706 |
| Sonnet 5 | $0.00022 | $0.00682 |
| Haiku 4.5 | $0.00011 | $0.00341 |
Grade C, and why
bash-ops 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 4d 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.
- `mktemp -d` for a temp **directory**; clean it with `rm -rf -- "$tmpdir"`. Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
this — they branch on registry exit codes, so a non-zero `curl` must not kill the How it starts
The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bash Operations
Defensive Bash for scripts that run unattended — CI steps, automation, and the
scripts/ a skill ships. The goal: a script that fails loudly on the first
problem, never corrupts state, and emits parseable output.
This is the house standard for any shell script in this repo. The script contract
below is the same one enforced by
docs/SKILL-RESOURCE-PROTOCOL.md §2–§7 —
that protocol governs every skill resource, and its rules are bash rules. Treat
the two as one standard: the resource protocol decides what a skill script must
guarantee (streams, exit codes, help block); this skill teaches how to write
the Bash that delivers it. The canonical reference implementation is
skills/supply-chain-defense/scripts/preinstall-check.sh —
read it whenever you need a worked example of every rule here applied at once.
Bash vs Python — choose before you write
Reach for Python (and the python-cli-ops skill) when a script grows past
~100 lines, needs data structures (nested maps, JSON manipulation beyond a
jq filter), arithmetic beyond integers, or string processing with real parsing.
Bash excels at gluing processes together: launching tools, moving files,
checking conditions, wiring pipelines. The moment you find yourself simulating a
hash-of-hashes or doing float math, stop — that's Python's job. This mirrors
SKILL-RESOURCE-PROTOCOL §3, which expects .sh for shell glue and .py for logic.
Strict mode — the first three lines
#!/usr/bin/env bash
set -Eeuo pipefail
IFS=$'\n\t'
Each flag earns its place — and each has a sharp edge:
| Flag | Buys you | The edge to know |
|---|---|---|
set -e |
Abort on any unchecked non-zero command | Does not fire inside if/&&/` |
set -u |
Error on unset variable expansion | "$@" and "${arr[@]}" on an empty array trip -u in old Bash; use "${arr[@]:-}" or guard with Bash 4.4+. |
set -o pipefail |
A pipe fails if any stage fails, not just the last | Without it, `grep x file |
set -E |
ERR trap inherits into functions/subshells/command-subs |
Pair with a trap … ERR that reports $LINENO. |
IFS=$'\n\t' |
Word-splitting only on newline/tab, never spaces | Filenames with spaces stop splitting into pieces. Unset/space-IFS is the #1 cause of "it worked until a path had a space". |
What ships with it
5 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.
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.
- 4d ago First seen · 231 lines · 108 tokens per session scan C bb4c0f6300ab
bash-ops is a skill published in the GitHub repository 0xDarkMatter/claude-mods (32 stars, last pushed 11d ago), licensed MIT. It adds 108 tokens to every session and 3,411 once invoked, about $0.0005 per session on Opus 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-08-30.
Other skills, from other repositories
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
golden-rss
Use when testing the rss golden build.
overleaf-sync
Two-way sync between a local paper directory and an Overleaf project, so ARIS audit/edit workflows stay on the local copy while collaborators edit in the Overleaf web UI. Use when user says "同步 overleaf", "overleaf sync", "推送到 overleaf", "connect overleaf", "Overleaf 桥接", "pull overleaf", "push overleaf", or wants to…
omh-code-review
This is a Hermes-native code-review workflow skill.
redteam-web-detail-pack
Routing and boundary guidance for authorized general web application security testing. Use as a web testing router when the attack surface should be dispatched to more specific web vulnerability skills.
android-pentest
安卓应用渗透测试 — APK分析、Hook、自动化测试、运行态驱动、签名恢复、抓包分析.