{"id":"33651104-762c-4217-9123-02f95a4e36fe","shortId":"dyma6A","kind":"skill","title":"make-pdf","tagline":"Generate professional PDFs from code, markdown, or HTML in the current repository.\nSupports cover pages, tables of contents, watermarks, custom margins, and page sizes.\nUse when asked to \"make pdf\", \"generate pdf\", \"export to pdf\", \"create pdf report\",\nor \"pdf preview\".","description":"## Preamble\n\n```bash\neval \"$(~/.vibestack/bin/vibe-slug 2>/dev/null)\" 2>/dev/null || SLUG=\"unknown\"\n_LEARN_FILE=\"${VIBESTACK_HOME:-$HOME/.vibestack}/projects/${SLUG:-unknown}/learnings.jsonl\"\nif [ -f \"$_LEARN_FILE\" ]; then\n  _LEARN_COUNT=$(wc -l < \"$_LEARN_FILE\" 2>/dev/null | tr -d ' ')\n  echo \"LEARNINGS: $_LEARN_COUNT entries loaded\"\n  if [ \"$_LEARN_COUNT\" -gt 5 ] 2>/dev/null; then\n    ~/.vibestack/bin/vibe-learnings-search --limit 5 2>/dev/null || true\n  fi\nelse\n  echo \"LEARNINGS: none yet\"\nfi\n```\n\n## Step 0: Find the make-pdf binary\n\n```bash\n# Check environment override first, then vibestack repo path as fallback\nP=\"${MAKE_PDF_BIN:-}\"\nif [ -z \"$P\" ]; then\n  _TVIBE_PDF=\"$HOME/.claude/skills/vibestack/make-pdf/dist/pdf\"\n  [ -x \"$_TVIBE_PDF\" ] && P=\"$_TVIBE_PDF\"\nfi\n[ -n \"$P\" ] && echo \"FOUND: $P\" || echo \"NOT_FOUND\"\n```\n\nIf `NOT_FOUND`, stop and tell the user:\n\n> make-pdf binary not found. The binary must be built from the vibestack repo.\n> Run: `cd ~/.claude/skills/vibestack && bun install && bun run build:make-pdf`\n> Or set `$MAKE_PDF_BIN` to the path of an existing `make-pdf` binary.\n>\n> After building, re-run `/make-pdf`.\n\n---\n\n## Step 1: Detect intent\n\nParse the user's input to determine what to do:\n\n1. `/make-pdf` with no args — **Auto-detect**: look for markdown files or ask what to convert\n2. `/make-pdf preview <file>` — **Preview mode**: generate and open a PDF preview\n3. `/make-pdf setup` — **Setup mode**: run `$P setup` to configure defaults\n4. `/make-pdf <file or description>` — **Generate mode**: produce a PDF from the specified input\n\n---\n\n## Step 2A: Generate mode\n\n1. Identify the source file(s). If the user provided a path, use it. If not, ask:\n   ```\n   What should I turn into a PDF?\n   A) A specific file (provide path)\n   B) All markdown files in this directory\n   C) A generated report (I'll describe what to include)\n   D) Something else\n   ```\n\n2. Determine output filename. Default: `<source-basename>.pdf` in the same directory.\n\n3. Run the generator:\n\n```bash\n\"$P\" generate \"<source>\" --output \"<output.pdf>\" [flags]\n```\n\nCommon flags:\n- `--cover` — add a cover page (uses repo name + date)\n- `--toc` — add a table of contents\n- `--watermark \"<text>\"` — overlay watermark text (e.g., \"DRAFT\", \"CONFIDENTIAL\")\n- `--margins \"<top> <right> <bottom> <left>\"` — custom margins in mm (default: `20 20 20 20`)\n- `--page-size <size>` — A4 (default), Letter, Legal\n- `--title \"<title>\"` — override document title\n- `--author \"<name>\"` — set author metadata\n\n4. Report the result:\n\n```\nPDF GENERATED\n═══════════════════════════════════════════\nOutput:  <output.pdf>\nSize:    <file size>\nPages:   <page count>\n═══════════════════════════════════════════\n```\n\n---\n\n## Step 2B: Preview mode\n\nGenerate the PDF and open it:\n\n```bash\n\"$P\" preview \"<source>\" [flags]\n```\n\nThis generates a temporary PDF and opens it in the system PDF viewer. Report the path if the user wants to save it.\n\n---\n\n## Step 2C: Setup mode\n\nRun the setup wizard to configure defaults for this project:\n\n```bash\n\"$P\" setup\n```\n\nThis writes a `.make-pdf.json` config file in the project root. Show the user what was configured.\n\n---\n\n## Core patterns\n\n### 80% case — memo/letter\n\nOne command, no flags. Gets a clean PDF with running header + page numbers.\n\n```bash\n\"$P\" generate letter.md                 # writes /tmp/letter.pdf\n\"$P\" generate letter.md letter.pdf      # explicit output path\n```\n\n### Publication mode — cover + TOC + chapter breaks\n\n```bash\n\"$P\" generate --cover --toc --title \"On Horizons\" essay.md essay.pdf\n```\n\nEach top-level H1 starts a new page. Disable with `--no-chapter-breaks` for memos that happen to have multiple H1s.\n\n### Draft-stage watermark\n\n```bash\n\"$P\" generate --watermark DRAFT memo.md draft.pdf\n```\n\nDiagonal DRAFT across every page. Drop the flag when final.\n\n### Fast iteration via preview\n\n```bash\n\"$P\" preview essay.md\n```\n\nRenders with print CSS and opens in browser. Skip the PDF round trip until you're ready.\n\n---\n\n## Common flags\n\n```\nPage layout:\n  --margins <dim>            1in (default) | 72pt | 2.54cm | 25mm\n  --page-size letter|a4|legal\n\nStructure:\n  --cover                    Cover page (title, author, date)\n  --toc                      Clickable TOC with page numbers\n  --no-chapter-breaks        Don't start a new page at every H1\n\nBranding:\n  --watermark <text>         Diagonal watermark (\"DRAFT\", \"CONFIDENTIAL\")\n  --header-template <html>   Custom running header\n  --footer-template <html>   Custom footer (mutex with --page-numbers)\n\nOutput:\n  --page-numbers             \"N of M\" footer (default on)\n  --tagged                   Accessible PDF (default on)\n  --outline                  PDF bookmarks from headings (default on)\n  --quiet                    Suppress progress on stderr\n  --verbose                  Per-stage timings\n\nNetwork:\n  --allow-network            Fetch external images. Off by default\n                             (blocks tracking pixels).\n\nMetadata:\n  --title \"...\"              Document title (defaults to first H1)\n  --author \"...\"             Author for cover + PDF metadata\n  --date \"...\"               Date for cover (defaults to today)\n```\n\n---\n\n## When to run it\n\nWatch for markdown-to-PDF intent. Any of these → run `\"$P\" generate`:\n\n- \"Can you make this markdown a PDF\"\n- \"Export it as a PDF\"\n- \"Turn this into a PDF\"\n- \"I need a PDF of this\"\n- \"Print this as a PDF for me\"\n\nIf the user has a `.md` file open and says \"make it look nice\", propose `\"$P\" generate --cover --toc` and ask before running.\n\n---\n\n## Output contract\n\n```\nstdout: /tmp/letter.pdf          ← just the path, one line\nstderr: Rendering HTML...        ← progress (unless --quiet)\n        Generating PDF...\n        Done in 1.5s. 43 words · 22KB · /tmp/letter.pdf\n\nexit code: 0 success / 1 bad args / 2 render error / 3 Paged.js timeout / 4 binary unavailable\n```\n\nCapture the path: `PDF=$(\"$P\" generate letter.md)` — then use `$PDF`.\n\n---\n\n## Debugging\n\n- **Blank output** → check binary is executable: `ls -la \"$P\"`\n- **Fragmented text on copy-paste** → remove fenced code blocks and regenerate\n- **Timeout** → no headings in the markdown, drop `--toc`\n- **External image missing** → the binary fetches external images only when `--allow-network` is set\n\n---\n\n## Capture Learnings\n\nIf you discovered a non-obvious make-pdf behavior, flag pattern, or conversion quirk\nduring this session, log it for future sessions:\n\n```bash\n~/.vibestack/bin/vibe-learnings-log '{\"skill\":\"make-pdf\",\"type\":\"TYPE\",\"key\":\"SHORT_KEY\",\"insight\":\"DESCRIPTION\",\"confidence\":N,\"source\":\"SOURCE\",\"files\":[\"path/to/relevant/file\"]}'\n```\n\n**Types:** `pattern` (reusable approach), `pitfall` (what NOT to do), `tool`\n(binary behavior), `operational` (env/path/dependency quirk).\n\n**Only log genuine discoveries.** A good test: would this save time in a future session?","tags":["make","pdf","vibestack","timurgaleev","agent-skills","ai-agents","claude-code","cursor-ide","developer-tools","kiro","mcp","prompt-engineering"],"capabilities":["skill","source-timurgaleev","skill-make-pdf","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-cursor-ide","topic-developer-tools","topic-kiro","topic-mcp","topic-prompt-engineering","topic-slash-commands"],"categories":["vibestack"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/timurgaleev/vibestack/make-pdf","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add timurgaleev/vibestack","source_repo":"https://github.com/timurgaleev/vibestack","install_from":"skills.sh"}},"qualityScore":"0.457","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 15 github stars · SKILL.md body (6,822 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:06:22.088Z","embedding":null,"createdAt":"2026-05-18T19:06:22.088Z","updatedAt":"2026-05-18T19:06:22.088Z","lastSeenAt":"2026-05-18T19:06:22.088Z","tsv":"'/.claude/skills/vibestack':176 '/.vibestack/bin/vibe-learnings-log':911 '/.vibestack/bin/vibe-learnings-search':93 '/.vibestack/bin/vibe-slug':48 '/dev/null':50,52,76,91,97 '/learnings.jsonl':63 '/make-pdf':205,221,238,249,260 '/projects':60 '/tmp/letter.pdf':494,791,812 '0':107,815 '1':207,220,274,817 '1.5':807 '1in':592 '2':49,51,75,90,96,237,324,820 '2.54':595 '20':373,374,375,376 '22kb':811 '25mm':597 '2a':271 '2b':402 '2c':439 '3':248,334,823 '4':259,392,826 '43':809 '5':89,95 '72pt':594 '80':473 'a4':380,602 'access':663 'across':554 'add':346,355 'allow':686,880 'allow-network':685,879 'approach':932 'arg':224,819 'ask':30,233,290,785 'author':388,390,609,705,706 'auto':226 'auto-detect':225 'b':304 'bad':818 'bash':46,114,338,411,452,489,508,545,566,910 'behavior':896,940 'bin':128,189 'binari':113,162,166,199,827,843,873,939 'blank':840 'block':694,858 'bookmark':669 'brand':630 'break':507,532,620 'browser':577 'build':181,201 'built':169 'bun':177,179 'c':311 'captur':829,884 'case':474 'cd':175 'chapter':506,531,619 'check':115,842 'clean':482 'clickabl':612 'cm':596 'code':8,814,857 'command':477 'common':343,587 'confid':923 'confidenti':366,635 'config':459 'configur':257,447,470 'content':21,359 'contract':789 'convers':900 'convert':236 'copi':853 'copy-past':852 'core':471 'count':70,82,87 'cover':17,345,348,504,511,605,606,708,714,782 'creat':39 'css':573 'current':14 'custom':23,368,639,645 'd':78,321 'date':353,610,711,712 'debug':839 'default':258,328,372,381,448,593,660,665,672,693,701,715 'describ':317 'descript':922 'detect':208,227 'determin':216,325 'diagon':552,632 'directori':310,333 'disabl':527 'discov':888 'discoveri':947 'document':386,699 'done':805 'draft':365,542,549,553,634 'draft-stag':541 'draft.pdf':551 'drop':557,867 'e.g':364 'echo':79,101,145,148 'els':100,323 'entri':83 'env/path/dependency':942 'environ':116 'error':822 'essay.md':516,569 'essay.pdf':517 'eval':47 'everi':555,628 'execut':845 'exist':195 'exit':813 'explicit':499 'export':36,742 'extern':689,869,875 'f':65 'fallback':124 'fast':562 'fenc':856 'fetch':688,874 'fi':99,105,142 'file':56,67,74,231,278,301,307,460,771,927 'filenam':327 'final':561 'find':108 'first':118,703 'flag':342,344,414,479,559,588,897 'footer':643,646,659 'footer-templ':642 'found':146,150,153,164 'fragment':849 'futur':908,957 'generat':4,34,242,261,272,313,337,340,397,405,416,491,496,510,547,734,781,803,834 'genuin':946 'get':480 'good':949 'gt':88 'h1':522,629,704 'h1s':540 'happen':536 'head':671,863 'header':486,637,641 'header-templ':636 'home':58 'home/.claude/skills/vibestack/make-pdf/dist/pdf':135 'home/.vibestack':59 'horizon':515 'html':11,799 'identifi':275 'imag':690,870,876 'includ':320 'input':214,269 'insight':921 'instal':178 'intent':209,728 'iter':563 'key':918,920 'l':72 'la':847 'layout':590 'learn':55,66,69,73,80,81,86,102,885 'legal':383,603 'letter':382,601 'letter.md':492,497,835 'letter.pdf':498 'level':521 'limit':94 'line':796 'll':316 'load':84 'log':905,945 'look':228,777 'ls':846 'm':658 'make':2,32,111,126,160,183,187,197,737,775,894,914 'make-pdf':1,110,159,182,196,893,913 'make-pdf.json':458 'margin':24,367,369,591 'markdown':9,230,306,725,739,866 'markdown-to-pdf':724 'md':770 'memo':534 'memo.md':550 'memo/letter':475 'metadata':391,697,710 'miss':871 'mm':371 'mode':241,252,262,273,404,441,503 'multipl':539 'must':167 'mutex':647 'n':143,656,924 'name':352 'need':753 'network':684,687,881 'new':525,625 'nice':778 'no-chapter-break':529,617 'non':891 'non-obvi':890 'none':103 'number':488,616,651,655 'obvious':892 'one':476,795 'open':244,409,421,575,772 'oper':941 'outlin':667 'output':326,341,398,500,652,788,841 'overlay':361 'overrid':117,385 'p':125,131,139,144,147,254,339,412,453,490,495,509,546,567,733,780,833,848 'page':18,26,349,378,400,487,526,556,589,599,607,615,626,650,654 'page-numb':649,653 'page-s':377,598 'paged.js':824 'pars':210 'past':854 'path':122,192,285,303,430,501,794,831 'path/to/relevant/file':928 'pattern':472,898,930 'pdf':3,33,35,38,40,43,112,127,134,138,141,161,184,188,198,246,265,297,329,396,407,419,426,483,580,664,668,709,727,741,746,751,755,762,804,832,838,895,915 'pdfs':6 'per':681 'per-stag':680 'pitfal':933 'pixel':696 'preambl':45 'preview':44,239,240,247,403,413,565,568 'print':572,758 'produc':263 'profession':5 'progress':676,800 'project':451,463 'propos':779 'provid':283,302 'public':502 'quiet':674,802 'quirk':901,943 're':203,585 're-run':202 'readi':586 'regener':860 'remov':855 'render':570,798,821 'repo':121,173,351 'report':41,314,393,428 'repositori':15 'result':395 'reusabl':931 'root':464 'round':581 'run':174,180,204,253,335,442,485,640,720,732,787 'save':436,953 'say':774 'session':904,909,958 'set':186,389,883 'setup':250,251,255,440,444,454 'short':919 'show':465 'size':27,379,399,600 'skill':912 'skill-make-pdf' 'skip':578 'slug':53,61 'someth':322 'sourc':277,925,926 'source-timurgaleev' 'specif':300 'specifi':268 'stage':543,682 'start':523,623 'stderr':678,797 'stdout':790 'step':106,206,270,401,438 'stop':154 'structur':604 'success':816 'support':16 'suppress':675 'system':425 'tabl':19,357 'tag':662 'tell':156 'templat':638,644 'temporari':418 'test':950 'text':363,850 'time':683,954 'timeout':825,861 'titl':384,387,513,608,698,700 'toc':354,505,512,611,613,783,868 'today':717 'tool':938 'top':520 'top-level':519 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-cursor-ide' 'topic-developer-tools' 'topic-kiro' 'topic-mcp' 'topic-prompt-engineering' 'topic-slash-commands' 'tr':77 'track':695 'trip':582 'true':98 'turn':294,747 'tvibe':133,137,140 'type':916,917,929 'unavail':828 'unknown':54,62 'unless':801 'use':28,286,350,837 'user':158,212,282,433,467,767 'verbos':679 'via':564 'vibestack':57,120,172 'viewer':427 'want':434 'watch':722 'watermark':22,360,362,544,548,631,633 'wc':71 'wizard':445 'word':810 'would':951 'write':456,493 'x':136 'yet':104 'z':130","prices":[{"id":"76d3278e-0719-497c-93e8-c515f5cd49ff","listingId":"33651104-762c-4217-9123-02f95a4e36fe","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"timurgaleev","category":"vibestack","install_from":"skills.sh"},"createdAt":"2026-05-18T19:06:22.088Z"}],"sources":[{"listingId":"33651104-762c-4217-9123-02f95a4e36fe","source":"github","sourceId":"timurgaleev/vibestack/make-pdf","sourceUrl":"https://github.com/timurgaleev/vibestack/tree/main/skills/make-pdf","isPrimary":false,"firstSeenAt":"2026-05-18T19:06:22.088Z","lastSeenAt":"2026-05-18T19:06:22.088Z"}],"details":{"listingId":"33651104-762c-4217-9123-02f95a4e36fe","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"timurgaleev","slug":"make-pdf","github":{"repo":"timurgaleev/vibestack","stars":15,"topics":["agent-skills","ai-agents","claude-code","cursor-ide","developer-tools","kiro","mcp","prompt-engineering","slash-commands"],"license":"mit","html_url":"https://github.com/timurgaleev/vibestack","pushed_at":"2026-05-18T18:19:05Z","description":"vibestack is a portable skill pack for AI coding agents. Slash commands like /office-hours, /ship, /investigate, /tdd, /review install once and work across every agent that supports the Agent Skills open standard — Claude Code, Cursor, Kiro, and a growing list of others. ","skill_md_sha":"7a3a6f789c9e412043004b2e15328ff3689ada7b","skill_md_path":"skills/make-pdf/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/timurgaleev/vibestack/tree/main/skills/make-pdf"},"layout":"multi","source":"github","category":"vibestack","frontmatter":{"name":"make-pdf","description":"Generate professional PDFs from code, markdown, or HTML in the current repository.\nSupports cover pages, tables of contents, watermarks, custom margins, and page sizes.\nUse when asked to \"make pdf\", \"generate pdf\", \"export to pdf\", \"create pdf report\",\nor \"pdf preview\"."},"skills_sh_url":"https://skills.sh/timurgaleev/vibestack/make-pdf"},"updatedAt":"2026-05-18T19:06:22.088Z"}}