Skip to content
Back to skills

Crypto

ASecurity

This skill covers AES-256-GCM encryption for provider API keys. Trigger: Load this skill when handling crypto operations for API keys.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 26, 2026
ai-agentspythonbashdockerapisecurity

Works with

  • api

Security analysis

A100/100

Scanned September 26, 2026

npx -y skills add JNZader/repoforge --skill crypto --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Crypto?

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

Security grade badge for Crypto
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnzader-crypto/badge)](https://www.skillsdirectory.com/skills/jnzader-crypto)

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: encrypt-api-keys
description: >
  This skill covers AES-256-GCM encryption for provider API keys.
  Trigger: Load this skill when handling crypto operations for API keys.
license: Apache-2.0
metadata:
  author: repoforge
  version: "1.0"
  complexity: medium
  token_estimate: 350
  dependencies: []
  related_skills: []
  load_priority: high
---

<!-- L1:START -->
# encrypt-api-keys

This skill covers AES-256-GCM encryption for provider API keys.

**Trigger**: Load this skill when handling crypto operations for API keys.
<!-- L1:END -->

<!-- L2:START -->
## Quick Reference

| Task | Pattern |
|------|---------|
| Derive user key | `derive_user_key` |
| Encrypt API key | `encrypt_key` |

## Critical Patterns (Summary)
- **Derive User Key**: Generate a secure key for user-specific encryption.
- **Encrypt API Key**: Securely encrypt an API key using AES-256-GCM.
<!-- L2:END -->

<!-- L3:START -->
## Critical Patterns (Detailed)

### Derive User Key

Generate a secure key for user-specific encryption using the `derive_user_key` function.

```python
from apps.server.app.services.crypto import derive_user_key

user_key = derive_user_key(user_id="example_user")
```

### Encrypt API Key

Securely encrypt an API key using AES-256-GCM with the `encrypt_key` function.

```python
from apps.server.app.services.crypto import encrypt_key

encrypted_key = encrypt_key(api_key="my_secret_api_key", user_key=user_key)
```

## When to Use

- When you need to securely store API keys for different providers.
- When encrypting sensitive information before transmission.

## Commands

```bash
docker-compose run app python apps/server/app/main.py
```

## Anti-Patterns

### Don't: Hardcode API Keys

Hardcoding API keys in the source code exposes them to security risks.

```python
# BAD
api_key = "my_secret_api_key"
```
<!-- L3:END -->

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.

Comments

Loading comments…

Newsletter

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