Skip to content
Agent Memory
Skill

/publish

Share brain pages as beautiful password-protected HTML with zero LLM calls

From plugin
gbrain
32k79 skills

Claude Code

$ npx -y skills add garrytan/gbrain --skill publish --agent claude-code

SKILL.md

publish.SKILL.md
name: publish
description: Share brain pages as beautiful password-protected HTML with zero LLM calls
triggers:
  - "share this page"
  - "publish page"
  - "create shareable link"
tools:
  - get_page
  - search
mutating: false

Publish Skill

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](https://x.com/garrytan/status/2042925773300908103) for the architecture philosophy.

Contract

  • Published HTML is fully self-contained: no external dependencies, no server needed.
  • All private metadata (frontmatter, source citations, confirmation numbers, brain cross-links, timeline) is stripped before publishing.
  • Password protection uses AES-256-GCM with PBKDF2 key derivation; plaintext never appears in the encrypted HTML file.
  • Default is always encrypted unless the user explicitly requests "open", "no password", or "public".
  • External URLs (`https://...`) are preserved; only internal brain paths are stripped.

When to Publish

  • User asks to share a brain page, create a shareable link, or says "give me a page"
  • User wants to send a deal memo, person briefing, or research to someone external
  • User asks to publish a data room analysis or trip plan
  • Any time brain content needs to leave the brain without exposing the whole system

Default: ALWAYS ENCRYPT

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.

Quick Reference

# Basic publish (outputs local HTML file)
gbrain publish brain/companies/acme.md

# Password protected (auto-generate password)
gbrain publish brain/companies/acme.md --password

# Password protected (specific password)
gbrain publish brain/companies/acme.md --password "secret123"

# Custom title
gbrain publish brain/companies/acme.md --password --title "Acme -- Deal Analysis"

# Custom output path
gbrain publish brain/companies/acme.md --out /tmp/acme-share.html

What Gets Stripped

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.

Sharing Workflows

Option A: Local file (simplest)

gbrain publish brain/people/jane-doe.md --password --out ~/Desktop/jane-briefing.html

Share the HTML file via email, Slack, Airdrop. Share the password separately.

Option B: Upload to cloud storage

# 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.html

Share the signed URL + password. URL expires in 1 hour. Re-generate as needed.

Option C: Static hosting (Render, Netlify, S3)

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.

Option D: GitHub Pages / Gist

gbrain publish brain/trips/japan-2026.md --out trip.html
# Upload to a GitHub Gist or Pages repo

Password Protection Details

  • **Algorithm:** AES-256-GCM
  • **Key derivation:** PBKDF2 with 100K iterations, SHA-256
  • **Salt:** Random 16 bytes per encryption
  • **IV:** Random 12 bytes per encryption
  • **Decryption:** Client-side via Web Crypto API (SubtleCrypto)
  • **No server auth needed** -- the HTML file is self-contained
  • **"Remember on this device"** -- saves password in localStorage

When encrypted, the published HTML contains ONLY ciphertext. The plaintext is not present anywhere in the file.

Updating a Published Page

Re-run the publish command with the same output path:

gbrain publish brain/companies/acme.md --password "same-password" --out shares/acme.html

Same file, same URL (if hosted), updated content.

Revoking Access

Delete the file. If using signed URLs, the URL expires automatically (1 hour). If using static hosting, remove the file from the host.

When it fails

Follow the [agent operator protocol](../conventions/agent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:

  • The source page returns `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.

Anti-Patterns

  • **Publishing without encryption.** Brain content is private. Default to password-protected unless the user explicitly says "open", "no password", or "public".
  • **Sharing password and URL in the same channel.** Always share the password via a different channel than the URL for security.
  • **Assuming the user wants raw markdown.** The publish command produces beautiful HTML. Don't copy-paste markdown when `gbrain publish` exists.
  • **Including internal metadata.** Never manually share content that contains frontmatter, source citations, or timeline sections. Le
Read more
@garrytan
Ships withgbrain

Garry's Opinionated OpenClaw/Hermes Agent Brain

Stars on GitHub

Momentum

stars in total
32.3k
Star history of garrytan/gbrain on GitHub, a chart by star-history.com

Other skills on gbrain.

brain-ingest-gate

brain-ingest-gate

Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new…

@garrytan@garrytanInstall Skill
brain-link-discipline

brain-link-discipline

When you report a brain page to the user — created, edited, committed, or relayed from a subagent — a working link is part of the…

@garrytan@garrytanInstall Skill
brain-ops

brain-ops

Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution,…

@garrytan@garrytanInstall Skill
concept-synthesis

concept-synthesis

Deduplicate and synthesize raw concept stubs into a tiered intellectual map (T1 Canon to T4 Riff), tracing idea evolution across…

@garrytan@garrytanInstall Skill
context-audit

context-audit

Token-hygiene audit of the always-loaded context stack — CLAUDE.md, AGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered…

@garrytan@garrytanInstall Skill
correction-pipeline

correction-pipeline

When the user corrects a factual error, root-cause it immediately. Don't just note the correction — trace the error to its…

@garrytan@garrytanInstall Skill

More skills from other plugins.

agent-cost-report

agent-cost-report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…

@thedotmack@thedotmackInstall Skill
bot-handoff

bot-handoff

Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…

@vectorize-io@vectorize-ioInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

mempalace12d60k
@mempalace@mempalaceInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

mempalace12d60k
@milla-jovovich@milla-jovovichInstall Skill

Questions about publish.

Which coding agents can use publish?
publish installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.