/gpg-ops:gpg-generate-keyfrom gpg-ops
Generate a new GPG keypair (primary signing key + encryption subkey) on the local GnuPG keyring. Use when the user wants to create a new GPG identity, set up signing for git commits, or create a key for encrypted email. Confirms key parameters before generation; defaults to ed25519/cv25519 with no expiry unless the user specifies otherwise.
Ships in gpg-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The user wants to create a new GPG key — for signing git commits, encrypting files, signing releases, or setting up an encrypted-email identity.
gpg --version | head -1
If gpg isn't installed, stop and ask the user to install GnuPG (sudo apt install gnupg on Debian/Ubuntu).
Ask the user for (with sensible defaults):
ed25519 (fast, modern, smaller). Offer rsa4096 if they want maximum compatibility with old systems.0 (no expiry). Suggest 2y if the user is unsure — it can be extended later.For ed25519 (default), use --quick-generate-key which is non-interactive apart from the passphrase prompt:
gpg --quick-generate-key "Real Name <[email protected]>" ed25519 sign,cert <expiry>
Then add an encryption subkey (ed25519 primaries can't encrypt directly):
KEYID=$(gpg --list-secret-keys --with-colons "<email>" | awk -F: '/^sec:/ {print $5; exit}')
gpg --quick-add-key "$KEYID" cv25519 encr <expiry>
For RSA, a single command suffices:
gpg --quick-generate-key "Real Name <[email protected]>" rsa4096 default <expiry>
For finer control (multiple UIDs, custom subkey layout), use gpg --full-generate-key and let the user drive the interactive prompts.
Show the user the new key fingerprint and key ID:
gpg --list-secret-keys --keyid-format=long "<email>"
Offer next steps:
gpg-export-public-key skill).git config --global user.signingkey <KEYID>
git config --global commit.gpgsign true
~/.gnupg/openpgp-revocs.d/<FINGERPRINT>.rev — recommend backing this up offline.--passphrase on the command line.~/.gnupg/ — that's the user's keyring, not plugin data. Don't touch.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
7 skills in this plugin
/gpg-decryptDecrypt a GPG-encrypted file (.gpg or .asc) using the local keyring. Handles both asymmetric (key-encrypted) and symmetric (passphrase-encrypted) ciphertext — GPG auto-detects which. Use when the user receives an encrypted file or has at-rest encrypted backups they need to read./gpg-encryptEncrypt a file or text with GPG to one or more recipients (asymmetric) or with a passphrase (symmetric). Use when the user wants to send confidential data to someone whose public key they have, or lock a file with a password. Defaults to ASCII-armored output and refuses to encrypt to keys with marginal/unknown trust unless the user confirms./gpg-export-public-keyExport a GPG public key in ASCII-armored form, ready to share, paste into GitHub, or upload to a keyserver. Use when the user wants to publish their public key, share it with a collaborator, or register it for signed commits. Selects the key by email, key ID, or fingerprint./gpg-list-keysList GPG keys on the local keyring — public keys, secret keys, or both. Use when the user wants to see what keys they have, find a key ID or fingerprint, or check whether a contact's public key is already imported before encrypting to them./gpg-signSign a file or text with GPG — detached signature, clear-signed, or inline. Use when the user wants to publish a release artefact with a `.sig` file, prove authorship of a document, or sign a plain-text message that recipients can verify with their copy of their public key./gpg-verifyVerify a GPG signature on a file or clear-signed text. Use when the user has downloaded a release artefact + `.sig`/`.asc` and wants to confirm authenticity, or received a clear-signed message and wants to check it. Distinguishes "good signature, untrusted key" from "good signature, trusted key" — both are cryptographically valid; only the latter proves identity.gpg-ops@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin gpg-ops