[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77M79VZAPNPM3WE13Q7MM6S":3,"skill-same:01M77M79VZAPNPM3WE13Q7MM6S":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M77M79VZAPNPM3WE13Q7MM6S","brain-pdf",null,"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.","singhvedant\u002Ftbrain","singhvedant","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F71930695?v=4","01M77M5AXVZ7M5XWPANT3J9NS5","Vedant Singh","01M77M5AZ21DXDMR8ZPN3CPR07",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Fskills\u002Fbrain-pdf\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: brain-pdf\nversion: 0.1.0\ndescription: 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.\ntriggers:\n  - \"make pdf from brain\"\n  - \"brain pdf\"\n  - \"convert brain page to pdf\"\n  - \"publish this page as pdf\"\n  - \"export brain page\"\n---\n\n# brain-pdf — Render a Brain Page to Publication-Quality PDF\n\n> **Convention:** see [conventions\u002Fquality.md](..\u002Fconventions\u002Fquality.md) for\n> output rules. The PDF is a rendering — never the primary artifact. If a\n> PDF exists, the source brain page exists behind it.\n\n## The rule\n\nThe brain page is ALWAYS the source of truth. The PDF is a rendering of\nit, never a standalone artifact. If a PDF exists somewhere, the brain\npage must exist behind it.\n\n## What this does\n\nRenders a brain page (markdown with frontmatter) into a\npublication-quality PDF using the gstack `make-pdf` binary. Output is\nsuitable for:\n\n- Sharing a personalized book mirror via email or Telegram\n- Delivering a strategic-reading playbook as a clean read\n- Producing a briefing or report with running headers and page numbers\n- Archiving a long-form essay in a portable format\n\n## Prerequisite: gstack make-pdf\n\nThis skill depends on the gstack `make-pdf` binary at:\n\n```\n$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\n```\n\nThe user must have gstack co-installed. If absent, the skill cannot run.\nA future v0.26+ may bundle a fallback PDF renderer; for v0.25.1 gstack\nis a soft prereq.\n\nVerify it exists before invoking:\n\n```bash\nP=\"$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\n[ -x \"$P\" ] || { echo \"make-pdf not installed; install gstack\" >&2; exit 1; }\n```\n\n## Workflow\n\n```\n1. RESOLVE  → Confirm the brain page exists (gbrain get \u003Cslug>).\n2. STRIP    → Remove YAML frontmatter — the renderer would otherwise\n              dump it as a full page of raw metadata text.\n3. RENDER   → Invoke make-pdf with sane defaults (no --cover, no --toc).\n4. DELIVER  → Hand the PDF to the requester via the agent's preferred\n              channel (do not use raw `MEDIA:` tags on Telegram —\n              they fail silently).\n```\n\n## Invocation\n\n```bash\nSLUG=\"path\u002Fto\u002Fpage\"\nP=\"$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\n\n# 1. Confirm the page exists.\ngbrain get \"$SLUG\" > \u002Fdev\u002Fnull || { echo \"Page $SLUG not found\" >&2; exit 1; }\n\n# 2. Get the raw markdown. Two paths: read from the brain repo (if user\n#    syncs locally) OR ask gbrain for the body via the API.\nBRAIN_DIR=$(gbrain config get sync.repo_path 2>\u002Fdev\u002Fnull || echo)\nif [ -n \"$BRAIN_DIR\" ] && [ -f \"$BRAIN_DIR\u002F$SLUG.md\" ]; then\n  RAW=\"$BRAIN_DIR\u002F$SLUG.md\"\nelse\n  RAW=$(mktemp \u002Ftmp\u002Fbrain-page-XXXXXX.md)\n  gbrain get \"$SLUG\" --raw > \"$RAW\"   # whatever flag exposes raw body\nfi\n\n# 3. Strip YAML frontmatter — sed: skip the opening '---' through the\n#    closing '---' (lines 1..N), then keep everything after.\nCLEAN=$(mktemp \u002Ftmp\u002Fbrain-page-clean-XXXXXX.md)\nsed '1{\u002F^---$\u002F!q}; \u002F^---$\u002F,\u002F^---$\u002Fd' \"$RAW\" > \"$CLEAN\"\n\n# 4. Render. NO --cover, NO --toc by default — they look corporate\n#    and waste space. Add them only if explicitly requested.\nOUT=\"\u002Ftmp\u002F$(basename \"$SLUG\").pdf\"\nCONTAINER=1 \"$P\" generate \"$CLEAN\" \"$OUT\"\n\necho \"Rendered: $OUT\"\n```\n\n`CONTAINER=1` is mandatory in containerized environments — it tells\nPlaywright to skip Chromium sandboxing. Harmless on bare-metal.\n\n## Common patterns\n\n```bash\n# Default — clean PDF, no cover, no TOC\nbrain-pdf \u003Cslug>\n\n# Draft watermark for in-progress work\nCONTAINER=1 \"$P\" generate --watermark DRAFT \"$CLEAN\" \"$OUT\"\n\n# Optional cover + TOC if the user explicitly asks\nCONTAINER=1 \"$P\" generate --cover --toc \"$CLEAN\" \"$OUT\"\n\n# Custom title + author override (otherwise pulled from frontmatter)\nCONTAINER=1 \"$P\" generate --title \"Custom Title\" --author \"Custom Author\" \"$CLEAN\" \"$OUT\"\n```\n\n## Defaults: NO cover, NO TOC\n\nThese flags are off by default because they look corporate and waste\nspace on most personal-knowledge content. Only add them when the user\nexplicitly asks for \"formal\" output (e.g., something they're sending to\na board or printing as a deliverable).\n\n## Font requirements\n\nThe renderer needs:\n\n- `fonts-liberation` (Helvetica\u002FArial substitute)\n- `fonts-noto-cjk` (Chinese\u002FJapanese\u002FKorean characters)\n- Minimum body font size: 10pt (page chrome 9pt)\n- Body text: 11pt\n\nIf running in an environment without these fonts, install them via the\nhost's package manager (`apt install fonts-liberation fonts-noto-cjk` on\nDebian\u002FUbuntu containers).\n\n## Delivery\n\nAfter rendering, deliver via the agent's preferred channel:\n\n- **Telegram:** use the `message` tool with `filePath=\"\u002Ftmp\u002F\u003Cslug>.pdf\"`\n  attachment. NEVER use raw `MEDIA:` tags — they fail silently.\n- **Email:** attach via the host's email tool.\n- **Direct file response:** print the PDF path; the user can pull it\n  manually.\n\nAlways include the brain page link in the delivery message so the user\ncan also see it on GitHub \u002F locally. The PDF is a rendering; the source\nis the artifact.\n\n## Anti-Patterns\n\n- ❌ Generating a PDF without first confirming the brain page exists.\n  No source = no PDF.\n- ❌ Skipping the frontmatter strip. The renderer dumps frontmatter as\n  raw text on the first page; ugly.\n- ❌ Skipping emoji sanitization. Emoji that don't map to the rendering\n  font show up as `□` boxes.\n- ❌ Adding `--cover` or `--toc` by default. Off unless asked.\n- ❌ Using raw `MEDIA:` tags for Telegram delivery. Use the `message`\n  tool with `filePath`.\n\n## Related skills\n\n- `skills\u002Fbook-mirror\u002FSKILL.md` — produces a brain page that's a\n  natural input to brain-pdf (chapter-by-chapter personalized analysis).\n- `skills\u002Fstrategic-reading\u002FSKILL.md` — same shape, problem-lens variant.\n- `skills\u002Fpublish\u002FSKILL.md` — share brain pages as password-protected\n  HTML (different rendering target).\n\n\n## Contract\n\nThis skill guarantees:\n\n- Routing matches the canonical triggers in the frontmatter.\n- Output written under the directories listed in `writes_to:` (when applicable).\n- Conventions referenced (`quality.md`, `brain-first.md`, `_brain-filing-rules.md`) are followed.\n- Privacy contract preserved: no real names, no fork-specific filesystem path literals, no upstream-fork references.\n\nThe full behavior contract is documented in the body sections above; this section exists for the conformance test.\n\n## Output Format\n\nThe skill's output shape is documented inline in the body sections above (see \"Output\", \"Brain page format\", or equivalent). The literal section header here exists for the conformance test (`test\u002Fskills-conformance.test.ts`).\n","# brain-pdf — Render a Brain Page to Publication-Quality PDF\n\n> **Convention:** see [conventions\u002Fquality.md](..\u002Fconventions\u002Fquality.md) for\n> output rules. The PDF is a rendering — never the primary artifact. If a\n> PDF exists, the source brain page exists behind it.\n\n## The rule\n\nThe brain page is ALWAYS the source of truth. The PDF is a rendering of\nit, never a standalone artifact. If a PDF exists somewhere, the brain\npage must exist behind it.\n\n## What this does\n\nRenders a brain page (markdown with frontmatter) into a\npublication-quality PDF using the gstack `make-pdf` binary. Output is\nsuitable for:\n\n- Sharing a personalized book mirror via email or Telegram\n- Delivering a strategic-reading playbook as a clean read\n- Producing a briefing or report with running headers and page numbers\n- Archiving a long-form essay in a portable format\n\n## Prerequisite: gstack make-pdf\n\nThis skill depends on the gstack `make-pdf` binary at:\n\n```\n$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\n```\n\nThe user must have gstack co-installed. If absent, the skill cannot run.\nA future v0.26+ may bundle a fallback PDF renderer; for v0.25.1 gstack\nis a soft prereq.\n\nVerify it exists before invoking:\n\n```bash\nP=\"$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\n[ -x \"$P\" ] || { echo \"make-pdf not installed; install gstack\" >&2; exit 1; }\n```\n\n## Workflow\n\n```\n1. RESOLVE  → Confirm the brain page exists (gbrain get \u003Cslug>).\n2. STRIP    → Remove YAML frontmatter — the renderer would otherwise\n              dump it as a full page of raw metadata text.\n3. RENDER   → Invoke make-pdf with sane defaults (no --cover, no --toc).\n4. DELIVER  → Hand the PDF to the requester via the agent's preferred\n              channel (do not use raw `MEDIA:` tags on Telegram —\n              they fail silently).\n```\n\n## Invocation\n\n```bash\nSLUG=\"path\u002Fto\u002Fpage\"\nP=\"$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\n\n# 1. Confirm the page exists.\ngbrain get \"$SLUG\" > \u002Fdev\u002Fnull || { echo \"Page $SLUG not found\" >&2; exit 1; }\n\n# 2. Get the raw markdown. Two paths: read from the brain repo (if user\n#    syncs locally) OR ask gbrain for the body via the API.\nBRAIN_DIR=$(gbrain config get sync.repo_path 2>\u002Fdev\u002Fnull || echo)\nif [ -n \"$BRAIN_DIR\" ] && [ -f \"$BRAIN_DIR\u002F$SLUG.md\" ]; then\n  RAW=\"$BRAIN_DIR\u002F$SLUG.md\"\nelse\n  RAW=$(mktemp \u002Ftmp\u002Fbrain-page-XXXXXX.md)\n  gbrain get \"$SLUG\" --raw > \"$RAW\"   # whatever flag exposes raw body\nfi\n\n# 3. Strip YAML frontmatter — sed: skip the opening '---' through the\n#    closing '---' (lines 1..N), then keep everything after.\nCLEAN=$(mktemp \u002Ftmp\u002Fbrain-page-clean-XXXXXX.md)\nsed '1{\u002F^---$\u002F!q}; \u002F^---$\u002F,\u002F^---$\u002Fd' \"$RAW\" > \"$CLEAN\"\n\n# 4. Render. NO --cover, NO --toc by default — they look corporate\n#    and waste space. Add them only if explicitly requested.\nOUT=\"\u002Ftmp\u002F$(basename \"$SLUG\").pdf\"\nCONTAINER=1 \"$P\" generate \"$CLEAN\" \"$OUT\"\n\necho \"Rendered: $OUT\"\n```\n\n`CONTAINER=1` is mandatory in containerized environments — it tells\nPlaywright to skip Chromium sandboxing. Harmless on bare-metal.\n\n## Common patterns\n\n```bash\n# Default — clean PDF, no cover, no TOC\nbrain-pdf \u003Cslug>\n\n# Draft watermark for in-progress work\nCONTAINER=1 \"$P\" generate --watermark DRAFT \"$CLEAN\" \"$OUT\"\n\n# Optional cover + TOC if the user explicitly asks\nCONTAINER=1 \"$P\" generate --cover --toc \"$CLEAN\" \"$OUT\"\n\n# Custom title + author override (otherwise pulled from frontmatter)\nCONTAINER=1 \"$P\" generate --title \"Custom Title\" --author \"Custom Author\" \"$CLEAN\" \"$OUT\"\n```\n\n## Defaults: NO cover, NO TOC\n\nThese flags are off by default because they look corporate and waste\nspace on most personal-knowledge content. Only add them when the user\nexplicitly asks for \"formal\" output (e.g., something they're sending to\na board or printing as a deliverable).\n\n## Font requirements\n\nThe renderer needs:\n\n- `fonts-liberation` (Helvetica\u002FArial substitute)\n- `fonts-noto-cjk` (Chinese\u002FJapanese\u002FKorean characters)\n- Minimum body font size: 10pt (page chrome 9pt)\n- Body text: 11pt\n\nIf running in an environment without these fonts, install them via the\nhost's package manager (`apt install fonts-liberation fonts-noto-cjk` on\nDebian\u002FUbuntu containers).\n\n## Delivery\n\nAfter rendering, deliver via the agent's preferred channel:\n\n- **Telegram:** use the `message` tool with `filePath=\"\u002Ftmp\u002F\u003Cslug>.pdf\"`\n  attachment. NEVER use raw `MEDIA:` tags — they fail silently.\n- **Email:** attach via the host's email tool.\n- **Direct file response:** print the PDF path; the user can pull it\n  manually.\n\nAlways include the brain page link in the delivery message so the user\ncan also see it on GitHub \u002F locally. The PDF is a rendering; the source\nis the artifact.\n\n## Anti-Patterns\n\n- ❌ Generating a PDF without first confirming the brain page exists.\n  No source = no PDF.\n- ❌ Skipping the frontmatter strip. The renderer dumps frontmatter as\n  raw text on the first page; ugly.\n- ❌ Skipping emoji sanitization. Emoji that don't map to the rendering\n  font show up as `□` boxes.\n- ❌ Adding `--cover` or `--toc` by default. Off unless asked.\n- ❌ Using raw `MEDIA:` tags for Telegram delivery. Use the `message`\n  tool with `filePath`.\n\n## Related skills\n\n- `skills\u002Fbook-mirror\u002FSKILL.md` — produces a brain page that's a\n  natural input to brain-pdf (chapter-by-chapter personalized analysis).\n- `skills\u002Fstrategic-reading\u002FSKILL.md` — same shape, problem-lens variant.\n- `skills\u002Fpublish\u002FSKILL.md` — share brain pages as password-protected\n  HTML (different rendering target).\n\n\n## Contract\n\nThis skill guarantees:\n\n- Routing matches the canonical triggers in the frontmatter.\n- Output written under the directories listed in `writes_to:` (when applicable).\n- Conventions referenced (`quality.md`, `brain-first.md`, `_brain-filing-rules.md`) are followed.\n- Privacy contract preserved: no real names, no fork-specific filesystem path literals, no upstream-fork references.\n\nThe full behavior contract is documented in the body sections above; this section exists for the conformance test.\n\n## Output Format\n\nThe skill's output shape is documented inline in the body sections above (see \"Output\", \"Brain page format\", or equivalent). The literal section header here exists for the conformance test (`test\u002Fskills-conformance.test.ts`).\n",{"name":5,"version":24,"triggers":25,"description":7},"0.1.0",[26,27,28,29,30],"make pdf from brain","brain pdf","convert brain page to pdf","publish this page as pdf","export brain page","main","6fd71a8e8b329f5375cf01a74a9da2af1909f4e0","skills\u002Fbrain-pdf","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain","https:\u002F\u002Fgithub.com\u002Fsinghvedant","singhvedant1701.github.io","Web\u002FApp developer\r\nCloud Computing\r\nAI and ML","2026-07-04 14:54:38",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add singhvedant\u002Ftbrain --skill brain-pdf",{"tool":45,"command":46},"bunx","bunx skills add singhvedant\u002Ftbrain --skill brain-pdf",{"tool":48,"command":49},"pnpm","pnpm dlx skills add singhvedant\u002Ftbrain --skill brain-pdf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Fskills\u002Fbrain-pdf\u002FSKILL.md",true,[53],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"routing-eval.jsonl","OTHER","其他",589,"https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Fskills\u002Fbrain-pdf\u002Frouting-eval.jsonl",[60,66,72,79,86,93],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M77MH99TG5CXS6ZC5V519J27","query-helper","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fquery-helper\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M77MH8A3A5PTQM0PQH6SCBA8","broken","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbroken\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M77MH6HHY2G5V0BXP8V316F8","brain-ops","Read, enrich, and write brain pages with source attribution.","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M77MH54BXVPFXK48DKBKFNRF","signal-detector","Always-on ambient signal capture for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fsignal-detector\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M77MH3MPW52RQDQGTDR38MZT","query","Look up brain pages in the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fquery\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M77MH17X2DRV1DD6HV8Z89BA","context-now","ALWAYS-ON time-sensitivity discipline for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002Fsinghvedant\u002Ftbrain\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fcontext-now\u002FSKILL.md",[],[]]