CB Bash
Writes, debugs, and hardens Bash shell scripts — quoting, arrays, strict mode, traps, argument parsing, and macOS/Linux portability. Use when writing or reviewing any script, one-liner, cron job, deploy script, container entrypoint, or CI step; when a script breaks on spaces in filenames, exits silently, ignores set -e, hangs, or returns the wrong exit code; when quoting, IFS, globs, arrays, heredocs, process substitution, trap, getopts, or mapfile misbehave; when shellcheck flags SC2086 and friends; when unbound variable, bad substitution, command not found, ambiguous redirect, or unexpected end of file show up; when a script works by hand but fails under cron, systemd, sudo, or a CI runner; or when porting between macOS bash 3.2, GNU/Linux, WSL, and POSIX sh. Not for interactive zsh or fish configuration, not for PowerShell, and not for host-level cron, systemd, or permission failures (linux).
As a process B 66/100 · Nearly there — weak spots: inputs and preconditions, running it twice
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 14
✓ No critical or high findings
Medium and low: 14
-
medium Dangerous commands
cmd-persistencecron.md:33Persistence mechanism (cron / launchd / scheduled task / autorun registry) (detector / deny-list definition)- Files in `/etc/cron.d/` are ignored by `run-parts` if the filename contains a dot — `backup.sh` there never runs, `backup` does. `/etc/cron.d` and `/etc/crontab` also take a USER field before the co
detector -
medium Dangerous commands
cmd-persistencecron.md:81Persistence mechanism (cron / launchd / scheduled task / autorun registry) (quoted — discussed, not commanded)- `~/Library/LaunchAgents/<label>.plist` for user jobs, `/Library/LaunchDaemons/` for system ones; `StartCalendarInterval` for a schedule, `StartInterval` for "every N seconds", `RunAtLoad` for boot
quoted -
medium Dangerous commands
cmd-persistencecron.md:85Persistence mechanism (cron / launchd / scheduled task / autorun registry) (quoted — discussed, not commanded)- Reload after editing: `launchctl unload` then `launchctl load` the plist; editing alone changes nothing
quoted -
medium Dangerous commands
cmd-pipe-to-shellSKILL.md:189Downloads and executes remote code from an unrecognised host (pipe to shell) (quoted — discussed, not commanded)- **Safety posture**: whether scripts may `sudo`, dry-run first, banned constructs (`eval`, `curl | sh`, `rm -rf` on a variable) — affects `security.md` and destructive workflows
quoted -
low Dangerous commands
cmd-cron-mentioncron.md:35Mentions editing / listing crontab (quoted — discussed, not commanded)- `crontab -e` validates syntax; copying a file over `/var/spool/cron/…` by hand does not
quoted -
low Dangerous commands
cmd-privilegedebugging.md:75Privilege escalation / world-writable permissions (quoted — discussed, not commanded)- Redirection is done by YOUR shell before sudo runs: `sudo cmd > /root/out` fails on permissions; `cmd | sudo tee /root/out >/dev/null` works.
quoted -
low Dangerous commands
cmd-background-processprocesses.md:79Starts a background / autostarted process (quoted — discussed, not commanded)- `nohup cmd &` survives a hangup but still shares the terminal's session; `setsid cmd` starts a new session, fully detached
quoted -
low Dangerous commands
cmd-background-processprocesses.md:80Starts a background / autostarted process (quoted — discussed, not commanded)- `disown -h %1` removes a running job from the shell's SIGHUP list without stopping it — the fix when you forgot `nohup`
quoted -
low Dangerous commands
cmd-privilegequoting.md:59Privilege escalation / world-writable permissions (detector / deny-list definition)- `su -c`, `bash -c`, `sudo sh -c`, `xargs sh -c`, `find -exec sh -c` — same hop, same fix. With `find`, keep the data out of the string: `find . -exec sh -c 'process "$1"' _ {} \;` passes the filenamdetector -
low Dangerous commands
cmd-pipe-to-shellsecurity.md:15Downloads and executes remote code from an unrecognised host (pipe to shell) (documentation table row; documentation of a security skill)| `bash <(curl …)`, `curl … \| sh` | Executes whatever the server returns, including a truncated download | Download, verify a published checksum or signature, inspect, then run |
tablesecurity skill -
low Dangerous commands
cmd-privilegesecurity.md:45Privilege escalation / world-writable permissions (negated — the text forbids it)- Never `chmod 777` a temp path to "fix permissions"; set the umask (`umask 077`) before creating instead
negated -
low Dangerous commands
cmd-privilegesecurity.md:52Privilege escalation / world-writable permissions (documentation of a security skill)- Setuid on a shell script does nothing on Linux — the kernel ignores it, and every workaround (wrapper binaries, `sudo` shims) is a privilege-escalation surface. Grant a narrow `sudo` rule for one ex
security skill -
low Dangerous commands
cmd-privilegeSKILL.md:205Privilege escalation / world-writable permissions (documentation table row)| `sudo cmd > /root/out` | the redirection is performed by YOUR shell before sudo runs — permission denied | `cmd \| sudo tee /root/out >/dev/null` |
table
A further 1 matches are quotations in this security skill's documentation and are not counted as findings.
Files scanned: 23. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
name-formatname should be kebab-case (lowercase letters, digits, hyphens) - note
frontmatter-keyunknown frontmatter key "slug" - note
frontmatter-keyunknown frontmatter key "homepage" - note
frontmatter-keyunknown frontmatter key "changelog"
Process rating: all ten parameters 66/100
- 0Inputs and preconditions. Does not say what the process needs to start
- 30Running it twice. 10 mutating operations with no state check
- 50When it triggers. No condition that starts the skill
- 60Tools and files. Uses tools (bash, web, python) that frontmatter does not declare
- 60Result and completion. Output format stated, no completion criterion
- 70Execution cost. Instruction body is 4204 tokens
- 100Steps. 52 steps
- 100Failures and branches. 1 branches, has a failure section
- 100Consistency. Name and required fields are in place
- 100Progress reporting. Reports progress
- medium Safety rules and hard prohibitions inside a skill: they belong in the system prompt, here they protect nothing
- low 14 top-level sections: this looks like several domains in one skill
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +3Description length 908: 120–800 characters recommended
- +1No license
- +2Single-language instructions
- +4Description says when NOT to use the skill
- +4Structure: 14 headings
- +3Step-by-step instructions: 52 items
- +3Output format is stated explicitly
- +4Has examples (1 code blocks)
Quality base 70; lint remarks subtract, signals add up to 100. Result: 80.