secrets-rotation

aj-geddes/useful-ai-prompts · updated Apr 8, 2026

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill secrets-rotation
0 commentsdiscussion
summary

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

skill.md

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:

Guide Contents
Node.js Secrets Manager with Rotation Node.js Secrets Manager with Rotation
Python Secrets Rotation with Vault Python Secrets Rotation with Vault
Kubernetes Secrets Rotation Kubernetes 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

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.727 reviews
  • Chaitanya Patil· Dec 24, 2024

    secrets-rotation reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Yuki Johnson· Dec 4, 2024

    Solid pick for teams standardizing on skills: secrets-rotation is focused, and the summary matches what you get after install.

  • Kofi Gupta· Nov 23, 2024

    We added secrets-rotation from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Piyush G· Nov 15, 2024

    I recommend secrets-rotation for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Kabir Sanchez· Oct 14, 2024

    secrets-rotation fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Shikha Mishra· Oct 6, 2024

    Useful defaults in secrets-rotation — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Yusuf Martin· Sep 25, 2024

    secrets-rotation reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Kaira Perez· Aug 24, 2024

    secrets-rotation reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Michael Shah· Aug 16, 2024

    Registry listing for secrets-rotation matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Chinedu Diallo· Jul 15, 2024

    I recommend secrets-rotation for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 27

1 / 3