Skip to content
Back to skills

Create Key

ASecurity

Generate a URL-safe password or opaque secret key for connection URLs and config files

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
developmentshelldockerapidatabase

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add nirecom/agents --skill create-key --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Key?

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

Security grade badge for Create Key
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nirecom-create-key/badge)](https://www.skillsdirectory.com/skills/nirecom-create-key)

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: create-key
description: Generate a URL-safe password or opaque secret key for connection URLs and config files
context: fork
---

Generate a cryptographically random key or password for use in configuration.

## Connection URL Passwords

When embedding a password in a connection URL (DATABASE_URL, REDIS_URL, AMQP URL, etc.),
the password component must be URL-safe. Standard base64 (`+/=`) breaks URL parsers
(real example: Prisma `invalid port number`).

**Allowed formats:**
- `hex` (recommended — no special characters)
  - Linux/macOS: `openssl rand -hex 32`
  - PowerShell: `-join ((1..32)|%{'{0:x2}' -f (Get-Random -Max 256)})`
- `base64url` (no padding): generate standard base64, then replace `+` with `-`, `/` with `_`, and drop every `=` (present that transformation to the user as one command for their own shell; never issue it yourself)
- Any string: **percent-encode** the password component before embedding in the URL

**Prohibited:** standard base64 (`+/=`) embedded unencoded in a URL password.

**Variable separation (preferred):** Provide both a composed URL and separate
`POSTGRES_PASSWORD` / `POSTGRES_USER` / `POSTGRES_HOST` variables — avoids URL escaping
issues entirely.

## Opaque Secrets

For secrets not embedded in a URL (NextAuth secret, salt, JWT secret, etc.):
`openssl rand -base64 32` or `openssl rand -hex 32` — either is fine.

## Handling and Storage

Once a secret appears in chat, it persists in conversation logs, screenshots, and terminal
scrollback. To minimize exposure:

1. **User-side generation preferred** — present the generation command; the user runs it.
2. **Secret manager preferred** (1Password CLI, Docker secrets, age-sops, doppler, etc.).
3. If Claude must present the value: development secrets only — never production.
4. Remind the user to store the value in a password manager; warn that worktree deletion
   can silently destroy dotenv files containing the only copy.

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 development →

Comments

Loading comments…

Newsletter

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