agentsclimarketplace

Clean shell

Skill uwuclxdy/agenticat/skills/clean-shell

Defensive Bash/POSIX shell quality: strict-mode `set` flags, traps, idempotent mutation of live systems (deploy, sshd/sudoers, systemd), ShellCheck discipline, bats-core tests. Use when writing, hardening, reviewing, or testing shell scripts, or wiring shellcheck/bats into CI.From its SKILL.md

Install
npx -y skills add uwuclxdy/agenticat --skill clean-shell

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.0 KB, as published. Nobody here has run it

Clean Shell

Shell-specific conventions for writing, hardening, reviewing, and testing scripts. The core rules below always apply. Load the one reference file matching the task; don't load them all.

Task touchesFile
Scripts that mutate live systems: deploy/apply, firewall/sshd/sudoers edits, systemd oneshot+timer units, ssh remote-exec, rollback, cleanup traps, idempotencyreferences/defensive.md
.shellcheckrc, # shellcheck disable= directives, severity floors, exit codes, CI gatingreferences/shellcheck.md
Bats tests: .bats files, run, setup/teardown, PATH-stub mocking, parallel jobsreferences/bats.md

Core Rules

  • Pick set flags by intent and comment the reason next to them: set -euo pipefail for orchestration where any failure aborts; drop -e when steps may fail without aborting; set -u alone for long-running loops. A thin wrapper sets no flags and ends with exec.
  • Quote every expansion ("$var", "${arr[@]}", "$(cmd)"); -- end-of-options guard before untrusted operands.
  • Validate input at the boundary into a checked value ("${1:?msg}", a case integer guard); no call site re-tests a raw string.
  • Every mktemp gets an EXIT trap right after creation. Traps are best-effort: SIGKILL, OOM-kill, and power loss skip them.
  • Anything that mutates system state is check-then-act idempotent; add flock where concurrent runs are possible.
  • Never echo a generated secret; set -x tracing and ps//proc/*/cmdline argv leak it too.
  • Every # shellcheck disable= carries a same-line reason comment.
  • Non-trivial scripts get bats tests covering the error paths, not just the happy path.

What ships with it: 3 files

15.7 KB alongside SKILL.md

references/

Gives 0 of the 12 instructions most test skills give

Counted across 1,201 of the 2,096 authors here whose files we hold, read 2026-09-06

  • Write a failing test before writing codein 43 of 1201, across 36 files
  • Run the full test suitein 36 of 1201, across 35 files
  • Test only one variable per experimentin 34 of 1201, across 17 files
  • Read product marketing context before asking questionsin 34 of 1201, across 14 files
  • Mock external dependenciesin 34 of 1201, across 30 files
  • Define primary, secondary, and guardrail metricsin 33 of 1201, across 16 files
  • Pre-determine sample size before startingin 31 of 1201, across 14 files
  • Test behavior rather than implementationin 31 of 1201, across 29 files
  • Formulate a hypothesis before designing a testin 30 of 1201, across 13 files
  • Document every test hypothesis, variant, and resultin 29 of 1201, across 11 files
  • Use descriptive test function namesin 25 of 1201, across 21 files
  • Commit to the methodology without stopping earlyin 24 of 1201, across 8 files

Said here and by no other author read

  • Set shell flags by intent
  • Comment the reason for shell flags
  • Quote every variable expansion
  • Use end-of-options guard before untrusted operands
  • Add exit traps for temporary files
  • Ensure system state mutations are idempotent

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 626,045. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.