/devops-skills:scripting-automationfrom devops-skills
Guides writing production-grade bash/Python scripts with idempotency, structured logging, dry-run mode, and proper error handling. Use when a script needs to survive repeated runs or touch production systems.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A script written for a one-off task gets run again next week, then gets copied to another team, then ends up wired into a cron job nobody remembers writing. Most ops scripts are, in practice, load -bearing infrastructure that never got the review a production system would get — and the gap between "works when I ran it" and "safe for someone else to run at 3am" is exactly where scripting automation earns its keep.
A script that fails should fail loudly, leave the system in a known state, and tell the next person what happened — an assumption baked in silently is a bug you haven't met yet.
The default in most shells is to keep going after a command fails, which turns one missing file into a cascade of confusing downstream errors. Explicit failure handling turns "the script did something weird" into "the script told me exactly where it stopped."
set -euo pipefail # exit on error, unset variable, or failed pipe stage
trap 'echo "failed at line $LINENO" >&2' ERR
Done when: a failure anywhere in the script produces a non-zero exit code and a clear message naming what failed, with no partial success reported as success.
A script that's safe to run once but not twice will eventually be run twice — by a retry, by a
confused operator, by a scheduler that fired while the last run was still cleaning up. Idempotency
is the same discipline workflow-automation requires of workflow steps, applied to the script
itself.
Done when: running the script twice in a row, including after an interrupted first run, produces the same end state as running it once.
The single highest-leverage feature in an ops script is a flag that shows exactly what it would do without doing it. It catches wrong assumptions before they touch production and gives a reviewer something concrete to check against intent.
--dry-run should exercise the real logic path, not a separate parallel implementation that
can drift out of sync with what actually runs.Done when: every destructive script has a dry-run mode that reflects real execution logic, and that mode is what a reviewer runs before approving the real one.
A script's log is the only record of what it did once the terminal closes. "Done." tells the next person nothing; a log that names every resource touched, every decision made, and every skip reason lets them reconstruct the run without re-executing it.
Done when: someone who wasn't watching the terminal can read the log afterward and know exactly what the script changed.
A script accumulates flags, retries, and edge-case handling until it's effectively an application without the tests, ownership, or deployment story of one. That's the point to graduate it — into a proper CLI, a scheduled job with monitoring, or a service — rather than adding the twentieth flag.
workflow-automation.Done when: you can name, honestly, whether this script is still a script or should already be something else — and if it should, that decision is written down, not deferred indefinitely.
State the script's failure behavior (exit codes, what stops it), whether it's confirmed idempotent on a second run, and whether it has a working dry-run mode.
Name the honest gap — usually a code path that hasn't been tested against a mid-run interruption, or a dry-run mode that's drifted from the real logic — rather than claiming the script is fully production-safe.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub arjunprabhulal/devops-skills --plugin devops-skills88 skills in this plugin
/alertingCovers designing alerts that page a human only when a human needs to act — symptom-based alerting over cause-based, multi-window burn-rate alerts on error budgets, severity tiers that route between page/ticket/dashboard, requiring every page to link a runbook, and tuning out alert fatigue. Use this whenever the user is writing a new alert rule, asking why on-call is paged too often or missing real incidents, choosing an alert threshold, or designing severity routing. For the SLO the burn-rate math comes from use `slo-definition`, and for what a runbook should contain use `runbooks`./api-gatewayCovers the managed front-door pattern for APIs — request routing, centralized auth, rate limiting and quotas, request/response shaping, and recognizing when a gateway helps versus becomes a bottleneck or single point of failure. Use this whenever the user is designing an API entry point, adding rate limits or quotas, centralizing auth for several backend services, transforming a request between an external and internal contract, or debugging a gateway timeout. For east-west traffic between internal services use `service-connectivity`, and for token issuance details use `iam-access-management`./argocd-operationsCovers running Argo CD day to day — structuring app-of-apps, choosing sync policies and waves, reading health versus sync status correctly, and unsticking a degraded or hung Application. Use this whenever the user mentions Argo CD, an Application stuck "Progressing" or "OutOfSync," app-of-apps or ApplicationSets, sync waves and hooks, or asks why a deploy shows synced but the workload is unhealthy. For the underlying model this tool implements use `gitops`; for automated canary analysis on top of it use `progressive-delivery`; for the workloads it manages use `kubernetes-operations`.