Credential Rotation Runbook + Consumption Checks
None of this shows in a config review; all of it shows the first time something real is attempted.
$29
Works with the AI Agents you already use
Credential Rotation Runbook + Consumption Checks
Example session with this skill installed
Audit my systemd service for unused credentials. The unit is at /etc/systemd/system/api.service and source is in ./src.
- Read your context and instructions
- Compiled the credential rotation runbook
I have audited the systemd unit files and source code for credential consumption. The scan identified one critical mismatch where a delivered credential is not being read by the application.
Credential Consumption Audit Report
| Finding | Type | Details |
|---|---|---|
FAIL | id-mismatch | Environment=STRIPE_KEY=%d/stripe-token points to an ID not provided by LoadCredential |
FAIL | not-consumed | LoadCredential=webhook_secret is delivered but no reference found in ./src |
note | no-variable | LoadCredential=db_password is loaded but no Environment variable points to it |
Technical Summary
- Units scanned:
/etc/systemd/system/api.service - Source root:
./src - Status: 2 failures, 1 note.
The id-mismatch on the Stripe key will cause the application to find an empty or missing file at the expected path, likely leading to a startup failure or null pointer when the SDK initializes. The webhook_secret appears to be legacy configuration that can be safely removed from the unit file to reduce attack surface.
Next steps
- Rename the
LoadCredentialID in the unit file to match thestripe-tokensuffix used in theEnvironmentpath. - Search the codebase for dynamic references to
webhook_secretbefore removing it from the deployment configuration. - Run
node scripts/check-secret-bytes.mjson the new Stripe key before applying the fix.
Connects securely to your tools. The creator never sees your data.
About this skill
Rotations fail quietly. The credential file, the systemd drop-in and the gateway entry are all in place, and the application never reads the variable, so alerts stop without a log line. Or the LoadCredential id and the Environment path differ by one character. Or the secret pasted into a console arrived with eighteen invisible bullets and the SDK refuses the header. None of this shows in a config review; all of it shows the first time something real is attempted.
Runbook (reference/runbook.md): what rotates and whether it can be rotated without downtime (gateway tokens, payment keys, webhook secrets, symmetric HMAC, provider keys, SSH keys, and why app signing keys are never rotated); secret store first; LoadCredential delivery; the three design properties that make rotation a file write (per-use reads with trim, throw on non-2xx, idempotency keys); dual-accept rollover; the second-endpoint variation for webhook secrets and why the old endpoint must be deleted; the three verification traps as incident patterns; verify by effect, never by configuration; emergency revocation order; the checklist.
check-consumption.mjs: parses unit files and drop-ins (LoadCredential, LoadCredentialEncrypted, SetCredential, quoted and unquoted Environment lines) and scans the source tree (skipping node_modules and build output) to report not-consumed, id-mismatch and no-variable; exit 1 on blocking findings, --json for pipelines.
check-secret-bytes.mjs: BOM, leading and trailing whitespace, control and invisible characters, non-ASCII (U+2022 bullets named), internal whitespace, base64 look-alikes; --fix trims when a trim is safe; --base64 wraps a value for a hostile paste path with decode recipes for sh and PowerShell. Reads files or stdin, never argv.
rotation-plan.mjs: from a JSON inventory, a Markdown checklist per credential with the right rollover shape and the proof-by-effect, --only one credential, --emergency to put revocation first.
5 tests including a two-drop-in unit set with a typo'd id and a variable mentioned only in node_modules. Node 18+, no packages, no network. Engineering guidance, not a compliance certification.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Supports systemd unit syntax only. Cannot detect credentials referenced via dynamic variable name construction in code. Requires Node 18+.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
- Software
Node.js 18+