Skip to content
Back to skills

Secret Rotation

ASecurity

Validate, rotate, and batch-check secrets against their providers. Use when the user mentions expired keys, secret rotation, validation, CI secret checks, stale credentials, or provider liveness testing.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsawstestinggitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add I4cTime/q-ring --skill secret-rotation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Secret Rotation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Secret Rotation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/i4ctime-secret-rotation/badge)](https://www.skillsdirectory.com/skills/i4ctime-secret-rotation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: secret-rotation
description: Validate, rotate, and batch-check secrets against their providers. Use when the user mentions expired keys, secret rotation, validation, CI secret checks, stale credentials, or provider liveness testing.
---

# Secret Rotation and Validation

## When to Use

Activate when the user:
- Mentions expired, stale, or invalid secrets
- Asks to rotate or refresh API keys
- Wants to validate that secrets are still working
- Needs CI-friendly batch validation
- Asks about secret health or decay status

## Workflow

### 1. Health check

Call `health_check` to get a full report of all secrets:
- **Expired** — TTL elapsed or `expiresAt` passed
- **Stale** — over 75% of lifetime consumed
- **Healthy** — within acceptable range
- Also returns anomaly count and overall status

### 2. Validate individual secrets

Call `validate_secret` with a key name. Supported providers with auto-detection:
- **OpenAI** — keys starting with `sk-`
- **Stripe** — keys starting with `sk_live_` or `sk_test_`
- **GitHub** — tokens starting with `ghp_`, `gho_`, `ghs_`
- **AWS** — keys starting with `AKIA`
- **Generic HTTP** — any URL-based validation endpoint

Returns: `valid`, `invalid`, `error`, or `unknown` with latency and provider info.

### 3. Rotate expired secrets

Call `rotate_secret` with the key name. q-ring will:
- Attempt provider-native rotation if a provider is configured
- Fall back to local generation using the secret's `rotationFormat` and `rotationPrefix`
- Update the stored value and fire any registered hooks

### 4. Batch CI validation

Call `ci_validate_secrets` for a structured pass/fail report suitable for CI pipelines. Returns:
- Per-secret validation results
- Rotation recommendations
- Overall pass/fail status

### 5. List available providers

Call `list_providers` to see all supported validation providers with their prefix patterns and descriptions.

### 6. Dashboard and autonomous scans

- **`status_dashboard`** — starts the local quantum status dashboard (browser UI on localhost).
- **`agent_scan`** — one-shot health scan JSON (same family as CLI `qring agent --once`).

## Best Practices

- Store secrets with `--rotation-format` (e.g., `api-key`, `password`, `uuid`) to enable automatic rotation
- Set `--provider` metadata for automatic validation detection
- Run `ci_validate_secrets` in CI pipelines to catch expired credentials before deployment

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.