rotate-api-keys
Installation
SKILL.md
Rotate API Keys
Input Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
old_api_key |
Yes | The API key to be replaced (the old or compromised key) | sk-old-abc123 |
new_api_key |
Yes | The new API key to replace the old one with | sk-new-xyz789 |
target_directories |
No | Directories to search for .env files and keystores (defaults to home directory and common project paths) | ~/Herd ~/Code |
Procedure
-
Ask for the old and new API keys if not provided
-
Identify all target files — .env files, keystore files (
keys.json), and logs containing credentials:find {{SEARCH_PATH}} -name "*.env" -o -name "keys.json" -o -name "*.log"