npx skills add ...
npx skills add garrytan/gbrain --skill publish
Share brain pages as beautiful password-protected HTML with zero LLM calls
npx skills add garrytan/gbrain --skill publish
Share brain pages as beautiful, self-contained HTML documents. Optionally password-protected with client-side AES-256-GCM encryption. No server needed.
This is a code + skill pair: the deterministic code (gbrain publish) does
the stripping, encrypting, and HTML generation. This skill tells you when and
how to use it. See Thin Harness, Fat Skills
for the architecture philosophy.
https://...) are preserved; only internal brain paths are stripped.Brain content is private. Default to password-protected unless the user explicitly says "open", "no password", or "public".
If no password is specified, auto-generate one. Share the password via a different channel than the URL.
The publish command automatically removes all private/internal data:
| Stripped | Example | Why |
|---|---|---|
| YAML frontmatter | title:, type:, tags: | Internal metadata |
[Source: ...] citations | All formats | Provenance is internal |
| Confirmation numbers | ABC123DEF -> "on file" | PII/booking data |
| Brain cross-links | [Jane](../people/jane.md) -> Jane | Internal paths |
| Timeline section | Everything below --- / ## Timeline | Raw evidence log |
| "See also" lines | Internal references | Brain navigation |
Preserved: external URLs (https://...), all other content.
Share the HTML file via email, Slack, Airdrop. Share the password separately.
Share the signed URL + password. URL expires in 1 hour. Re-generate as needed.
Upload the HTML file to any static hosting service. The file is self-contained, no server logic needed. Password-protected files work entirely client-side via Web Crypto API.
When encrypted, the published HTML contains ONLY ciphertext. The plaintext is not present anywhere in the file.
Re-run the publish command with the same output path:
Same file, same URL (if hosted), updated content.
Delete the file. If using signed URLs, the URL expires automatically (1 hour). If using static hosting, remove the file from the host.
Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:
page_not_found: resolve the real slug first; never publish a guessed page.gbrain files upload / gbrain files signed-url fails (storage not configured, bucket_not_found): tell the user publishing needs storage and run gbrain doctor --json; do not paste private page content instead.gbrain publish exists.gbrain publish -- deterministic HTML generation (no LLM calls)gbrain files upload -- upload to cloud storage (optional)gbrain files signed-url -- generate access links (optional)gbrain publish brain/people/jane-doe.md --password --out ~/Desktop/jane-briefing.html# Publish locally first
gbrain publish brain/companies/acme.md --password "secret" --out /tmp/acme.html
# Upload to Supabase Storage
gbrain files upload /tmp/acme.html --page shares/acme
# Get a signed URL (1-hour expiry)
gbrain files signed-url shares/acme/acme.htmlgbrain publish brain/trips/japan-2026.md --out trip.html
# Upload to a GitHub Gist or Pages repogbrain publish brain/companies/acme.md --password "same-password" --out shares/acme.htmlPUBLISHED: [page title]
========================
File: [output path]
Encrypted: [yes (AES-256-GCM) / no]
Password: [auto-generated password / user-provided / none]
Size: [file size]
Share the file via: [email / Slack / Airdrop / cloud upload]
Share the password via: [a different channel]