Skip to content
Skills Library
Security · Building & coding

secrets-management

/secrets-management

Manages API keys, credentials, and sensitive configuration using secrets.json patterns with environment variable fallbacks. Use when working with API keys, credentials, .env files, or any sensitive configuration.

Repository
Lattice ↗
Licence
AGPL-3.0
Last repository change
13.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.10.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What it does and when to use it

Manages API keys, credentials, and sensitive configuration using secrets.json patterns with environment variable fallbacks. Use when working with API keys, credentials, .env files, or any sensitive configuration.

Original author description

Manages API keys, credentials, and sensitive configuration using secrets.json patterns with environment variable fallbacks. Use when working with API keys, credentials, .env files, or any sensitive configuration.

How it works

  1. When to Activate
  2. Core Principles
  3. Implementation Pattern
  4. Setup Checklist
  5. Security Best Practices
  6. Key Format Reference
  7. Related Resources
Original SKILL.md headings · 108 lines, 360 words
SKILL.md preview
---
name: secrets-management
description: Manages API keys, credentials, and sensitive configuration using secrets.json patterns with environment variable fallbacks. Use when working with API keys, credentials, .env files, or any sensitive configuration.
---

# Secrets Management Skill

## When to Activate

Activate this skill when:
- Setting up API keys or credentials
- Creating secrets.json files
- Implementing secrets loading patterns
- Working with .env files
- Integrating external APIs requiring authentication
- Ensuring credentials are not committed to git

## Core Principles

### Security Fundamentals
- **NEVER** hardcode API keys in source code
- **ALWAYS** add secrets.json to .gitignore immediately
- **ALWAYS** provide a secrets_template.json for setup reference
- Use environment variable fallbacks for CI/CD compatibility

### Standard File Structure

```
project/
├── secrets.json          # Actual secrets (NEVER commit)
├── secrets_template.json # Template with placeholder values (commit this)
├── .gitignore           # Must include secrets.json
└── .env                 # Alternative for env vars (also gitignored)
```

## Implementation Pattern

### secrets.json Format

```json
{
  "anthropic_api_key": "sk-ant-api03-...",
  "openrouter_api_key": "sk-or-v1-...",
  "openai_api_key": "sk-...",
  "database_url": "postgresql://user:pass@localhost/db",
  "comment": "Add your API keys here. Keep this file private."
}
```

### Python Loading Pattern

```python
import os
import json
from pathlib import Path

def load_secrets():
    """Load secrets from secrets.json with env var fallback."""
    secrets_path = Path(__file__).parent / "secrets.json"
    try:
        with open(secrets_path, 'r') as f:
            return json.load(f)
    except (FileNotFoundError, json.JSONDecodeError):
        return {}

SECRETS = load_secrets()

# Use with environment variable fallback
API_KEY = SECRETS.get("anthropic_api_key", os.getenv("ANTHROPIC_API_KEY", ""))
```

## Setup Checklist

1. Create secrets_template.json with placeholder values
2. Copy to secrets.json and add real credentials
3. Add secrets.json to .gitignore
4. Implement secrets loading in application
5. Verify git status shows secrets.json as untracked

## Security Best Practices

### DO ✅
- Store keys in secrets.json
- Add to .gitignore immediately
- Provide template files for setup
- Use environment variable fallbacks
- Rotate keys after team changes

### DON'T ❌
- Hardcode API keys
- Commit actual credentials
- Log full API keys
- Share keys via email/chat

## Key Format Reference

| Provider | Format |
|----------|--------|
| Anthropic | `sk-ant-api03-...` |
| OpenRouter | `sk-or-v1-...` |
| OpenAI | `sk-...` |
| AWS Access | `AKIA...` |

## Related Resources

See `AgentUsage/secrets_management.md` for complete documentation including:
- Advanced loading patterns with validation
- .env file integration
- Automated testing patterns
- Emergency key rotation procedures
- Production deployment strategies

Versions

RepositoryScoreLicence
This page · AutumnsGrove/Lattice100AGPL-3.0
nikospavlopoulos/devops-mutant-powers100MIT
rootcastleco/rei-skills100MIT
ILIV007/prime-skill100MIT
OKHP3/skillz100MIT
nimadorostkar/Claude-Skills-collection100MIT
thisiskurubaran/DevSecOps100MIT
claude-dev-suite/claude-dev-suite100MIT
IbrahimCodeur/saas-blind-security100MIT

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 4ba935a8b619 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 5 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100varlock
    Secure environment variable management with Varlock. Use when handling secrets, API keys, credentials, or any sensitive configuration. Ensures secrets are never exposed in terminal, logs, or LLM context. Provides guidance around integrating varlock into a project,…
  • 100env-secrets-manager
    Use this skill when the user wants to manage environment variables, secrets, API keys, .env files, deployment configuration, secret rotation, credential hygiene, local development setup, or secret leakage prevention. Trigger phrases include ".env," "environment variables,"…
  • 100envsave
    Use EnvSave to securely retrieve secrets via opaque keys instead of hardcoding them. Trigger whenever code needs API keys, tokens, passwords, database URLs, connection strings, webhook secrets, credentials, environment variables, or any sensitive value. Also trigger when you see…
  • 95ghost-scan-secrets
    Ghost Security - Secrets and credentials scanner. Scans codebase for leaked API keys, tokens, passwords, and sensitive data. Detects hardcoded secrets and generates findings with severity and remediation guidance. Use when the user asks to check for leaked secrets, scan for…
  • 100scanning-for-secrets
    Detect exposed secrets, API keys, and credentials in code. Use when auditing for secret leaks. Trigger with 'scan for secrets', 'find exposed keys', or 'check credentials'.
  • 100scanning-for-secrets
    Detect exposed secrets, API keys, and credentials in code. Use when auditing for secret leaks. Trigger with 'scan for secrets', 'find exposed keys', or 'check credentials'.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.