besoeasy/age-file-encryption
Encrypt and decrypt files or streams using age — a simple, modern, and secure encryption tool with small explicit keys, passphrase support, SSH key support, post-quantum hybrid keys, and UNIX-style composability. No config options, no footguns.
npx skills add https://github.com/besoeasy/open-skills --skill age-file-encryption
age is a minimal, modern encryption tool. It replaces GPG for most file encryption needs with a much simpler design: small explicit keys, no config files, and clean composability with UNIX pipes.
# macOS / Linux (Homebrew)
brew install age
# Debian / Ubuntu 22.04+
apt install age
# Arch Linux
pacman -S age
# Alpine Linux
apk add age
# Fedora
dnf install age
# Windows
winget install --id FiloSottile.age
# From source (requires Go)
go install filippo.io/age/cmd/...@latest
Pre-built binaries:
https://dl.filippo.io/age/latest?for=linux/amd64
https://dl.filippo.io/age/latest?for=darwin/arm64
https://dl.filippo.io/age/latest?for=windows/amd64
| Term | Meaning |
|------|---------|
| recipient | Public key — who can decrypt the file |
| identity | Private key file — used to decrypt |
| age public key | Starts with age1... |
| age private key | Starts with AGE-SECRET-KEY-1..., stored in a key file |
# Generate a key pair and save to key.txt
age-keygen -o key.txt
# Output: Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
# Print only the public key from an existing key file
age-keygen -y key.txt
# Encrypt a file
age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p -o secret.txt.age secret.txt
# Using a pipe
cat secret.txt | age -r age1ql3z7hjy54... > secret.txt.age
# age will prompt for a passphrase (or autogenerate a secure one)
age -p secret.txt > secret.txt.age
# Each recipient can independently decrypt the file
age -o file.age \
-r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p \
-r age1lggyhqrw2nlhcxprm67z43rta597azn8gknawjehu9d9dl0jq3yqqvfafg \
file.txt
# recipients.txt — one public key per line, # for comments
cat recipients.txt
# Alice
age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
# Bob
age1lggyhqrw2nlhcxprm67z43rta597azn8gknawjehu9d9dl0jq3yqqvfafg
age -R recipients.txt file.txt > file.txt.age
# Encrypt using an SSH public key
age -R ~/.ssh/id_ed25519.pub secret.txt > secret.txt.age
# Encrypt to all SSH keys on a GitHub profile
curl https://github.com/username.keys | age -R - secret.txt > secret.txt.age
# Produces ASCII-safe output, safe to paste in email or config
age -a -r age1ql3z7... secret.txt > secret.txt.age
tar czf - ~/data | age -r age1ql3z7... > data.tar.gz.age
age -d -i key.txt secret.txt.age > secret.txt
# age auto-detects passphrase-encrypted files
age -d secret.txt.age > secret.txt
# Prompts: Enter passphrase:
age -d -i ~/.ssh/id_ed25519 secret.txt.age > secret.txt
age -d -i key.txt archive.tar.gz.age | tar xzf -
Hybrid post-quantum keys protect against future quantum computer attacks.
# Generate a post-quantum key pair
age-keygen -pq -o key.txt
# Extract the public key (recipients start with age1pq1...)
age-keygen -y key.txt > recipient.txt
# Encrypt
age -R recipient.txt file.txt > file.txt.age
# Decrypt
age -d -i key.txt file.txt.age > file.txt
Store your private key encrypted with a passphrase:
# Generate key and immediately encrypt it with a passphrase
age-keygen | age -p > key.age
# Output: Public key: age1yhm4gctwfmrpz87tdslm550wrx6m79y9f2hdzt0lndjnehwj0ukqrjpyx5
# Encrypt a file using the public key
age -r age1yhm4gctwfmrpz87tdslm550wrx6m79y9f2hdzt0lndjnehwj0ukqrjpyx5 secrets.txt > secrets.txt.age
# Decrypt — age will prompt for the passphrase to unlock key.age first
age -d -i key.age secrets.txt.age > secrets.txt
age-inspect secrets.age
# JSON output for scripting
age-inspect --json secrets.age
Usage:
age [--encrypt] (-r RECIPIENT | -R PATH)... [--armor] [-o OUTPUT] [INPUT]
age [--encrypt] --passphrase [--armor] [-o OUTPUT] [INPUT]
age --decrypt [-i PATH]... [-o OUTPUT] [INPUT]
Options:
-e, --encrypt Encrypt (default if omitted)
-d, --decrypt Decrypt
-o, --output OUTPUT Write result to file
-a, --armor Output PEM-encoded text
-p, --passphrase Encrypt with a passphrase
-r, --recipient RECIPIENT Encrypt to recipient (repeatable)
-R, --recipients-file PATH Encrypt to recipients from file (repeatable)
-i, --identity PATH Identity file for decryption (repeatable)
INPUT defaults to stdin, OUTPUT defaults to stdout.
-a / --armor when the output needs to be text-safe (email, config files)-i flags can be passed; unused identity files are silently ignored- as a path to read recipients or identities from stdin.age extension by conventiontar, gzip, ssh, etc.anonymous-file-upload — Upload the encrypted .age file anonymously after encryptingsend-email-programmatically — Send encrypted files over email using armored output (-a)nostr-logging-system — Publish encrypted payloads to NostrTake besoeasy/age-file-encryption from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference brew, go.
Without those the skill loads but fails at the first command.