publish
Share brain pages as beautiful password-protected HTML with zero LLM calls
- License 许可
- MIT
- 最近更新
- 2026-11-01
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- publish
- tools
- [ "get_page", "search" ]
- mutating
- false
- triggers
- [ "share this page", "publish page", "create shareable link" ]
- description
- Share brain pages as beautiful password-protected HTML with zero LLM calls
03 SKILL.md 正文
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
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.
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 publishexists. - Including internal metadata. Never manually share content that contains frontmatter, source citations, or timeline sections. Let the publish command strip it.
Output Format
PUBLISHED: [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]
Tools Used
gbrain publish-- deterministic HTML generation (no LLM calls)gbrain files upload-- upload to cloud storage (optional)gbrain files signed-url-- generate access links (optional)
04 同仓库更多 Skills
seedance-prompt-en
Write effective prompts for Jimeng Seedance 2.0 multimodal AI video generation. Use when users want to create video prompts using text, images, videos, and audio inputs with the @ reference system. Covers camera movements, effects replication, video extension, editing, music beat-matching, e-commerce ads, short dramas, and educational content.
onepage-pdf
Convert an HTML page into a single continuous-page PDF (one tall page, no pagination breaks), preserving desktop layout, backgrounds and selectable text. Use when the user asks to turn an HTML file/report/proposal into a "single-page PDF", "long PDF", "不分页 PDF", "单页 PDF", "长图式 PDF", or complains that an HTML-to-PDF export breaks into pages or cuts content. Supports optional string redaction with leak verification.
native-feel-cross-platform-desktop
Use when the user is designing, prototyping, or rewriting a desktop app that must run on multiple OSes (macOS + Windows, optionally Linux) AND feel indistinguishable from a native app to its users — fast launch, native windowing, native input handling, native materials. Trigger words include "cross-platform desktop", "Electron alternative", "Tauri vs native", "WebView wrapper", "near-native performance", "Raycast architecture", "WebKit/WebView2 quirks", "WKWebView", "system tray app", "global hotkey app", "launcher app". Do NOT trigger this skill for pure web apps, pure mobile apps, or for greenfield projects that have no native-feel requirement.
gstack
Router for the gstack skill suite. (gstack)
fireworks-tech-graph
Use when the user wants to create any technical diagram - architecture, data flow, flowchart, sequence, agent/memory, or concept map - and export as SVG+PNG. Trigger on: "画图" "帮我画" "生成图" "做个图" "架构图" "流程图" "可视化一下" "出图" "generate diagram" "draw diagram" "visualize" or any system/flow description the user wants illustrated.
dbs-video-extract
接收抖音、小红书、微信视频号等短视频链接或分享文案,查询作品/账号数据并提取语音文字稿,按作者和标题归档为 Markdown。用户希望完整解析短视频、取得数据或文字稿时使用;运行前检查 TikHub 与轻抖使用凭证,缺少时用新手能理解的方式引导购买和安全配置。