Skip to content

Guide · Agent skill

How to use the Brain Page PDF Renderer agent skill (brain-pdf)

Updated · written with AI from the project's own documentation and checked against our catalogue data

brain-pdf is an agent skill that turns a saved brain page, a markdown note with a metadata header, into a formatted PDF. It is written for people who keep notes in the gbrain knowledge store and want a portable copy to share or read. After this guide you will know what the skill does, how to install it, how to ask for a PDF in plain language, and what it needs to run.

Brain Page PDF Renderergarrytan/gbrain · MIT

Quick start

  1. 1Install gstack. Make sure make-pdf exists at $HOME/.claude/skills/gstack/make-pdf/dist/pdf, since the skill cannot render without it.
  2. 2Install the fonts. On Debian or Ubuntu containers, install fonts-liberation and fonts-noto-cjk with apt.
  3. 3Install brain-pdf. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
  4. 4Ask for the PDF. Say something like "make pdf from brain" with the page slug or title.
  5. 5Check the result. The agent reports the output path and sends the PDF with a link to the original brain page.

What an agent skill is and what brain-pdf makes the agent do

An agent skill is a folder with a SKILL.md file that tells an AI agent how to perform a specific task. When a request matches the skill's triggers, the agent follows the steps in that file, which can include running scripts.

brain-pdf covers one job: rendering an existing brain page into a publication-quality PDF using the gstack make-pdf binary. It strips the YAML frontmatter, sanitizes emoji, and applies running headers and page numbers. It does not write new content. The brain page stays the source of truth, and the PDF is a rendering of it.

  • Fetches the page with gbrain get and checks that it exists
  • Removes the leading frontmatter block so raw metadata does not print on page one
  • Renders the PDF with no cover and no table of contents unless you ask for them
  • Sends the file back with a link to the original brain page

Install brain-pdf from the ZIP or the Claude apps

Download the ZIP from the brain-pdf page on this site. The skill ships as a single file, SKILL.md. To install it for your user account, unzip it into ~/.claude/skills/. To limit it to one project, unzip it into that project's .claude/skills/ folder.

If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload

Install the gstack make-pdf dependency

brain-pdf cannot render on its own. It calls the make-pdf binary from gstack, which must be installed at $HOME/.claude/skills/gstack/make-pdf/dist/pdf. The skill checks for this file first and stops with a message asking you to install gstack if it is missing.

You can verify the binary yourself with the check the skill uses. If the file is not executable, the skill will report that make-pdf is not installed.

  • Required path: $HOME/.claude/skills/gstack/make-pdf/dist/pdf
  • If the check fails, install gstack; the skill will not hand-build a PDF as a substitute
P="$HOME/.claude/skills/gstack/make-pdf/dist/pdf" [ -x "$P" ] || { echo "make-pdf not installed; install gstack" >&2; exit 1; }

Install fonts and the gbrain CLI

The renderer needs fonts-liberation for Helvetica and Arial substitutes and fonts-noto-cjk for Chinese, Japanese and Korean characters. On Debian or Ubuntu containers, install them with apt. The skill also needs the gbrain CLI, since it calls gbrain get and gbrain config.

Body text is set at 11pt and the minimum body size is 10pt, with page chrome at 9pt. If you run in a container, set CONTAINER=1 so Playwright skips Chromium sandboxing. The flag is harmless on a normal machine.

  • Fonts: fonts-liberation and fonts-noto-cjk
  • Debian/Ubuntu container install: apt install fonts-liberation fonts-noto-cjk
  • Containers: set CONTAINER=1 before the render command
apt install fonts-liberation fonts-noto-cjk

Trigger brain-pdf with a natural request

You do not need to type a command. Ask the agent in plain words. The skill is triggered by phrases such as "make pdf from brain", "brain pdf", "convert brain page to pdf", "publish this page as pdf" and "export brain page". Name the page by its slug, or let the agent find it by title.

The agent confirms the page exists, strips the frontmatter, renders the file to /tmp, and delivers it through the channel you use.

  • "Make a PDF from the brain page reading-playbook/tax-notes"
  • "Export brain page essays/remote-work as a PDF"
  • "Publish this page as pdf and send it to me on Telegram"
  • "Make a draft PDF of this brain page with a DRAFT watermark"

Optional settings: watermark, cover, TOC and title

The default output has no cover and no table of contents. These are off because they suit formal documents better than personal notes. Add them only when you explicitly ask for formal output, such as a board paper. You can also set a custom title and author, which otherwise come from the frontmatter, or add a DRAFT watermark for work in progress.

The skill's own examples show these options passed to the make-pdf generate command.

  • --watermark DRAFT: marks in-progress work
  • --cover and --toc: only when requested
  • --title and --author: override values taken from frontmatter
CONTAINER=1 "$P" generate --watermark DRAFT "$CLEAN" "$OUT" CONTAINER=1 "$P" generate --cover --toc "$CLEAN" "$OUT" CONTAINER=1 "$P" generate --title "Custom Title" --author "Custom Author" "$CLEAN" "$OUT"

Safety notes: where the PDF goes and who gets it

The rendered PDF is written to /tmp and sent through the agent's delivery channel. Before you send a sensitive page by email or chat, check who will receive it. The skill itself does not use the network, but delivery through Telegram, email or another channel does leave your machine.

The skill runs scripts, so read the SKILL.md before installing a skill from any source you do not trust.

  • Output path: /tmp/<page-name>.pdf
  • Check recipients before sending private pages
  • Network: the skill itself does not use it; delivery channels do
  • Scripts: yes, the skill runs shell commands

What people use it for

  • Sharing a personalized book mirror as a PDF over email or Telegram
  • Delivering a strategic-reading playbook as a clean document to read offline
  • Producing a briefing with running headers and page numbers from a saved brain page
  • Archiving a long-form essay from the gbrain knowledge store in a portable format

Frequently asked questions

Is brain-pdf free to use?

The skill is published under the MIT licence, as stated on this page. The source does not mention pricing, so check the repository for any terms that apply to the wider project.

Do I need gstack to use brain-pdf?

Yes. The skill depends on the gstack make-pdf binary at $HOME/.claude/skills/gstack/make-pdf/dist/pdf. If it is not installed, the skill stops and asks you to install gstack.

How do I install brain-pdf?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can upload it under Settings → Capabilities → Skills.

Why does my PDF show boxes instead of some characters?

The source says emoji that do not map to the rendering font show up as boxes, and the skill is meant to sanitize emoji. For CJK text, the renderer needs fonts-noto-cjk, and the Latin fallbacks need fonts-liberation. Install those fonts if they are missing.

Why doesn't my PDF have a cover or table of contents?

Both are off by default because they suit formal output better than personal notes. Ask the agent explicitly for a cover and TOC, or pass --cover and --toc yourself.

Does brain-pdf write new content or change my notes?

No. It only formats an existing brain page. It removes the frontmatter block for rendering, and the brain page itself remains the source of truth.

Can I use brain-pdf in a Docker container?

Yes, with conditions. Install fonts-liberation and fonts-noto-cjk, and set CONTAINER=1 so Playwright skips Chromium sandboxing.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

brain-pdf suits people who keep notes in gbrain and already run gstack, and who want shareable PDF copies with running headers and page numbers. Skip it if you do not have gstack or need a formal deliverable with covers and tables of contents, since the output is not tuned for that; use a dedicated document tool instead. Pages with sensitive content should be checked for recipients before the agent delivers them.

Download the skill