secrets-management
Skill0 starsChanged 8 months agoMITView on GitHub
Use when handling API keys, passwords, connection strings, or credentials
- Reads credentials
33 other projects use a version of this.
Adopted by
Most recently taken up by
- d-o-hub/github-template-ai-agentstheir own version, first seen Nov 3, 2026
- sammasak/skillstheir own version, first seen Oct 17, 2026
- sammasak/claude-code-skillstheir own version, first seen Oct 15, 2026
- abevz/devops-skillstheir own version, first seen Oct 15, 2026
- kitloomlk-stack/code-review-security-kittheir own version, first seen Oct 15, 2026
- kitloomlk-stack/devops-cloud-kittheir own version, first seen Oct 15, 2026
Used with
Projects with it also use background-jobs, agent-security and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
YepAPISkillbackground-jobs
Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.
Also in 3 projects that use this
mattpartidaSkillagent-security
Review and harden OpenClaw/Hermes agent security, including tool permissions, elevated access, exec approvals, allowlists, sandboxing, browser and web exposure, prompt-injection risk, model risk, persistence, and personal-vs-shared trust boundaries. Use when the task is primarily about agent or runtime security rather than host firewall or OS hardening.
Also in 3 projects that use this
harperaaSkillrate-limiting
Implement rate limiting to prevent brute force attacks, spam, and resource abuse. Use this skill when you need to protect endpoints from automated attacks, prevent API abuse, limit request frequency, or control infrastructure costs. Triggers include "rate limiting", "rate limit", "brute force", "prevent spam", "API abuse", "resource exhaustion", "DoS", "withRateLimit", "too many requests", "429 error".
Also in 3 projects that use this
MicrosoftSkillsupply-chain-security
Activate when reviewing or modifying dependency resolution, lockfile schema, package downloaders, signature/integrity checks, file integration cleanup, or anything that could expose APM to dependency confusion, typosquatting, malicious packages, or token leakage.
Also in 3 projects that use this
etewiahSkille2e-testing
Playwright E2E testing and Lighthouse performance auditing. Use when setting up E2E tests, running Playwright tests, performing Lighthouse audits, or debugging E2E test failures.
Also in 4 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 4 projects that use this
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- nahid-sparktales/agent-dispatcher★ 59same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- Fandry96/k3-agentic-skills★ 27same name
- xfstudio/skills★ 9same name
- YepAPI/skills★ 8same name
- ai4brands-design/claude-skills★ 2same name
- CodeWithBehnam/cc-docs★ 2same name
- d-o-hub/github-template-ai-agents★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Ghosteken/agent-harness★ 2same name
23 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- access-controlSkill
- accessibilitySkill
- accessibility-testingSkill
- api-securitySkill
- authenticationSkill
- dependency-securitySkill
- injection-preventionSkill
- input-validationSkill
- security-contextSkill
- security-headersSkill
- xss-csrfSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
No secret should ever appear in source code, logs, or error messages.
- Distinctive: line 14
Not in code. Not in config files committed to git.
- Distinctive: line 65
If a secret appears in a commit, log, or error message, it's compromised.
“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secrets Management
No secret should ever appear in source code, logs, or error messages. Use environment variables or a vault.
Related: authentication, dependency-security, security-context
Rule 1: Never Hardcode Secrets
Not in code. Not in config files committed to git. Not in comments.
// WRONG — API key in source code
const apiKey = 'sk-1234567890abcdef';
// RIGHT — from environment variable
const apiKey = process.env.API_KEY;
if (!apiKey) throw new Error('API_KEY environment variable is required');# WRONG — password in settings file
DATABASE_PASSWORD = "hunter2"
# RIGHT — from environment
DATABASE_PASSWORD = os.environ["DATABASE_PASSWORD"]Rule 2: Add Secrets to .gitignore
Prevent accidental commits. These files should never be tracked.
# MUST be in .gitignore
.env
.env.local
.env.production
*.pem
*.key
credentials.json
service-account.jsonRule 3: Use Different Secrets Per Environment
Dev, staging, and production must use separate credentials.
# WRONG — same API key everywhere
API_KEY=sk-production-key # used in dev too
# RIGHT — environment-specific secrets
# .env.development
API_KEY=sk-dev-key-safe-to-rotate
# Production: set via hosting provider, vault, or CI/CD secretsRule 4: Rotate Secrets on Exposure
If a secret appears in a commit, log, or error message, it's compromised. Rotate immediately.
# If a secret was committed:
# 1. Rotate the secret FIRST (revoke old key, generate new)
# 2. Then clean git history (but assume the old secret is compromised)
# Cleaning history alone is NOT sufficient — bots scrape commits in real timeRule 5: Never Log Secrets
Sanitize log output. Mask sensitive values.
// WRONG — logs the full connection string
logger.info(`Connecting to ${connectionString}`);
// RIGHT — mask sensitive parts
logger.info(`Connecting to ${connectionString.replace(/\/\/.*@/, '//***@')}`);# WRONG — logs the API key
logging.info(f"Using key: {api_key}")
# RIGHT — log that a key exists, not the value
logging.info(f"Using key: {api_key[:4]}...{api_key[-4:]}")Quick Reference
| Do | Don't |
| Use environment variables | Hardcode secrets in source |
Add .env to .gitignore | Commit secret files to git |
| Use separate secrets per environment | Share production keys in dev |
| Rotate immediately on exposure | Assume cleaning git history is enough |
| Mask secrets in logs | Log full connection strings or keys |
| Validate that required secrets exist at startup | Silently fail with undefined values |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

