weiping/gbrain-cn/publish
Claude Code and agent skill by weiping/gbrain-cn
- community
Checking that the SKILL.md file is still in the repository.
Share brain pages as beautiful password-protected HTML with zero LLM calls
Install
npx vskill@latest install weiping/gbrain-cn/publishSKILL.md
The same SKILL.md was published earlier as weiping/gbrain-cn/publish.
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, facts and takes fences, HTML comments) 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
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 | From the first ## Timeline / ## History heading (any level, with or without a --- above it) or timeline sentinel to the end of the page | Raw evidence log | |
| gbrain fences | ## Facts / ## Takes blocks and other <!-- gbrain:...:begin --> blocks | Private fact rows, internal structure | |
| HTML comments | <!-- note --> | Hidden, never meant to be read | |
| "See also" lines | Internal references | Brain navigation |
Preserved: external URLs (https://...), all other content.
Stripping fails closed: anything after a section that never closes (a fence or comment with no end marker) is dropped too, and a page whose frontmatter never closes is refused. A guest page saved from gbrain get keeps its [outside guest · …] warning line above the frontmatter; publish drops that line and strips the frontmatter as usual. Any other text above frontmatter in the first five non-blank lines (the quote fence a paged gbrain get prints) is refused with invalid_frontmatter: save the page with plain gbrain get <slug> or delete those lines. An early horizontal rule followed by - Label: value items or a sentence YAML reads as a key and value is refused the same way: reword those lines or move the rule. An --out that names the page itself (same path, link or case variant) is refused with invalid_params and writes nothing. Publish whole pages only: a gbrain get --lines slice that starts below the opening --- holds frontmatter keys publish cannot recognize. Read the output before sharing when a page has a prose History section: it is dropped with everything after it.
Sharing Workflows
Option A: Local file (simplest)
Share the HTML file via email, Slack, Airdrop. Share the password separately.
Option B: Upload to cloud storage
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
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:
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 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-urlfails (storage not configured,bucket_not_found): tell the user publishing needs storage and rungbrain 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 publishexists. - Including internal metadata. Never manually share content that contains frontmatter, source citations, or timeline sections. Let the publish command strip it.
Output Format
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)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/publish/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/weiping/gbrain-cn/publish)