[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72YFFPRH4T95JWR8ZGFEBKV":3,"skill-same:01M72YFFPRH4T95JWR8ZGFEBKV":57},{"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":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M72YFFPRH4T95JWR8ZGFEBKV","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.","Morris-UTRUST\u002FGBrain-knowledge","Morris-UTRUST","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F13375437?v=4","01M72YEA3A0GZ2EQY0ZXRVEB7E","陳冠榮","01M72YEA3VYSH6HF42JCT3T7HA",0,"MIT","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Fskills\u002Fbrain-pdf\u002FSKILL.md",[],[],"2026-11-11 15:11:14",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","d5a406455378d589b645b3744f2ceae49d0b6e23","skills\u002Fbrain-pdf","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST","2026-05-17 23:07:15",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Morris-UTRUST\u002FGBrain-knowledge --skill brain-pdf",{"tool":43,"command":44},"bunx","bunx skills add Morris-UTRUST\u002FGBrain-knowledge --skill brain-pdf",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Morris-UTRUST\u002FGBrain-knowledge --skill brain-pdf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Fskills\u002Fbrain-pdf\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"routing-eval.jsonl","OTHER","其他",589,"https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Fskills\u002Fbrain-pdf\u002Frouting-eval.jsonl",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M72YKMKH4254SNHQZ5PNHDT9","signal-detector","Always-on ambient signal capture for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fsignal-detector\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"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},"01M72YKJXCNATARDEE5E1GKGV4","query","Look up brain pages in the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fquery\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},"01M72YKH458S74JP3C0TVM9VW8","context-now","ALWAYS-ON time-sensitivity discipline for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fcontext-now\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},"01M72YKFAB0TMQ96YB1K1ZSADE","brain-ops","Core read\u002Fwrite cycle for the OpenClaw reference fixture.","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fopenclaw-reference-minimal\u002Fskills\u002Fbrain-ops\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},"01M72YKC9DHWBE0TPH75KGN55Q","webhook-transforms","Generic framework for converting external events (SMS, meetings, social mentions)\ninto brain-ingestible signals. Define a transform function, register a webhook URL,\nand incoming events get processed through the brain pipeline.","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Fskills\u002Fwebhook-transforms\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},"01M72YK9J860QDTNRSVKBDA9M6","voice-note-ingest","Ingest a voice note with exact-phrasing preservation (never paraphrased). Routes content to originals\u002F, concepts\u002F, people\u002F, companies\u002F, ideas\u002F, personal\u002F, or voice-notes\u002F based on a decision tree. The user's exact words are the signal.","https:\u002F\u002Fgithub.com\u002FMorris-UTRUST\u002FGBrain-knowledge\u002Fblob\u002Fmain\u002Fskills\u002Fvoice-note-ingest\u002FSKILL.md",[],[]]