Skip to content
Back to skills

Api Key Management

ASecurity

Build secure programmatic API keys with clear prefixes, salted hashes, narrow scopes, expiry, and zero-downtime rotation

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsgitapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill api-key-management --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Key Management?

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

Security grade badge for Api Key Management
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-api-key-management-anvil/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-api-key-management-anvil)

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: api-key-management
description: Build secure programmatic API keys with clear prefixes, salted hashes, narrow scopes, expiry, and zero-downtime rotation
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# API key management

Use when designing developer API tokens, service accounts, webhook secrets, or CLI access tokens.

## Generation and storage
- Prefix keys unambiguously (`app_live_...`, `app_test_...`) so secret scanners can identify leaks accurately before code hits Git.
- Display the raw secret **once** on creation only, and persist solely a SHA-256 (or HMAC) hash + non-secret short prefix/last-4 display suffix in the database.
- Enforce constant-time hash comparison during verification and cache invalidations cleanly.

## Scoping and lifecycle
- Bind every key to granular permission scopes, optional environment/workspace limits, and configurable expiration timestamps.
- Track `lastUsedAt` asynchronously without writing a blocking DB update on every API read.
- Support multiple active keys per integration so teams can roll keys safely with grace overlap before revoking old keys.

## Verify
Confirm plaintext tokens never persist in DB/logs, revoked/expired keys return `401`, out-of-scope keys return `403`, and overlapping key rotation succeeds cleanly.

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.