Install
openclaw skills install key-rotation-plannerPlan and track cryptographic key rotations for API keys, encryption keys, signing keys, and service credentials. Inventory all keys, assess rotation urgency, generate rotation runbooks, and verify post-rotation health.
openclaw skills install key-rotation-plannerManage cryptographic key rotations without breaking production. Inventory all keys and credentials, assess rotation urgency based on age, exposure risk, and compliance requirements, generate step-by-step rotation runbooks, and verify nothing breaks after rotation.
Use when: "rotate keys", "key rotation plan", "API key rotation", "credential rotation", "how old are our keys", "key management audit", "secret hygiene", or before compliance audits requiring key rotation evidence.
inventory — Catalog All Keys and Credentials# Find hardcoded secrets (should be 0)
rg -i "(api_key|apikey|secret_key|access_key|private_key|token)\s*[=:]\s*['\"][a-zA-Z0-9+/=_-]{16,}" \
--type-not binary -g '!node_modules' -g '!vendor' -g '!*.test.*' -g '!*.example*' 2>/dev/null
# Find environment variable references for secrets
rg -i "(API_KEY|SECRET|TOKEN|PASSWORD|PRIVATE_KEY|ACCESS_KEY|CLIENT_SECRET)" \
--type-not binary -g '!node_modules' -g '!vendor' 2>/dev/null | \
grep -v "test\|example\|mock\|fake\|dummy" | head -30
# Check secrets manager
aws secretsmanager list-secrets 2>/dev/null | python3 -c "
import json, sys
secrets = json.load(sys.stdin)['SecretList']
for s in secrets:
last_rotated = s.get('LastRotatedDate', 'NEVER')
last_changed = s.get('LastChangedDate', 'Unknown')
print(f'{s[\"Name\"]}: last_rotated={last_rotated}, last_changed={last_changed}')
"
# Vault secrets
vault secrets list 2>/dev/null
vault list secret/ 2>/dev/null
For each key/credential:
| Factor | Score | Criteria |
|---|---|---|
| Age | 🔴 5 | Never rotated or > 1 year |
| Age | 🟡 3 | 6-12 months |
| Age | 🟢 1 | < 6 months |
| Exposure | 🔴 5 | In code/git history |
| Exposure | 🟡 3 | In env file on server |
| Exposure | 🟢 1 | In secrets manager |
| Scope | 🔴 5 | Admin/root access |
| Scope | 🟡 3 | Write access |
| Scope | 🟢 1 | Read-only |
| Compliance | 🔴 5 | Required by PCI/SOC2 |
| Compliance | 🟢 1 | No compliance requirement |
Priority = sum of scores. Rotate highest priority first.
# Key and Credential Inventory
## Summary
- Total keys/credentials: 34
- Overdue for rotation: 12 (🔴)
- Due soon (30 days): 5 (🟡)
- Healthy: 17 (🟢)
## Critical (rotate immediately)
| Key | Type | Age | Last Rotated | Location | Priority |
|-----|------|-----|-------------|----------|----------|
| STRIPE_SECRET_KEY | API key | 14 months | Never | .env (server) | 18/20 🔴 |
| DB_PASSWORD (prod) | Password | 11 months | 2025-05-15 | Vault | 15/20 🔴 |
| JWT_SIGNING_KEY | Signing key | 8 months | 2025-08-01 | env var | 14/20 🔴 |
## Rotation Schedule
| Key | Next Rotation | Responsible | Runbook |
|-----|--------------|-------------|---------|
| STRIPE_SECRET_KEY | ASAP | @payments-team | See below |
| DB_PASSWORD | May 2026 | @infra | DB password rotation runbook |
rotate — Generate Rotation RunbookFor each key type, generate a step-by-step rotation runbook:
API Key Rotation (zero-downtime):
Database Password Rotation:
JWT Signing Key Rotation (asymmetric):
verify — Post-Rotation Health CheckAfter rotation, verify:
schedule — Set Up Rotation RemindersGenerate calendar events or ticketing system reminders: