Strong file encryption usually means remembering flags and juggling key files. The
bge-encryption skill teaches Claude
Code how to drive the bge command-line tool — which
mode to use, how to look up saved contacts, how to feed a passphrase without leaking it,
and what each exit code means. You describe the outcome; the agent runs the right
command, on your machine, in the open .bge format.
The same commands work from ChatGPT's coding/agent tools or any other
assistant that can run a shell — see below.
What you can ask
Plain-language requests, and the command the agent runs for each:
bge encrypt contract.pdf -r Alice # → contract.pdf.bge
bge encrypt taxes-2025.pdf # → sealed to you
printf %s "$PW" | bge encrypt notes.txt --password-stdin
bge decrypt invoice.bge -k me.pem -o - | grep -i total
bge inspect secret.bge # mode · key ID · Encrypted for: …
bge encrypt project/ -a -r Bob # → project.zip.bge
.bgekey card, saves the contact, then encrypts.bge contact add carol.bgekey # then: bge encrypt … -r Carol
The guardrails it follows
The skill is written for a shell with no human watching, so it builds in the safe defaults you'd want:
- ●No silent hangs. It never
uses a bare interactive
-pprompt that would block forever — password mode always goes through--password-stdin. - ●Secrets stay out of sight. Passphrases are piped from a variable or file, never written as a command-line argument (which would leak into the process list and history).
- ●It asks first. Before
overwriting a file (
--force), generating new keys, or writing decrypted plaintext to disk, it checks with you. - ●Public keys only. The
address book in
~/.bgenever holds a private key, so the agent can encrypt by name but can't decrypt without a key file you hand it. - ●No stray plaintext. When the
goal is to read or transform a file, it decrypts to a pipe (
-o -) instead of leaving the cleartext on disk.
Install the skill
First, make sure the bge CLI is on your PATH:
brew install --cask dotbge/tap/bge
Then add the skill — it lives in the
bge-cli
repository under skills/bge-encryption:
# Personal — available in all your projects: mkdir -p ~/.claude/skills && cp -r skills/bge-encryption ~/.claude/skills/ # …or per-project, checked into a repo: mkdir -p .claude/skills && cp -r skills/bge-encryption .claude/skills/
That's it. Ask Claude Code “encrypt report.pdf for Alice” and the skill loads
on its own. If bge isn't installed yet, it tells you how and stops rather
than guessing.
Claude Code, ChatGPT, or any agent
The packaged skill is built for Claude Code, but bge itself is a plain,
scriptable tool — deterministic flags, stdin/stdout piping,
--password-stdin, and standard
sysexits exit codes. Any assistant
that can run a shell command drives it the same way:
- Claude Code — drop in the skill (above) and just ask; it loads automatically.
- ChatGPT — its coding / agent tools (such as Codex) can run the
same
bgecommands, or hand ChatGPT the skill file — it doubles as a plain instruction set any model can follow. - Other agents & CI — editor agents, automations, or a build
script can call
bgenon-interactively the same way.
See the CLI reference for the full command set.