Guides writing scripts that are safe to rerun through check-then-act steps, atomic writes, dry-run modes, and progress tracking. Useful when automation may run twice, die halfway, or need a safe retry.
Every script eventually runs twice: a retry, a duplicated cron slot, a nervous operator. Idempotent means the second run converges to the same end state without damage: design each step to check reality before changing it.
mkdir -p, ln -sfn, INSERT ... ON CONFLICT,
kubectl apply): each step describes an end state and is a
no-op when reality already matches. Commands that fail on
re-execution (mkdir, useradd, plain INSERT) get guarded:
check-then-act, or use the tool's idempotent form (the
declarative instinct of infrastructure-as-code, at script
scale).mv into place (rename is atomic; a killed
script leaves the old file intact, never a half-written one);
database changes in transactions; multi-file updates staged
then swapped via symlink flip. A script killed at any line
should leave either the old state or the new state, never a
hybrid (see graceful-shutdown's crash-window thinking).done/ marker per item, a database progress row) and skip
them on rerun: crash recovery becomes "run it again" (see
background-jobs checkpointing; data work gets this from
partition-overwrite: see data-pipeline-design). Guard the
state file updates with the same atomic-write rule.run() { $DRY && echo "would: $*" || "$@"; });
dry-run output is how operators verify a fix before trusting
it and how reviews check blast radius (see
automation-guardrails; PowerShell gets this free via
-WhatIf: see powershell-essentials).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Not loaded · from ai-skills-commands
Claude Code won't load this skill
It ships in ai-skills-commands at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
npx claudepluginhub amey-thakur/ai-skills --plugin ai-skills-commands1,000 skills in this plugin
/ab-test-designDesign product experiments with real hypotheses, honest sample-size math, guardrails, and peeking discipline. Use when validating a change by experiment or reviewing a test before believing its result./accessibility-reviewAudit a UI for real accessibility, keyboard-first, with concrete failures and fixes rather than checkbox compliance. Use when reviewing or building any user interface./accessibility-specialist-roleOperate as an accessibility specialist who audits against WCAG, trains teams to stop shipping the same defects, and owns the compliance sign-off. Use when a product needs to be usable with a keyboard, a screen reader, or magnification and someone must certify it before launch.Other plugins' skills for the same job