brain-pdf
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
Skill by Morris-UTRUST
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/morris-utrust-brain-pdf
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
brain-pdf- Description
- Generate a publication-quality PDF from any brain page via the gstack make-pdf binary. Strips YAML frontmatter, sanitizes emoji, applies running headers and page numbers. Brain page is always the source of truth; PDF is a rendering.
- License
- MIT
- Instructions
- 176 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- routing-eval.jsonl
SKILL.md (first lines)
# brain-pdf — Render a Brain Page to Publication-Quality PDF
> **Convention:** see [conventions/quality.md](../conventions/quality.md) for
> output rules. The PDF is a rendering — never the primary artifact. If a
> PDF exists, the source brain page exists behind it.
## The rule
The brain page is ALWAYS the source of truth. The PDF is a rendering of
it, never a standalone artifact. If a PDF exists somewhere, the brain
page must exist behind it.
## What this does
Renders a brain page (markdown with frontmatter) into a
publication-quality PDF using the gstack `make-pdf` binary. Output is
suitable for:
- Sharing a personalized book mirror via email or Telegram
- Delivering a strategic-reading playbook as a clean read
- Producing a briefing or report with running headers and page numbers
- Archiving a long-form essay in a portable format
## Prerequisite: gstack make-pdf
This skill depends on the gstack `make-pdf` binary at:
```
$HOME/.claude/skills/gstack/make-pdf/dist/pdf
```
The user must have gstack co-installed. If absent, the skill cannot run.
A future v0.26+ may bundle a fallback PDF renderer; for v0.25.1 gstack
is a soft prereq.
Verify it exists before invoking:
```bash
P="$HOME/.claude/skills/gstack/make-pdf/dist/pdf"
[ -x "$P" ] || { echo "make-pdf not installed; install gstack" >&2; exit 1; }
```
## Workflow
```
1. RESOLVE → Confirm the brain page exists (gbrain get <slug>).
2. STRIP → Remove YAML frontmatter — the renderer would otherwise
dump it as a full page of raw metadata text.
3. RENDER → Invoke make-pdf with sane defaults (no --cover, no --toc).
4. DELIVER → Hand the PDF to the requester via the agent's preferred
channel (do not use raw `MEDIA:` tags on Telegram —
they fail silently).
```
## Invocation
```bash
SLUG="path/to/page"
P="$HOME/.claude/skills/gstack/make-pdf/dist/pdf"
# 1. Confirm the page exists.
gbrain get "$SLUG" > /dev/null || { echo "Page $SLUG not found" >&2; exit 1; }
# 2. Get the raw markdown. Two paths: read from the brain repo (if user
# syncs locally) OR ask gbrain for the body via the API.
BRAIN_DIR=$(gbrain config get sync.repo_path 2>/dev/null || echo)
if [ -n "$BRAIN_DIR" ] && [ -f "$BRAIN_DIR/$SLUG.md" ]; then
RAW="$BRAIN_DIR/$SLUG.md"
else
RAW=$(mktemp /tmp/brain-page-XXXXXX.md)
gbrain get "$SLUG" --raw > "$RAW" # whatever flag exposes raw body
fi
# 3. Strip YAML frontmatter — sed: skip the opening '---' through the
# closing '---' (lines 1..N), then keep everything after.
CLEAN=$(mktemp /tmp/brain-page-clean-XXXXXX.md)
sed '1{/^---$/!q}; /^---$/,/^---$/d' "$RAW" > "$CLEAN"
# 4. Render. NO --cover, NO --toc by default — they look corporate
# and waste space. Add them only if explicitly requested.
OUT="/tmp/$(basename "$SLUG").pdf"
CONTAINER=1 "$P" generate "$CLEAN" "$OUT"
echo "Rendered: $OUT"
```
`CONTAINER=1` is mandatory in containerized environments — it tells
Playwright to skip Chromium sandboxing. Harmless on bare-metal.
## Common patterns
```bash
# Default — clean PDF, no cover, no TOC
brain-pdf <slug>
# Draft watermark for in-progress work
CONTAINER=1 "$P" generate --watermark DRAFT "$CLEAN" "$OUT"
# Optional cover + TOC if the user explicitly asks
CONTAINER=1 "$P" generate --cover --toc "$CLEAN" "$OUT"
# Custom title + author override (otherwise pulled from frontmatter)
CONTAINER=1 "$P" generate --title "Custom Title" --author "Custom Author" "$CLEAN" "$OUT"
```
## Defaults: NO cover, NO TOC
These flags are off by default because they look corporate and waste
space on most personal-knowledge content. Only add them when the user
explicitly asks for "formal" output (e.g., something they're sending to
a board or printing as a deliverable).
## Font requirements
The renderer needs:
- `fonts-liberation` (Helvetica/Arial substitute)
- `fonts-noto-cjk` (Chinese/Japanese/Korean characters)
- Minimum body font size: 10pt (page chrome 9pt)From Morris-UTRUST/GBrain-knowledge, MIT.
More from Morris-UTRUST/GBrain-knowledge
- 0.476score
gbrain-tcm-enrich
Morris-UTRUST
使用 gbrain 官方 enrich 流程,從中醫經典文本(如倪海厦《金匱要略》視頻同步文稿)建立知識圖譜。 適用於:處理中醫文獻、建立倪師臨床經驗知識庫、對中藥/方劑/病理進行實體蒸餾。 觸發時機:用户要求「處理中醫文本」、「建立倪師知識圖譜」、「 enrich 這份中醫文獻」。
SkillCFreshness: CClaude Code +9 - 0.474score
cold-start
Morris-UTRUST
Day-one data bootstrapping for a new brain.
SkillCFreshness: CClaude Code +9 - 0.471score
archive-crawler
Morris-UTRUST
Universal archivist for personal file archives (Dropbox/B2/Gmail-takeout/local-mount/hard-drive-dump).
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 2, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.613score
brain-pdf
inbrainfun
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
SkillCFreshness: C★ 143Claude Code +9 - 0.326score
brain-pdf
nastechresearch
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
SkillBFreshness: B★ 1Claude Code +9 - 0.313score
brain-pdf
starlink-awaken
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
SkillBFreshness: BClaude Code +9 - 0.283score
brain-pdf
Ninatuzi
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
SkillCFreshness: CClaude Code +9 - 0.283score
brain-pdf
singhvedant
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
SkillCFreshness: CClaude Code +9
More from Morris-UTRUST
- 0.476score
gbrain-tcm-enrich
Morris-UTRUST
使用 gbrain 官方 enrich 流程,從中醫經典文本(如倪海厦《金匱要略》視頻同步文稿)建立知識圖譜。 適用於:處理中醫文獻、建立倪師臨床經驗知識庫、對中藥/方劑/病理進行實體蒸餾。 觸發時機:用户要求「處理中醫文本」、「建立倪師知識圖譜」、「 enrich 這份中醫文獻」。
SkillCFreshness: CClaude Code +9 - 0.474score
cold-start
Morris-UTRUST
Day-one data bootstrapping for a new brain.
SkillCFreshness: CClaude Code +9 - 0.471score
archive-crawler
Morris-UTRUST
Universal archivist for personal file archives (Dropbox/B2/Gmail-takeout/local-mount/hard-drive-dump).
SkillCFreshness: CClaude Code +9
Cite this page
brain-pdf skill. Agent Mart. https://agentmart.dev/skills/morris-utrust-brain-pdf (last updated 2026-10-24)