Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Secrets Rotation

  • 404 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

secrets-rotation is a Claude Code skill that helps developers plan and execute rotation of API keys, database passwords, and signing credentials with zero-downtime cutover, audit trails, and rollback procedures.

About

secrets-rotation is a prompt-driven skill from aj-geddes/useful-ai-prompts for operational credential lifecycle management. It guides teams through inventorying secrets, staging new values, dual-write or blue-green cutover, service restarts, and verification steps so API keys, database passwords, and signing tokens rotate without outages. Security and platform engineers use secrets-rotation after leaks, policy mandates, or scheduled compliance windows. The skill emphasizes audit trails and rollback paths so rotation events remain traceable and reversible if downstream services fail authentication after cutover.

  • Rotation runbooks
  • Dual-credential cutover
  • Vault and KMS integration
  • Audit logging
  • Emergency rollback

Secrets Rotation by the numbers

  • 404 all-time installs (skills.sh)
  • Ranked #555 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill secrets-rotation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs404
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you rotate API keys without downtime?

Plan and execute secrets rotation for API keys, database passwords, and signing credentials with zero-downtime cutover, audit trails, and rollback procedures.

Who is it for?

Platform or security engineers rotating production API keys, database passwords, or signing credentials under compliance or incident-response deadlines.

Skip if: Initial secret storage setup or teams with no production services requiring coordinated multi-service credential cutover.

When should I use this skill?

A developer must rotate API keys, database passwords, or signing credentials with zero-downtime cutover, auditing, and rollback planning.

What you get

Rotation runbook, staged credential inventory, cutover checklist, audit trail notes, and rollback procedure for API keys, DB passwords, and signing secrets.

  • Secrets rotation runbook
  • Audit trail checklist
  • Rollback procedure document

Files

SKILL.mdMarkdownGitHub ↗

Secrets Rotation

Table of Contents

Overview

Implement automated secrets rotation strategy for credentials, API keys, certificates, and encryption keys with zero-downtime deployment and comprehensive audit logging.

When to Use

  • API key management
  • Database credentials
  • TLS/SSL certificates
  • Encryption key rotation
  • Compliance requirements
  • Security incident response
  • Service account management

Quick Start

Minimal working example:

// secrets-manager.js
const AWS = require("aws-sdk");
const crypto = require("crypto");

class SecretsManager {
  constructor() {
    this.secretsManager = new AWS.SecretsManager({
      region: process.env.AWS_REGION,
    });

    this.rotationSchedule = new Map();
  }

  /**
   * Generate new secret value
   */
  generateSecret(type = "api_key", length = 32) {
    switch (type) {
      case "api_key":
        return crypto.randomBytes(length).toString("hex");

      case "password":
        // Generate strong password
        const chars =
          "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Node.js Secrets Manager with RotationNode.js Secrets Manager with Rotation
Python Secrets Rotation with VaultPython Secrets Rotation with Vault
Kubernetes Secrets RotationKubernetes Secrets Rotation

Best Practices

✅ DO

  • Automate rotation
  • Use grace periods
  • Verify new secrets
  • Maintain rotation audit trail
  • Implement rollback procedures
  • Monitor rotation failures
  • Use managed services (AWS Secrets Manager)
  • Test rotation procedures

❌ DON'T

  • Hardcode secrets
  • Share secrets
  • Skip verification
  • Rotate without grace period
  • Ignore rotation failures
  • Store secrets in version control

Related skills

FAQ

What credentials does secrets-rotation address?

secrets-rotation covers API keys, database passwords, and signing credentials used in production services. The skill plans staged replacement, verification, and rollback so authentication keeps working during rotation.

How does secrets-rotation prevent outages?

secrets-rotation uses zero-downtime cutover patterns such as dual-credential windows and ordered service updates. Teams verify each dependent service before retiring old secrets and keep rollback steps ready if auth fails.

Securitysecretsappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.