Skip to content
Agentmart
Submit a tool

gpg

Use this skill when encrypting, decrypting, signing, or verifying files and data with GPG (GnuPG / PGP).

Skill by jason-riddle

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jason-riddle-gpg

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use this skill when encrypting, decrypting, signing, or verifying files and data with GPG (GnuPG / PGP). Triggers on requests like "encrypt a file with GPG", "decrypt a PGP message", "sign a file with GPG", "verify a GPG signature", "generate a GPG key", "export a public key", "import a GPG key", "manage the GPG keyring", "set key trust", "revoke a key", or any GPG/PGP key management or cryptography task.

Use cases: data, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/gpg

What's inside

Skill name
gpg
Description
Use this skill when encrypting, decrypting, signing, or verifying files and data with GPG (GnuPG / PGP). Triggers on requests like "encrypt a file with GPG", "decrypt a PGP message", "sign a file with GPG", "verify a GPG signature", "generate a GPG key", "export a public key", "import a GPG key", "manage the GPG keyring", "set key trust", "revoke a key", or any GPG/PGP key management or cryptography task.
License
MIT
Instructions
260 lines in SKILL.md · view on GitHub

Before installing

  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Files (1)

  • SKILL.md

SKILL.md (first lines)

# gpg

Encrypt, decrypt, sign, verify, and manage keys using `gpg` (GnuPG).

## Orientation

Run the following commands before proceeding:

```bash
which -a gpg
which gpg
gpg --version
gpg --list-keys
gpg --list-secret-keys
```

## Key Generation

### Non-interactive (batch mode — preferred in agent contexts)

```bash
cat > keygen-batch.txt << 'EOF'
%no-protection
Key-Type: RSA
Key-Length: 4096
Key-Usage: sign
Subkey-Type: RSA
Subkey-Length: 4096
Subkey-Usage: encrypt
Name-Real: Alice Smith
Name-Email: alice@example.com
Expire-Date: 1y
%commit
EOF

gpg --batch --generate-key keygen-batch.txt
```

Notes:
- `%no-protection` omits a passphrase. Remove it to prompt for one (interactive only).
- `ed25519`/`cv25519` key types in batch mode require GnuPG 2.3+; fall back to `RSA` if the batch file errors with `invalid algorithm`.
- A revocation certificate is automatically saved to `~/.gnupg/openpgp-revocs.d/<FINGERPRINT>.rev` on creation.

### Interactive (full key generation)

```bash
gpg --full-generate-key
```

## Listing Keys

```bash
# Public keys (human-readable)
gpg --list-keys
gpg --list-keys --keyid-format LONG
gpg --list-keys --with-fingerprint

# Secret keys
gpg --list-secret-keys --keyid-format LONG

# Machine-readable colon-delimited output
gpg --list-keys --with-colons

# Extract key ID from colon output
gpg --list-keys --with-colons | awk -F: '/^pub/{print $5}'

# Extract fingerprint from colon output
gpg --list-keys --with-colons | awk -F: '/^fpr/{print $10}'
```

## Key Import and Export

```bash
# Export public key (ASCII armored)
gpg --export --armor alice@example.com > alice-pub.asc
gpg --export --armor <FINGERPRINT> > key.asc

# Export secret key (keep secure — treat like a password)
gpg --export-secret-keys --armor alice@example.com > alice-sec.asc

# Import a key
gpg --import alice-pub.asc

# Extract public key(s) from a secret key file
gpg --import alice-sec.asc   # imports both pub and sec
```

## Trust

```bash
# Set ultimate trust non-interactively (use for your own keys after import)
echo "<FINGERPRINT>:6:" | gpg --import-ownertrust

# Export current trust assignments (for backup/migration)
gpg --export-ownertrust > ownertrust.txt
gpg --import-ownertrust < ownertrust.txt
```

Trust values: `2`=unknown, `3`=untrusted, `4`=marginal, `5`=full, `6`=ultimate.

`gpg --edit-key` trust prompts require an interactive terminal — use `--import-ownertrust` for non-interactive contexts.

## Encryption

```bash
# Encrypt to a recipient (by email or fingerprint)
gpg --encrypt --recipient alice@example.com --armor input.txt > encrypted.asc

# Encrypt to a file (binary)
gpg --encrypt --recipient alice@example.com -o encrypted.gpg input.txt

# Encrypt to multiple recipients
gpg --encrypt --recipient alice@example.com --recipient bob@example.com input.txt

# Symmetric encryption (passphrase only, no key needed)
gpg --symmetric --armor --batch --passphrase "yourpass" -o encrypted.asc input.txt

# Encrypt and sign in one step
gpg --encrypt --sign --recipient alice@example.com --armor input.txt

From jason-riddle/agent-skills, MIT.

More from jason-riddle/agent-skills

Signals

Stars
0
Forks
0
Open issues
1
Last commit (this folder)
May 16, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from jason-riddle

Cite this page

gpg skill. Agent Mart. https://agentmart.dev/skills/jason-riddle-gpg (last updated 2026-10-24)