brain-pdf
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
Skill by nastechresearch
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/nastechresearch-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 (nbrain 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.
nbrain 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 nbrain for the body via the API.
BRAIN_DIR=$(nbrain 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)
nbrain 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 nastechresearch/nbrain, MIT.
More from nastechresearch/nbrain
- 0.547score
cold-start
nastechresearch
Day-one data bootstrapping for a new brain.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
archive-crawler
nastechresearch
Universal archivist for personal file archives (Dropbox/B2/Gmail-takeout/local-mount/hard-drive-dump).
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
brain-taxonomist
nastechresearch
Filing gate for ALL brain writes.
SkillBFreshness: B★ 1Claude Code +9 - 0.541score
retrieval-reflex
nastechresearch
When/what to retrieve — open the brain page for a salient entity before answering from memory.
SkillBFreshness: B★ 1Claude Code +9 - 0.540score
nbrain
nastechresearch
Search and write the company knowledge brain.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
voice-post-call
nastechresearch
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 11, 2026 (2 months ago)
- Last release
- Aug 11, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/nastechresearch/nbrain
- 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.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
Morris-UTRUST
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary.
SkillCFreshness: CClaude 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 nastechresearch
- 0.547score
cold-start
nastechresearch
Day-one data bootstrapping for a new brain.
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
archive-crawler
nastechresearch
Universal archivist for personal file archives (Dropbox/B2/Gmail-takeout/local-mount/hard-drive-dump).
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
brain-taxonomist
nastechresearch
Filing gate for ALL brain writes.
SkillBFreshness: B★ 1Claude Code +9 - 0.541score
retrieval-reflex
nastechresearch
When/what to retrieve — open the brain page for a salient entity before answering from memory.
SkillBFreshness: B★ 1Claude Code +9 - 0.540score
nbrain
nastechresearch
Search and write the company knowledge brain.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
brain-pdf skill. Agent Mart. https://agentmart.dev/skills/nastechresearch-brain-pdf (last updated 2026-10-24)