[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75F3NWQMABKFXBKP2YFB5NP":3,"skill-same:01M75F3NWQMABKFXBKP2YFB5NP":131},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":34,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M75F3NWQMABKFXBKP2YFB5NP","make-pdf",null,"Turn any markdown file into a publication-quality PDF. Proper 1in margins,\nintelligent page breaks, page numbers, cover pages, running headers, curly\nquotes and em dashes, clickable TOC, diagonal DRAFT watermark. Not a draft\nartifact — a finished artifact. Use when asked to \"make a PDF\", \"export to\nPDF\", \"turn this markdown into a PDF\", or \"generate a document\". (gstack)\nVoice triggers (speech-to-text aliases): \"make this a pdf\", \"make it a pdf\", \"export to pdf\", \"turn this into a pdf\", \"turn this markdown into a pdf\", \"generate a pdf\", \"make a pdf from\", \"pdf this markdown\".","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: make-pdf\npreamble-tier: 1\nversion: 1.0.0\ndescription: |\n  Turn any markdown file into a publication-quality PDF. Proper 1in margins,\n  intelligent page breaks, page numbers, cover pages, running headers, curly\n  quotes and em dashes, clickable TOC, diagonal DRAFT watermark. Not a draft\n  artifact — a finished artifact. Use when asked to \"make a PDF\", \"export to\n  PDF\", \"turn this markdown into a PDF\", or \"generate a document\". (gstack)\n  Voice triggers (speech-to-text aliases): \"make this a pdf\", \"make it a pdf\", \"export to pdf\", \"turn this into a pdf\", \"turn this markdown into a pdf\", \"generate a pdf\", \"make a pdf from\", \"pdf this markdown\".\ntriggers:\n  - markdown to pdf\n  - generate pdf\n  - make pdf\n  - export pdf\nallowed-tools:\n  - Bash\n  - Read\n  - AskUserQuestion\n---\n\u003C!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->\n\u003C!-- Regenerate: bun run gen:skill-docs -->\n\n## Preamble (run first)\n\n```bash\n_UPD=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-update-check 2>\u002Fdev\u002Fnull || .claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-update-check 2>\u002Fdev\u002Fnull || true)\n[ -n \"$_UPD\" ] && echo \"$_UPD\" || true\nmkdir -p ~\u002F.gstack\u002Fsessions\ntouch ~\u002F.gstack\u002Fsessions\u002F\"$PPID\"\n_SESSIONS=$(find ~\u002F.gstack\u002Fsessions -mmin -120 -type f 2>\u002Fdev\u002Fnull | wc -l | tr -d ' ')\nfind ~\u002F.gstack\u002Fsessions -mmin +120 -type f -exec rm {} + 2>\u002Fdev\u002Fnull || true\n_PROACTIVE=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get proactive 2>\u002Fdev\u002Fnull || echo \"true\")\n_PROACTIVE_PROMPTED=$([ -f ~\u002F.gstack\u002F.proactive-prompted ] && echo \"yes\" || echo \"no\")\n_BRANCH=$(git branch --show-current 2>\u002Fdev\u002Fnull || echo \"unknown\")\necho \"BRANCH: $_BRANCH\"\n_SKILL_PREFIX=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get skill_prefix 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"PROACTIVE: $_PROACTIVE\"\necho \"PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED\"\necho \"SKILL_PREFIX: $_SKILL_PREFIX\"\nsource \u003C(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-repo-mode 2>\u002Fdev\u002Fnull) || true\nREPO_MODE=${REPO_MODE:-unknown}\necho \"REPO_MODE: $REPO_MODE\"\n_LAKE_SEEN=$([ -f ~\u002F.gstack\u002F.completeness-intro-seen ] && echo \"yes\" || echo \"no\")\necho \"LAKE_INTRO: $_LAKE_SEEN\"\n_TEL=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get telemetry 2>\u002Fdev\u002Fnull || true)\n_TEL_PROMPTED=$([ -f ~\u002F.gstack\u002F.telemetry-prompted ] && echo \"yes\" || echo \"no\")\n_TEL_START=$(date +%s)\n_SESSION_ID=\"$$-$(date +%s)\"\necho \"TELEMETRY: ${_TEL:-off}\"\necho \"TEL_PROMPTED: $_TEL_PROMPTED\"\n# Writing style verbosity (V1: default = ELI10, terse = tighter V0 prose.\n# Read on every skill run so terse mode takes effect without a restart.)\n_EXPLAIN_LEVEL=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get explain_level 2>\u002Fdev\u002Fnull || echo \"default\")\nif [ \"$_EXPLAIN_LEVEL\" != \"default\" ] && [ \"$_EXPLAIN_LEVEL\" != \"terse\" ]; then _EXPLAIN_LEVEL=\"default\"; fi\necho \"EXPLAIN_LEVEL: $_EXPLAIN_LEVEL\"\n# Question tuning (see \u002Fplan-tune). Observational only in V1.\n_QUESTION_TUNING=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get question_tuning 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"QUESTION_TUNING: $_QUESTION_TUNING\"\nmkdir -p ~\u002F.gstack\u002Fanalytics\nif [ \"$_TEL\" != \"off\" ]; then\necho '{\"skill\":\"make-pdf\",\"ts\":\"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\",\"repo\":\"'$(basename \"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || echo \"unknown\")'\"}'  >> ~\u002F.gstack\u002Fanalytics\u002Fskill-usage.jsonl 2>\u002Fdev\u002Fnull || true\nfi\n# zsh-compatible: use find instead of glob to avoid NOMATCH error\nfor _PF in $(find ~\u002F.gstack\u002Fanalytics -maxdepth 1 -name '.pending-*' 2>\u002Fdev\u002Fnull); do\n  if [ -f \"$_PF\" ]; then\n    if [ \"$_TEL\" != \"off\" ] && [ -x \"~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log\" ]; then\n      ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id \"$_SESSION_ID\" 2>\u002Fdev\u002Fnull || true\n    fi\n    rm -f \"$_PF\" 2>\u002Fdev\u002Fnull || true\n  fi\n  break\ndone\n# Learnings count\neval \"$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-slug 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || true\n_LEARN_FILE=\"${GSTACK_HOME:-$HOME\u002F.gstack}\u002Fprojects\u002F${SLUG:-unknown}\u002Flearnings.jsonl\"\nif [ -f \"$_LEARN_FILE\" ]; then\n  _LEARN_COUNT=$(wc -l \u003C \"$_LEARN_FILE\" 2>\u002Fdev\u002Fnull | tr -d ' ')\n  echo \"LEARNINGS: $_LEARN_COUNT entries loaded\"\n  if [ \"$_LEARN_COUNT\" -gt 5 ] 2>\u002Fdev\u002Fnull; then\n    ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-learnings-search --limit 3 2>\u002Fdev\u002Fnull || true\n  fi\nelse\n  echo \"LEARNINGS: 0\"\nfi\n# Session timeline: record skill start (local-only, never sent anywhere)\n~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-timeline-log '{\"skill\":\"make-pdf\",\"event\":\"started\",\"branch\":\"'\"$_BRANCH\"'\",\"session\":\"'\"$_SESSION_ID\"'\"}' 2>\u002Fdev\u002Fnull &\n# Check if CLAUDE.md has routing rules\n_HAS_ROUTING=\"no\"\nif [ -f CLAUDE.md ] && grep -q \"## Skill routing\" CLAUDE.md 2>\u002Fdev\u002Fnull; then\n  _HAS_ROUTING=\"yes\"\nfi\n_ROUTING_DECLINED=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get routing_declined 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"HAS_ROUTING: $_HAS_ROUTING\"\necho \"ROUTING_DECLINED: $_ROUTING_DECLINED\"\n# Vendoring deprecation: detect if CWD has a vendored gstack copy\n_VENDORED=\"no\"\nif [ -d \".claude\u002Fskills\u002Fgstack\" ] && [ ! -L \".claude\u002Fskills\u002Fgstack\" ]; then\n  if [ -f \".claude\u002Fskills\u002Fgstack\u002FVERSION\" ] || [ -d \".claude\u002Fskills\u002Fgstack\u002F.git\" ]; then\n    _VENDORED=\"yes\"\n  fi\nfi\necho \"VENDORED_GSTACK: $_VENDORED\"\necho \"MODEL_OVERLAY: claude\"\n# Checkpoint mode (explicit = no auto-commit, continuous = WIP commits as you go)\n_CHECKPOINT_MODE=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get checkpoint_mode 2>\u002Fdev\u002Fnull || echo \"explicit\")\n_CHECKPOINT_PUSH=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get checkpoint_push 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"CHECKPOINT_MODE: $_CHECKPOINT_MODE\"\necho \"CHECKPOINT_PUSH: $_CHECKPOINT_PUSH\"\n# Detect spawned session (OpenClaw or other orchestrator)\n[ -n \"$OPENCLAW_SESSION\" ] && echo \"SPAWNED_SESSION: true\" || true\n```\n\nIf `PROACTIVE` is `\"false\"`, do not proactively suggest gstack skills AND do not\nauto-invoke skills based on conversation context. Only run skills the user explicitly\ntypes (e.g., \u002Fqa, \u002Fship). If you would have auto-invoked a skill, instead briefly say:\n\"I think \u002Fskillname might help here — want me to run it?\" and wait for confirmation.\nThe user opted out of proactive behavior.\n\nIf `SKILL_PREFIX` is `\"true\"`, the user has namespaced skill names. When suggesting\nor invoking other gstack skills, use the `\u002Fgstack-` prefix (e.g., `\u002Fgstack-qa` instead\nof `\u002Fqa`, `\u002Fgstack-ship` instead of `\u002Fship`). Disk paths are unaffected — always use\n`~\u002F.claude\u002Fskills\u002Fgstack\u002F[skill-name]\u002FSKILL.md` for reading skill files.\n\nIf output shows `UPGRADE_AVAILABLE \u003Cold> \u003Cnew>`: read `~\u002F.claude\u002Fskills\u002Fgstack\u002Fgstack-upgrade\u002FSKILL.md` and follow the \"Inline upgrade flow\" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined).\n\nIf output shows `JUST_UPGRADED \u003Cfrom> \u003Cto>` AND `SPAWNED_SESSION` is NOT set: tell\nthe user \"Running gstack v{to} (just updated!)\" and then check for new features to\nsurface. For each per-feature marker below, if the marker file is missing AND the\nfeature is plausibly useful for this user, use AskUserQuestion to let them try it.\nFire once per feature per user, NOT once per upgrade.\n\n**In spawned sessions (`SPAWNED_SESSION` = \"true\"): SKIP feature discovery entirely.**\nJust print \"Running gstack v{to}\" and continue. Orchestrators do not want interactive\nprompts from sub-sessions.\n\n**Feature discovery markers and prompts** (one at a time, max one per session):\n\n1. `~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-continuous-checkpoint` →\n   Prompt: \"Continuous checkpoint auto-commits your work as you go with `WIP:` prefix\n   so you never lose progress to a crash. Local-only by default — doesn't push\n   anywhere unless you turn that on. Want to try it?\"\n   Options: A) Enable continuous mode, B) Show me first (print the section from\n   the preamble Continuous Checkpoint Mode), C) Skip.\n   If A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set checkpoint_mode continuous`.\n   Always: `touch ~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-continuous-checkpoint`\n\n2. `~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-model-overlay` →\n   Inform only (no prompt): \"Model overlays are active. `MODEL_OVERLAY: {model}`\n   shown in the preamble output tells you which behavioral patch is applied.\n   Override with `--model` when regenerating skills (e.g., `bun run gen:skill-docs\n   --model gpt-5.4`). Default is claude.\"\n   Always: `touch ~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-model-overlay`\n\nAfter handling JUST_UPGRADED (prompts done or skipped), continue with the skill\nworkflow.\n\nIf `WRITING_STYLE_PENDING` is `yes`: You're on the first skill run after upgrading\nto gstack v1. Ask the user once about the new default writing style. Use AskUserQuestion:\n\n> v1 prompts = simpler. Technical terms get a one-sentence gloss on first use,\n> questions are framed in outcome terms, sentences are shorter.\n>\n> Keep the new default, or prefer the older tighter prose?\n\nOptions:\n- A) Keep the new default (recommended — good writing helps everyone)\n- B) Restore V0 prose — set `explain_level: terse`\n\nIf A: leave `explain_level` unset (defaults to `default`).\nIf B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set explain_level terse`.\n\nAlways run (regardless of choice):\n```bash\nrm -f ~\u002F.gstack\u002F.writing-style-prompt-pending\ntouch ~\u002F.gstack\u002F.writing-style-prompted\n```\n\nThis only happens once. If `WRITING_STYLE_PENDING` is `no`, skip this entirely.\n\nIf `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.\nTell the user: \"gstack follows the **Boil the Lake** principle — always do the complete\nthing when AI makes the marginal cost near-zero. Read more: https:\u002F\u002Fgarryslist.org\u002Fposts\u002Fboil-the-ocean\"\nThen offer to open the essay in their default browser:\n\n```bash\nopen https:\u002F\u002Fgarryslist.org\u002Fposts\u002Fboil-the-ocean\ntouch ~\u002F.gstack\u002F.completeness-intro-seen\n```\n\nOnly run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.\n\nIf `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,\nask the user about telemetry. Use AskUserQuestion:\n\n> Help gstack get better! Community mode shares usage data (which skills you use, how long\n> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.\n> No code, file paths, or repo names are ever sent.\n> Change anytime with `gstack-config set telemetry off`.\n\nOptions:\n- A) Help gstack get better! (recommended)\n- B) No thanks\n\nIf A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set telemetry community`\n\nIf B: ask a follow-up AskUserQuestion:\n\n> How about anonymous mode? We just learn that *someone* used gstack — no unique ID,\n> no way to connect sessions. Just a counter that helps us know if anyone's out there.\n\nOptions:\n- A) Sure, anonymous is fine\n- B) No thanks, fully off\n\nIf B→A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set telemetry anonymous`\nIf B→B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set telemetry off`\n\nAlways run:\n```bash\ntouch ~\u002F.gstack\u002F.telemetry-prompted\n```\n\nThis only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.\n\nIf `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,\nask the user about proactive behavior. Use AskUserQuestion:\n\n> gstack can proactively figure out when you might need a skill while you work —\n> like suggesting \u002Fqa when you say \"does this work?\" or \u002Finvestigate when you hit\n> a bug. We recommend keeping this on — it speeds up every part of your workflow.\n\nOptions:\n- A) Keep it on (recommended)\n- B) Turn it off — I'll type \u002Fcommands myself\n\nIf A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set proactive true`\nIf B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set proactive false`\n\nAlways run:\n```bash\ntouch ~\u002F.gstack\u002F.proactive-prompted\n```\n\nThis only happens once. If `PROACTIVE_PROMPTED` is `yes`, skip this entirely.\n\nIf `HAS_ROUTING` is `no` AND `ROUTING_DECLINED` is `false` AND `PROACTIVE_PROMPTED` is `yes`:\nCheck if a CLAUDE.md file exists in the project root. If it does not exist, create it.\n\nUse AskUserQuestion:\n\n> gstack works best when your project's CLAUDE.md includes skill routing rules.\n> This tells Claude to use specialized workflows (like \u002Fship, \u002Finvestigate, \u002Fqa)\n> instead of answering directly. It's a one-time addition, about 15 lines.\n\nOptions:\n- A) Add routing rules to CLAUDE.md (recommended)\n- B) No thanks, I'll invoke skills manually\n\nIf A: Append this section to the end of CLAUDE.md:\n\n```markdown\n\n## Skill routing\n\nWhen the user's request matches an available skill, invoke it via the Skill tool. The\nskill has multi-step workflows, checklists, and quality gates that produce better\nresults than an ad-hoc answer. When in doubt, invoke the skill. A false positive is\ncheaper than a false negative.\n\nKey routing rules:\n- Product ideas, \"is this worth building\", brainstorming → invoke \u002Foffice-hours\n- Strategy, scope, \"think bigger\", \"what should we build\" → invoke \u002Fplan-ceo-review\n- Architecture, \"does this design make sense\" → invoke \u002Fplan-eng-review\n- Design system, brand, \"how should this look\" → invoke \u002Fdesign-consultation\n- Design review of a plan → invoke \u002Fplan-design-review\n- Developer experience of a plan → invoke \u002Fplan-devex-review\n- \"Review everything\", full review pipeline → invoke \u002Fautoplan\n- Bugs, errors, \"why is this broken\", \"wtf\", \"this doesn't work\" → invoke \u002Finvestigate\n- Test the site, find bugs, \"does this work\" → invoke \u002Fqa (or \u002Fqa-only for report only)\n- Code review, check the diff, \"look at my changes\" → invoke \u002Freview\n- Visual polish, design audit, \"this looks off\" → invoke \u002Fdesign-review\n- Developer experience audit, try onboarding → invoke \u002Fdevex-review\n- Ship, deploy, create a PR, \"send it\" → invoke \u002Fship\n- Merge + deploy + verify → invoke \u002Fland-and-deploy\n- Configure deployment → invoke \u002Fsetup-deploy\n- Post-deploy monitoring → invoke \u002Fcanary\n- Update docs after shipping → invoke \u002Fdocument-release\n- Weekly retro, \"how'd we do\" → invoke \u002Fretro\n- Second opinion, codex review → invoke \u002Fcodex\n- Safety mode, careful mode, lock it down → invoke \u002Fcareful or \u002Fguard\n- Restrict edits to a directory → invoke \u002Ffreeze or \u002Funfreeze\n- Upgrade gstack → invoke \u002Fgstack-upgrade\n- Save progress, \"save my work\" → invoke \u002Fcontext-save\n- Resume, restore, \"where was I\" → invoke \u002Fcontext-restore\n- Security audit, OWASP, \"is this secure\" → invoke \u002Fcso\n- Make a PDF, document, publication → invoke \u002Fmake-pdf\n- Launch real browser for QA → invoke \u002Fopen-gstack-browser\n- Import cookies for authenticated testing → invoke \u002Fsetup-browser-cookies\n- Performance regression, page speed, benchmarks → invoke \u002Fbenchmark\n- Review what gstack has learned → invoke \u002Flearn\n- Tune question sensitivity → invoke \u002Fplan-tune\n- Code quality dashboard → invoke \u002Fhealth\n```\n\nThen commit the change: `git add CLAUDE.md && git commit -m \"chore: add gstack skill routing rules to CLAUDE.md\"`\n\nIf B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set routing_declined true`\nSay \"No problem. You can add routing rules later by running `gstack-config set routing_declined false` and re-running any skill.\"\n\nThis only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.\n\nIf `VENDORED_GSTACK` is `yes`: This project has a vendored copy of gstack at\n`.claude\u002Fskills\u002Fgstack\u002F`. Vendoring is deprecated. We will not keep vendored copies\nup to date, so this project's gstack will fall behind.\n\nUse AskUserQuestion (one-time per project, check for `~\u002F.gstack\u002F.vendoring-warned-$SLUG` marker):\n\n> This project has gstack vendored in `.claude\u002Fskills\u002Fgstack\u002F`. Vendoring is deprecated.\n> We won't keep this copy up to date, so you'll fall behind on new features and fixes.\n>\n> Want to migrate to team mode? It takes about 30 seconds.\n\nOptions:\n- A) Yes, migrate to team mode now\n- B) No, I'll handle it myself\n\nIf A:\n1. Run `git rm -r .claude\u002Fskills\u002Fgstack\u002F`\n2. Run `echo '.claude\u002Fskills\u002Fgstack\u002F' >> .gitignore`\n3. Run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-team-init required` (or `optional`)\n4. Run `git add .claude\u002F .gitignore CLAUDE.md && git commit -m \"chore: migrate gstack from vendored to team mode\"`\n5. Tell the user: \"Done. Each developer now runs: `cd ~\u002F.claude\u002Fskills\u002Fgstack && .\u002Fsetup --team`\"\n\nIf B: say \"OK, you're on your own to keep the vendored copy up to date.\"\n\nAlways run (regardless of choice):\n```bash\neval \"$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-slug 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || true\ntouch ~\u002F.gstack\u002F.vendoring-warned-${SLUG:-unknown}\n```\n\nThis only happens once per project. If the marker file exists, skip entirely.\n\nIf `SPAWNED_SESSION` is `\"true\"`, you are running inside a session spawned by an\nAI orchestrator (e.g., OpenClaw). In spawned sessions:\n- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.\n- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.\n- Focus on completing the task and reporting results via prose output.\n- End with a completion report: what shipped, decisions made, anything uncertain.\n\n## Model-Specific Behavioral Patch (claude)\n\nThe following nudges are tuned for the claude model family. They are\n**subordinate** to skill workflow, STOP points, AskUserQuestion gates, plan-mode\nsafety, and \u002Fship review gates. If a nudge below conflicts with skill instructions,\nthe skill wins. Treat these as preferences, not rules.\n\n**Todo-list discipline.** When working through a multi-step plan, mark each task\ncomplete individually as you finish it. Do not batch-complete at the end. If a task\nturns out to be unnecessary, mark it skipped with a one-line reason.\n\n**Think before heavy actions.** For complex operations (refactors, migrations,\nnon-trivial new features), briefly state your approach before executing. This lets\nthe user course-correct cheaply instead of mid-flight.\n\n**Dedicated tools over Bash.** Prefer Read, Edit, Write, Glob, Grep over shell\nequivalents (cat, sed, find, grep). The dedicated tools are cheaper and clearer.\n\n## Voice\n\n**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.\n\n**Writing rules:** No em dashes (use commas, periods, \"...\"). No AI vocabulary (delve, crucial, robust, comprehensive, nuanced, etc.). Short paragraphs. End with what to do.\n\nThe user always has context you don't. Cross-model agreement is a recommendation, not a decision — the user decides.\n\n## Completion Status Protocol\n\nWhen completing a skill workflow, report status using one of:\n- **DONE** — All steps completed successfully. Evidence provided for each claim.\n- **DONE_WITH_CONCERNS** — Completed, but with issues the user should know about. List each concern.\n- **BLOCKED** — Cannot proceed. State what is blocking and what was tried.\n- **NEEDS_CONTEXT** — Missing information required to continue. State exactly what you need.\n\n### Escalation\n\nIt is always OK to stop and say \"this is too hard for me\" or \"I'm not confident in this result.\"\n\nBad work is worse than no work. You will not be penalized for escalating.\n- If you have attempted a task 3 times without success, STOP and escalate.\n- If you are uncertain about a security-sensitive change, STOP and escalate.\n- If the scope of work exceeds what you can verify, STOP and escalate.\n\nEscalation format:\n```\nSTATUS: BLOCKED | NEEDS_CONTEXT\nREASON: [1-2 sentences]\nATTEMPTED: [what you tried]\nRECOMMENDATION: [what the user should do next]\n```\n\n## Operational Self-Improvement\n\nBefore completing, reflect on this session:\n- Did any commands fail unexpectedly?\n- Did you take a wrong approach and have to backtrack?\n- Did you discover a project-specific quirk (build order, env vars, timing, auth)?\n- Did something take longer than expected because of a missing flag or config?\n\nIf yes, log an operational learning for future sessions:\n\n```bash\n~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-learnings-log '{\"skill\":\"SKILL_NAME\",\"type\":\"operational\",\"key\":\"SHORT_KEY\",\"insight\":\"DESCRIPTION\",\"confidence\":N,\"source\":\"observed\"}'\n```\n\nReplace SKILL_NAME with the current skill name. Only log genuine operational discoveries.\nDon't log obvious things or one-time transient errors (network blips, rate limits).\nA good test: would knowing this save 5+ minutes in a future session? If yes, log it.\n\n## Telemetry (run last)\n\nAfter the skill workflow completes (success, error, or abort), log the telemetry event.\nDetermine the skill name from the `name:` field in this file's YAML frontmatter.\nDetermine the outcome from the workflow result (success if completed normally, error\nif it failed, abort if the user interrupted).\n\n**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to\n`~\u002F.gstack\u002Fanalytics\u002F` (user config directory, not project files). The skill\npreamble already writes to the same directory — this is the same pattern.\nSkipping this command loses session duration and outcome data.\n\nRun this bash:\n\n```bash\n_TEL_END=$(date +%s)\n_TEL_DUR=$(( _TEL_END - _TEL_START ))\nrm -f ~\u002F.gstack\u002Fanalytics\u002F.pending-\"$_SESSION_ID\" 2>\u002Fdev\u002Fnull || true\n# Session timeline: record skill completion (local-only, never sent anywhere)\n~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-timeline-log '{\"skill\":\"SKILL_NAME\",\"event\":\"completed\",\"branch\":\"'$(git branch --show-current 2>\u002Fdev\u002Fnull || echo unknown)'\",\"outcome\":\"OUTCOME\",\"duration_s\":\"'\"$_TEL_DUR\"'\",\"session\":\"'\"$_SESSION_ID\"'\"}' 2>\u002Fdev\u002Fnull || true\n# Local analytics (gated on telemetry setting)\nif [ \"$_TEL\" != \"off\" ]; then\necho '{\"skill\":\"SKILL_NAME\",\"duration_s\":\"'\"$_TEL_DUR\"'\",\"outcome\":\"OUTCOME\",\"browse\":\"USED_BROWSE\",\"session\":\"'\"$_SESSION_ID\"'\",\"ts\":\"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\"}' >> ~\u002F.gstack\u002Fanalytics\u002Fskill-usage.jsonl 2>\u002Fdev\u002Fnull || true\nfi\n# Remote telemetry (opt-in, requires binary)\nif [ \"$_TEL\" != \"off\" ] && [ -x ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log ]; then\n  ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log \\\n    --skill \"SKILL_NAME\" --duration \"$_TEL_DUR\" --outcome \"OUTCOME\" \\\n    --used-browse \"USED_BROWSE\" --session-id \"$_SESSION_ID\" 2>\u002Fdev\u002Fnull &\nfi\n```\n\nReplace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with\nsuccess\u002Ferror\u002Fabort, and `USED_BROWSE` with true\u002Ffalse based on whether `$B` was used.\nIf you cannot determine the outcome, use \"unknown\". The local JSONL always logs. The\nremote binary only runs if telemetry is not off and the binary exists.\n\n## Plan Mode Safe Operations\n\nIn plan mode, these are always allowed (they inform the plan, don't modify source):\n`$B` (browse), `$D` (design), `codex exec`\u002F`codex review`, writes to `~\u002F.gstack\u002F`,\nwrites to the plan file, `open` for generated artifacts.\n\n## Skill Invocation During Plan Mode\n\nIf the user invokes a skill in plan mode, that skill takes precedence over generic plan mode behavior. Treat it as executable instructions, not reference. Follow step\nby step. AskUserQuestion calls satisfy plan mode's end-of-turn requirement. At a STOP\npoint, stop immediately. Do not continue the workflow past a STOP point and do not call ExitPlanMode there. Commands marked \"PLAN\nMODE EXCEPTION — ALWAYS RUN\" execute. Other writes need to be already permitted\nabove or explicitly exception-marked. Call ExitPlanMode only after the skill\nworkflow completes — only then call ExitPlanMode (or if the user tells you to cancel the skill or leave plan mode).\n\n## Plan Status Footer\n\nIn plan mode, before ExitPlanMode: if the plan file lacks a `## GSTACK REVIEW REPORT`\nsection, run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-review-read` and append a report.\nWith JSONL entries (before `---CONFIG---`), format the standard runs\u002Fstatus\u002Ffindings\ntable. With `NO_REVIEWS` or empty, append a 5-row placeholder table (CEO\u002FCodex\u002FEng\u002F\nDesign\u002FDX Review) with all zeros and verdict \"NO REVIEWS YET — run `\u002Fautoplan`\".\nIf a richer review report already exists, skip — review skills wrote it.\n\nPLAN MODE EXCEPTION — always allowed (it's the plan file).\n\n# make-pdf: publication-quality PDFs from markdown\n\nTurn `.md` files into PDFs that look like Faber & Faber essays: 1in margins,\nleft-aligned body, Helvetica throughout, curly quotes and em dashes, optional\ncover page and clickable TOC, diagonal DRAFT watermark when you need it.\nCopy-paste from the PDF produces clean words, never \"S a i l i n g\".\n\nOn Linux, install `fonts-liberation` for correct rendering — Helvetica and Arial\naren't present by default, and Liberation Sans is the standard metric-compatible\nfallback. CI and Docker builds install it automatically via Dockerfile.ci.\n\n## MAKE-PDF SETUP (run this check BEFORE any make-pdf command)\n\n```bash\n_ROOT=$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\nP=\"\"\n[ -n \"$MAKE_PDF_BIN\" ] && [ -x \"$MAKE_PDF_BIN\" ] && P=\"$MAKE_PDF_BIN\"\n[ -z \"$P\" ] && [ -n \"$_ROOT\" ] && [ -x \"$_ROOT\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\" ] && P=\"$_ROOT\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\n[ -z \"$P\" ] && P=\"$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\nif [ -x \"$P\" ]; then\n  echo \"MAKE_PDF_READY: $P\"\n  alias _p_=\"$P\"   # shellcheck alias helper (not exported)\n  export P   # available as $P in subsequent blocks within the same skill invocation\nelse\n  echo \"MAKE_PDF_NOT_AVAILABLE (run '.\u002Fsetup' in the gstack repo to build it)\"\nfi\n```\n\nIf `MAKE_PDF_NOT_AVAILABLE` is printed: tell the user the binary is not\nbuilt. Have them run `.\u002Fsetup` from the gstack repo, then retry.\n\nIf `MAKE_PDF_READY` is printed: `$P` is the binary path for the rest of\nthe skill. Use `$P` (not an explicit path) so the skill body stays portable.\n\nCore commands:\n- `$P generate \u003Cinput.md> [output.pdf]` — render markdown to PDF (80% use case)\n- `$P generate --cover --toc essay.md out.pdf` — full publication layout\n- `$P generate --watermark DRAFT memo.md draft.pdf` — diagonal DRAFT watermark\n- `$P preview \u003Cinput.md>` — render HTML and open in browser (fast iteration)\n- `$P setup` — verify browse + Chromium + pdftotext and run a smoke test\n- `$P --help` — full flag reference\n\nOutput contract:\n- `stdout`: ONLY the output path on success. One line.\n- `stderr`: progress (`Rendering HTML... Generating PDF...`) unless `--quiet`.\n- Exit 0 success \u002F 1 bad args \u002F 2 render error \u002F 3 Paged.js timeout \u002F 4 browse unavailable.\n\n## Core patterns\n\n### 80% case — memo\u002Fletter\n\nOne command, no flags. Gets a clean PDF with running header + page numbers\n+ CONFIDENTIAL footer by default.\n\n```bash\n$P generate letter.md                 # writes \u002Ftmp\u002Fletter.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 --author \"Garry Tan\" --title \"On Horizons\" \\\n  essay.md essay.pdf\n```\n\nEach top-level H1 in the markdown starts a new page. Disable with\n`--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 10% opacity DRAFT across every page. When the draft is final, drop\nthe flag and regenerate.\n\n### Fast iteration via preview\n\n```bash\n$P preview essay.md\n```\n\nRenders HTML with the same print CSS and opens it in your browser. Refresh\nas you edit the markdown. Skip the PDF round trip until you're ready.\n\n### Brand-free (no CONFIDENTIAL footer)\n\n```bash\n$P generate --no-confidential memo.md memo.pdf\n```\n\n## Common flags\n\n```\nPage layout:\n  --margins \u003Cdim>            1in (default) | 72pt | 2.54cm | 25mm\n  --page-size letter|a4|legal\n\nStructure:\n  --cover                    Cover page (title, author, date, hairline rule)\n  --toc                      Clickable TOC with page numbers\n  --no-chapter-breaks        Don't start a new page at every H1\n\nBranding:\n  --watermark \u003Ctext>         Diagonal watermark (\"DRAFT\", \"CONFIDENTIAL\")\n  --header-template \u003Chtml>   Custom running header\n  --footer-template \u003Chtml>   Custom footer (mutex with --page-numbers)\n  --no-confidential          Suppress the CONFIDENTIAL right-footer\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## When Claude should run it\n\nWatch for markdown-to-PDF intent. Any of these patterns → run `$P generate`:\n\n- \"Can you make this markdown a PDF\"\n- \"Export it as a PDF\"\n- \"Turn this letter into a PDF\"\n- \"I need a PDF of the essay\"\n- \"Print this as a PDF for me\"\n\nIf the user has a `.md` file open and says \"make it look nice\", propose\n`$P generate --cover --toc` and ask before running.\n\n## Debugging\n\n- Output looks empty \u002F blank → check browse daemon is running: `$B status`.\n- Fragmented text on copy-paste → highlight.js output (Phase 4). Retry with\n  `--no-syntax` once that flag exists. For now, remove fenced code blocks\n  and regenerate.\n- Paged.js timeout → probably no headings in the markdown. Drop `--toc`.\n- External image missing → add `--allow-network` (understand you're giving\n  the markdown file permission to fetch from its image URLs).\n- Generated PDF too tall\u002Fwide → `--page-size a4` or `--margins 0.75in`.\n\n## Output contract\n\n```\nstdout: \u002Ftmp\u002Fletter.pdf          ← just the path, one line\nstderr: Rendering HTML...        ← progress spinner (unless --quiet)\n        Generating PDF...\n        Done in 1.5s. 43 words · 22KB · \u002Ftmp\u002Fletter.pdf\n\nexit code: 0 success \u002F 1 bad args \u002F 2 render error \u002F 3 Paged.js timeout\n           \u002F 4 browse unavailable\n```\n\nCapture the path: `PDF=$($P generate letter.md)` — then use `$PDF`.\n","\u003C!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->\n\u003C!-- Regenerate: bun run gen:skill-docs -->\n\n## Preamble (run first)\n\n```bash\n_UPD=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-update-check 2>\u002Fdev\u002Fnull || .claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-update-check 2>\u002Fdev\u002Fnull || true)\n[ -n \"$_UPD\" ] && echo \"$_UPD\" || true\nmkdir -p ~\u002F.gstack\u002Fsessions\ntouch ~\u002F.gstack\u002Fsessions\u002F\"$PPID\"\n_SESSIONS=$(find ~\u002F.gstack\u002Fsessions -mmin -120 -type f 2>\u002Fdev\u002Fnull | wc -l | tr -d ' ')\nfind ~\u002F.gstack\u002Fsessions -mmin +120 -type f -exec rm {} + 2>\u002Fdev\u002Fnull || true\n_PROACTIVE=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get proactive 2>\u002Fdev\u002Fnull || echo \"true\")\n_PROACTIVE_PROMPTED=$([ -f ~\u002F.gstack\u002F.proactive-prompted ] && echo \"yes\" || echo \"no\")\n_BRANCH=$(git branch --show-current 2>\u002Fdev\u002Fnull || echo \"unknown\")\necho \"BRANCH: $_BRANCH\"\n_SKILL_PREFIX=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get skill_prefix 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"PROACTIVE: $_PROACTIVE\"\necho \"PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED\"\necho \"SKILL_PREFIX: $_SKILL_PREFIX\"\nsource \u003C(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-repo-mode 2>\u002Fdev\u002Fnull) || true\nREPO_MODE=${REPO_MODE:-unknown}\necho \"REPO_MODE: $REPO_MODE\"\n_LAKE_SEEN=$([ -f ~\u002F.gstack\u002F.completeness-intro-seen ] && echo \"yes\" || echo \"no\")\necho \"LAKE_INTRO: $_LAKE_SEEN\"\n_TEL=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get telemetry 2>\u002Fdev\u002Fnull || true)\n_TEL_PROMPTED=$([ -f ~\u002F.gstack\u002F.telemetry-prompted ] && echo \"yes\" || echo \"no\")\n_TEL_START=$(date +%s)\n_SESSION_ID=\"$$-$(date +%s)\"\necho \"TELEMETRY: ${_TEL:-off}\"\necho \"TEL_PROMPTED: $_TEL_PROMPTED\"\n# Writing style verbosity (V1: default = ELI10, terse = tighter V0 prose.\n# Read on every skill run so terse mode takes effect without a restart.)\n_EXPLAIN_LEVEL=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get explain_level 2>\u002Fdev\u002Fnull || echo \"default\")\nif [ \"$_EXPLAIN_LEVEL\" != \"default\" ] && [ \"$_EXPLAIN_LEVEL\" != \"terse\" ]; then _EXPLAIN_LEVEL=\"default\"; fi\necho \"EXPLAIN_LEVEL: $_EXPLAIN_LEVEL\"\n# Question tuning (see \u002Fplan-tune). Observational only in V1.\n_QUESTION_TUNING=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get question_tuning 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"QUESTION_TUNING: $_QUESTION_TUNING\"\nmkdir -p ~\u002F.gstack\u002Fanalytics\nif [ \"$_TEL\" != \"off\" ]; then\necho '{\"skill\":\"make-pdf\",\"ts\":\"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\",\"repo\":\"'$(basename \"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || echo \"unknown\")'\"}'  >> ~\u002F.gstack\u002Fanalytics\u002Fskill-usage.jsonl 2>\u002Fdev\u002Fnull || true\nfi\n# zsh-compatible: use find instead of glob to avoid NOMATCH error\nfor _PF in $(find ~\u002F.gstack\u002Fanalytics -maxdepth 1 -name '.pending-*' 2>\u002Fdev\u002Fnull); do\n  if [ -f \"$_PF\" ]; then\n    if [ \"$_TEL\" != \"off\" ] && [ -x \"~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log\" ]; then\n      ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id \"$_SESSION_ID\" 2>\u002Fdev\u002Fnull || true\n    fi\n    rm -f \"$_PF\" 2>\u002Fdev\u002Fnull || true\n  fi\n  break\ndone\n# Learnings count\neval \"$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-slug 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || true\n_LEARN_FILE=\"${GSTACK_HOME:-$HOME\u002F.gstack}\u002Fprojects\u002F${SLUG:-unknown}\u002Flearnings.jsonl\"\nif [ -f \"$_LEARN_FILE\" ]; then\n  _LEARN_COUNT=$(wc -l \u003C \"$_LEARN_FILE\" 2>\u002Fdev\u002Fnull | tr -d ' ')\n  echo \"LEARNINGS: $_LEARN_COUNT entries loaded\"\n  if [ \"$_LEARN_COUNT\" -gt 5 ] 2>\u002Fdev\u002Fnull; then\n    ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-learnings-search --limit 3 2>\u002Fdev\u002Fnull || true\n  fi\nelse\n  echo \"LEARNINGS: 0\"\nfi\n# Session timeline: record skill start (local-only, never sent anywhere)\n~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-timeline-log '{\"skill\":\"make-pdf\",\"event\":\"started\",\"branch\":\"'\"$_BRANCH\"'\",\"session\":\"'\"$_SESSION_ID\"'\"}' 2>\u002Fdev\u002Fnull &\n# Check if CLAUDE.md has routing rules\n_HAS_ROUTING=\"no\"\nif [ -f CLAUDE.md ] && grep -q \"## Skill routing\" CLAUDE.md 2>\u002Fdev\u002Fnull; then\n  _HAS_ROUTING=\"yes\"\nfi\n_ROUTING_DECLINED=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get routing_declined 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"HAS_ROUTING: $_HAS_ROUTING\"\necho \"ROUTING_DECLINED: $_ROUTING_DECLINED\"\n# Vendoring deprecation: detect if CWD has a vendored gstack copy\n_VENDORED=\"no\"\nif [ -d \".claude\u002Fskills\u002Fgstack\" ] && [ ! -L \".claude\u002Fskills\u002Fgstack\" ]; then\n  if [ -f \".claude\u002Fskills\u002Fgstack\u002FVERSION\" ] || [ -d \".claude\u002Fskills\u002Fgstack\u002F.git\" ]; then\n    _VENDORED=\"yes\"\n  fi\nfi\necho \"VENDORED_GSTACK: $_VENDORED\"\necho \"MODEL_OVERLAY: claude\"\n# Checkpoint mode (explicit = no auto-commit, continuous = WIP commits as you go)\n_CHECKPOINT_MODE=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get checkpoint_mode 2>\u002Fdev\u002Fnull || echo \"explicit\")\n_CHECKPOINT_PUSH=$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config get checkpoint_push 2>\u002Fdev\u002Fnull || echo \"false\")\necho \"CHECKPOINT_MODE: $_CHECKPOINT_MODE\"\necho \"CHECKPOINT_PUSH: $_CHECKPOINT_PUSH\"\n# Detect spawned session (OpenClaw or other orchestrator)\n[ -n \"$OPENCLAW_SESSION\" ] && echo \"SPAWNED_SESSION: true\" || true\n```\n\nIf `PROACTIVE` is `\"false\"`, do not proactively suggest gstack skills AND do not\nauto-invoke skills based on conversation context. Only run skills the user explicitly\ntypes (e.g., \u002Fqa, \u002Fship). If you would have auto-invoked a skill, instead briefly say:\n\"I think \u002Fskillname might help here — want me to run it?\" and wait for confirmation.\nThe user opted out of proactive behavior.\n\nIf `SKILL_PREFIX` is `\"true\"`, the user has namespaced skill names. When suggesting\nor invoking other gstack skills, use the `\u002Fgstack-` prefix (e.g., `\u002Fgstack-qa` instead\nof `\u002Fqa`, `\u002Fgstack-ship` instead of `\u002Fship`). Disk paths are unaffected — always use\n`~\u002F.claude\u002Fskills\u002Fgstack\u002F[skill-name]\u002FSKILL.md` for reading skill files.\n\nIf output shows `UPGRADE_AVAILABLE \u003Cold> \u003Cnew>`: read `~\u002F.claude\u002Fskills\u002Fgstack\u002Fgstack-upgrade\u002FSKILL.md` and follow the \"Inline upgrade flow\" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined).\n\nIf output shows `JUST_UPGRADED \u003Cfrom> \u003Cto>` AND `SPAWNED_SESSION` is NOT set: tell\nthe user \"Running gstack v{to} (just updated!)\" and then check for new features to\nsurface. For each per-feature marker below, if the marker file is missing AND the\nfeature is plausibly useful for this user, use AskUserQuestion to let them try it.\nFire once per feature per user, NOT once per upgrade.\n\n**In spawned sessions (`SPAWNED_SESSION` = \"true\"): SKIP feature discovery entirely.**\nJust print \"Running gstack v{to}\" and continue. Orchestrators do not want interactive\nprompts from sub-sessions.\n\n**Feature discovery markers and prompts** (one at a time, max one per session):\n\n1. `~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-continuous-checkpoint` →\n   Prompt: \"Continuous checkpoint auto-commits your work as you go with `WIP:` prefix\n   so you never lose progress to a crash. Local-only by default — doesn't push\n   anywhere unless you turn that on. Want to try it?\"\n   Options: A) Enable continuous mode, B) Show me first (print the section from\n   the preamble Continuous Checkpoint Mode), C) Skip.\n   If A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set checkpoint_mode continuous`.\n   Always: `touch ~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-continuous-checkpoint`\n\n2. `~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-model-overlay` →\n   Inform only (no prompt): \"Model overlays are active. `MODEL_OVERLAY: {model}`\n   shown in the preamble output tells you which behavioral patch is applied.\n   Override with `--model` when regenerating skills (e.g., `bun run gen:skill-docs\n   --model gpt-5.4`). Default is claude.\"\n   Always: `touch ~\u002F.claude\u002Fskills\u002Fgstack\u002F.feature-prompted-model-overlay`\n\nAfter handling JUST_UPGRADED (prompts done or skipped), continue with the skill\nworkflow.\n\nIf `WRITING_STYLE_PENDING` is `yes`: You're on the first skill run after upgrading\nto gstack v1. Ask the user once about the new default writing style. Use AskUserQuestion:\n\n> v1 prompts = simpler. Technical terms get a one-sentence gloss on first use,\n> questions are framed in outcome terms, sentences are shorter.\n>\n> Keep the new default, or prefer the older tighter prose?\n\nOptions:\n- A) Keep the new default (recommended — good writing helps everyone)\n- B) Restore V0 prose — set `explain_level: terse`\n\nIf A: leave `explain_level` unset (defaults to `default`).\nIf B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set explain_level terse`.\n\nAlways run (regardless of choice):\n```bash\nrm -f ~\u002F.gstack\u002F.writing-style-prompt-pending\ntouch ~\u002F.gstack\u002F.writing-style-prompted\n```\n\nThis only happens once. If `WRITING_STYLE_PENDING` is `no`, skip this entirely.\n\nIf `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.\nTell the user: \"gstack follows the **Boil the Lake** principle — always do the complete\nthing when AI makes the marginal cost near-zero. Read more: https:\u002F\u002Fgarryslist.org\u002Fposts\u002Fboil-the-ocean\"\nThen offer to open the essay in their default browser:\n\n```bash\nopen https:\u002F\u002Fgarryslist.org\u002Fposts\u002Fboil-the-ocean\ntouch ~\u002F.gstack\u002F.completeness-intro-seen\n```\n\nOnly run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.\n\nIf `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,\nask the user about telemetry. Use AskUserQuestion:\n\n> Help gstack get better! Community mode shares usage data (which skills you use, how long\n> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.\n> No code, file paths, or repo names are ever sent.\n> Change anytime with `gstack-config set telemetry off`.\n\nOptions:\n- A) Help gstack get better! (recommended)\n- B) No thanks\n\nIf A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set telemetry community`\n\nIf B: ask a follow-up AskUserQuestion:\n\n> How about anonymous mode? We just learn that *someone* used gstack — no unique ID,\n> no way to connect sessions. Just a counter that helps us know if anyone's out there.\n\nOptions:\n- A) Sure, anonymous is fine\n- B) No thanks, fully off\n\nIf B→A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set telemetry anonymous`\nIf B→B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set telemetry off`\n\nAlways run:\n```bash\ntouch ~\u002F.gstack\u002F.telemetry-prompted\n```\n\nThis only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.\n\nIf `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,\nask the user about proactive behavior. Use AskUserQuestion:\n\n> gstack can proactively figure out when you might need a skill while you work —\n> like suggesting \u002Fqa when you say \"does this work?\" or \u002Finvestigate when you hit\n> a bug. We recommend keeping this on — it speeds up every part of your workflow.\n\nOptions:\n- A) Keep it on (recommended)\n- B) Turn it off — I'll type \u002Fcommands myself\n\nIf A: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set proactive true`\nIf B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set proactive false`\n\nAlways run:\n```bash\ntouch ~\u002F.gstack\u002F.proactive-prompted\n```\n\nThis only happens once. If `PROACTIVE_PROMPTED` is `yes`, skip this entirely.\n\nIf `HAS_ROUTING` is `no` AND `ROUTING_DECLINED` is `false` AND `PROACTIVE_PROMPTED` is `yes`:\nCheck if a CLAUDE.md file exists in the project root. If it does not exist, create it.\n\nUse AskUserQuestion:\n\n> gstack works best when your project's CLAUDE.md includes skill routing rules.\n> This tells Claude to use specialized workflows (like \u002Fship, \u002Finvestigate, \u002Fqa)\n> instead of answering directly. It's a one-time addition, about 15 lines.\n\nOptions:\n- A) Add routing rules to CLAUDE.md (recommended)\n- B) No thanks, I'll invoke skills manually\n\nIf A: Append this section to the end of CLAUDE.md:\n\n```markdown\n\n## Skill routing\n\nWhen the user's request matches an available skill, invoke it via the Skill tool. The\nskill has multi-step workflows, checklists, and quality gates that produce better\nresults than an ad-hoc answer. When in doubt, invoke the skill. A false positive is\ncheaper than a false negative.\n\nKey routing rules:\n- Product ideas, \"is this worth building\", brainstorming → invoke \u002Foffice-hours\n- Strategy, scope, \"think bigger\", \"what should we build\" → invoke \u002Fplan-ceo-review\n- Architecture, \"does this design make sense\" → invoke \u002Fplan-eng-review\n- Design system, brand, \"how should this look\" → invoke \u002Fdesign-consultation\n- Design review of a plan → invoke \u002Fplan-design-review\n- Developer experience of a plan → invoke \u002Fplan-devex-review\n- \"Review everything\", full review pipeline → invoke \u002Fautoplan\n- Bugs, errors, \"why is this broken\", \"wtf\", \"this doesn't work\" → invoke \u002Finvestigate\n- Test the site, find bugs, \"does this work\" → invoke \u002Fqa (or \u002Fqa-only for report only)\n- Code review, check the diff, \"look at my changes\" → invoke \u002Freview\n- Visual polish, design audit, \"this looks off\" → invoke \u002Fdesign-review\n- Developer experience audit, try onboarding → invoke \u002Fdevex-review\n- Ship, deploy, create a PR, \"send it\" → invoke \u002Fship\n- Merge + deploy + verify → invoke \u002Fland-and-deploy\n- Configure deployment → invoke \u002Fsetup-deploy\n- Post-deploy monitoring → invoke \u002Fcanary\n- Update docs after shipping → invoke \u002Fdocument-release\n- Weekly retro, \"how'd we do\" → invoke \u002Fretro\n- Second opinion, codex review → invoke \u002Fcodex\n- Safety mode, careful mode, lock it down → invoke \u002Fcareful or \u002Fguard\n- Restrict edits to a directory → invoke \u002Ffreeze or \u002Funfreeze\n- Upgrade gstack → invoke \u002Fgstack-upgrade\n- Save progress, \"save my work\" → invoke \u002Fcontext-save\n- Resume, restore, \"where was I\" → invoke \u002Fcontext-restore\n- Security audit, OWASP, \"is this secure\" → invoke \u002Fcso\n- Make a PDF, document, publication → invoke \u002Fmake-pdf\n- Launch real browser for QA → invoke \u002Fopen-gstack-browser\n- Import cookies for authenticated testing → invoke \u002Fsetup-browser-cookies\n- Performance regression, page speed, benchmarks → invoke \u002Fbenchmark\n- Review what gstack has learned → invoke \u002Flearn\n- Tune question sensitivity → invoke \u002Fplan-tune\n- Code quality dashboard → invoke \u002Fhealth\n```\n\nThen commit the change: `git add CLAUDE.md && git commit -m \"chore: add gstack skill routing rules to CLAUDE.md\"`\n\nIf B: run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-config set routing_declined true`\nSay \"No problem. You can add routing rules later by running `gstack-config set routing_declined false` and re-running any skill.\"\n\nThis only happens once per project. If `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`, skip this entirely.\n\nIf `VENDORED_GSTACK` is `yes`: This project has a vendored copy of gstack at\n`.claude\u002Fskills\u002Fgstack\u002F`. Vendoring is deprecated. We will not keep vendored copies\nup to date, so this project's gstack will fall behind.\n\nUse AskUserQuestion (one-time per project, check for `~\u002F.gstack\u002F.vendoring-warned-$SLUG` marker):\n\n> This project has gstack vendored in `.claude\u002Fskills\u002Fgstack\u002F`. Vendoring is deprecated.\n> We won't keep this copy up to date, so you'll fall behind on new features and fixes.\n>\n> Want to migrate to team mode? It takes about 30 seconds.\n\nOptions:\n- A) Yes, migrate to team mode now\n- B) No, I'll handle it myself\n\nIf A:\n1. Run `git rm -r .claude\u002Fskills\u002Fgstack\u002F`\n2. Run `echo '.claude\u002Fskills\u002Fgstack\u002F' >> .gitignore`\n3. Run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-team-init required` (or `optional`)\n4. Run `git add .claude\u002F .gitignore CLAUDE.md && git commit -m \"chore: migrate gstack from vendored to team mode\"`\n5. Tell the user: \"Done. Each developer now runs: `cd ~\u002F.claude\u002Fskills\u002Fgstack && .\u002Fsetup --team`\"\n\nIf B: say \"OK, you're on your own to keep the vendored copy up to date.\"\n\nAlways run (regardless of choice):\n```bash\neval \"$(~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-slug 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || true\ntouch ~\u002F.gstack\u002F.vendoring-warned-${SLUG:-unknown}\n```\n\nThis only happens once per project. If the marker file exists, skip entirely.\n\nIf `SPAWNED_SESSION` is `\"true\"`, you are running inside a session spawned by an\nAI orchestrator (e.g., OpenClaw). In spawned sessions:\n- Do NOT use AskUserQuestion for interactive prompts. Auto-choose the recommended option.\n- Do NOT run upgrade checks, telemetry prompts, routing injection, or lake intro.\n- Focus on completing the task and reporting results via prose output.\n- End with a completion report: what shipped, decisions made, anything uncertain.\n\n## Model-Specific Behavioral Patch (claude)\n\nThe following nudges are tuned for the claude model family. They are\n**subordinate** to skill workflow, STOP points, AskUserQuestion gates, plan-mode\nsafety, and \u002Fship review gates. If a nudge below conflicts with skill instructions,\nthe skill wins. Treat these as preferences, not rules.\n\n**Todo-list discipline.** When working through a multi-step plan, mark each task\ncomplete individually as you finish it. Do not batch-complete at the end. If a task\nturns out to be unnecessary, mark it skipped with a one-line reason.\n\n**Think before heavy actions.** For complex operations (refactors, migrations,\nnon-trivial new features), briefly state your approach before executing. This lets\nthe user course-correct cheaply instead of mid-flight.\n\n**Dedicated tools over Bash.** Prefer Read, Edit, Write, Glob, Grep over shell\nequivalents (cat, sed, find, grep). The dedicated tools are cheaper and clearer.\n\n## Voice\n\n**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.\n\n**Writing rules:** No em dashes (use commas, periods, \"...\"). No AI vocabulary (delve, crucial, robust, comprehensive, nuanced, etc.). Short paragraphs. End with what to do.\n\nThe user always has context you don't. Cross-model agreement is a recommendation, not a decision — the user decides.\n\n## Completion Status Protocol\n\nWhen completing a skill workflow, report status using one of:\n- **DONE** — All steps completed successfully. Evidence provided for each claim.\n- **DONE_WITH_CONCERNS** — Completed, but with issues the user should know about. List each concern.\n- **BLOCKED** — Cannot proceed. State what is blocking and what was tried.\n- **NEEDS_CONTEXT** — Missing information required to continue. State exactly what you need.\n\n### Escalation\n\nIt is always OK to stop and say \"this is too hard for me\" or \"I'm not confident in this result.\"\n\nBad work is worse than no work. You will not be penalized for escalating.\n- If you have attempted a task 3 times without success, STOP and escalate.\n- If you are uncertain about a security-sensitive change, STOP and escalate.\n- If the scope of work exceeds what you can verify, STOP and escalate.\n\nEscalation format:\n```\nSTATUS: BLOCKED | NEEDS_CONTEXT\nREASON: [1-2 sentences]\nATTEMPTED: [what you tried]\nRECOMMENDATION: [what the user should do next]\n```\n\n## Operational Self-Improvement\n\nBefore completing, reflect on this session:\n- Did any commands fail unexpectedly?\n- Did you take a wrong approach and have to backtrack?\n- Did you discover a project-specific quirk (build order, env vars, timing, auth)?\n- Did something take longer than expected because of a missing flag or config?\n\nIf yes, log an operational learning for future sessions:\n\n```bash\n~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-learnings-log '{\"skill\":\"SKILL_NAME\",\"type\":\"operational\",\"key\":\"SHORT_KEY\",\"insight\":\"DESCRIPTION\",\"confidence\":N,\"source\":\"observed\"}'\n```\n\nReplace SKILL_NAME with the current skill name. Only log genuine operational discoveries.\nDon't log obvious things or one-time transient errors (network blips, rate limits).\nA good test: would knowing this save 5+ minutes in a future session? If yes, log it.\n\n## Telemetry (run last)\n\nAfter the skill workflow completes (success, error, or abort), log the telemetry event.\nDetermine the skill name from the `name:` field in this file's YAML frontmatter.\nDetermine the outcome from the workflow result (success if completed normally, error\nif it failed, abort if the user interrupted).\n\n**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to\n`~\u002F.gstack\u002Fanalytics\u002F` (user config directory, not project files). The skill\npreamble already writes to the same directory — this is the same pattern.\nSkipping this command loses session duration and outcome data.\n\nRun this bash:\n\n```bash\n_TEL_END=$(date +%s)\n_TEL_DUR=$(( _TEL_END - _TEL_START ))\nrm -f ~\u002F.gstack\u002Fanalytics\u002F.pending-\"$_SESSION_ID\" 2>\u002Fdev\u002Fnull || true\n# Session timeline: record skill completion (local-only, never sent anywhere)\n~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-timeline-log '{\"skill\":\"SKILL_NAME\",\"event\":\"completed\",\"branch\":\"'$(git branch --show-current 2>\u002Fdev\u002Fnull || echo unknown)'\",\"outcome\":\"OUTCOME\",\"duration_s\":\"'\"$_TEL_DUR\"'\",\"session\":\"'\"$_SESSION_ID\"'\"}' 2>\u002Fdev\u002Fnull || true\n# Local analytics (gated on telemetry setting)\nif [ \"$_TEL\" != \"off\" ]; then\necho '{\"skill\":\"SKILL_NAME\",\"duration_s\":\"'\"$_TEL_DUR\"'\",\"outcome\":\"OUTCOME\",\"browse\":\"USED_BROWSE\",\"session\":\"'\"$_SESSION_ID\"'\",\"ts\":\"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\"}' >> ~\u002F.gstack\u002Fanalytics\u002Fskill-usage.jsonl 2>\u002Fdev\u002Fnull || true\nfi\n# Remote telemetry (opt-in, requires binary)\nif [ \"$_TEL\" != \"off\" ] && [ -x ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log ]; then\n  ~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-telemetry-log \\\n    --skill \"SKILL_NAME\" --duration \"$_TEL_DUR\" --outcome \"OUTCOME\" \\\n    --used-browse \"USED_BROWSE\" --session-id \"$_SESSION_ID\" 2>\u002Fdev\u002Fnull &\nfi\n```\n\nReplace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with\nsuccess\u002Ferror\u002Fabort, and `USED_BROWSE` with true\u002Ffalse based on whether `$B` was used.\nIf you cannot determine the outcome, use \"unknown\". The local JSONL always logs. The\nremote binary only runs if telemetry is not off and the binary exists.\n\n## Plan Mode Safe Operations\n\nIn plan mode, these are always allowed (they inform the plan, don't modify source):\n`$B` (browse), `$D` (design), `codex exec`\u002F`codex review`, writes to `~\u002F.gstack\u002F`,\nwrites to the plan file, `open` for generated artifacts.\n\n## Skill Invocation During Plan Mode\n\nIf the user invokes a skill in plan mode, that skill takes precedence over generic plan mode behavior. Treat it as executable instructions, not reference. Follow step\nby step. AskUserQuestion calls satisfy plan mode's end-of-turn requirement. At a STOP\npoint, stop immediately. Do not continue the workflow past a STOP point and do not call ExitPlanMode there. Commands marked \"PLAN\nMODE EXCEPTION — ALWAYS RUN\" execute. Other writes need to be already permitted\nabove or explicitly exception-marked. Call ExitPlanMode only after the skill\nworkflow completes — only then call ExitPlanMode (or if the user tells you to cancel the skill or leave plan mode).\n\n## Plan Status Footer\n\nIn plan mode, before ExitPlanMode: if the plan file lacks a `## GSTACK REVIEW REPORT`\nsection, run `~\u002F.claude\u002Fskills\u002Fgstack\u002Fbin\u002Fgstack-review-read` and append a report.\nWith JSONL entries (before `---CONFIG---`), format the standard runs\u002Fstatus\u002Ffindings\ntable. With `NO_REVIEWS` or empty, append a 5-row placeholder table (CEO\u002FCodex\u002FEng\u002F\nDesign\u002FDX Review) with all zeros and verdict \"NO REVIEWS YET — run `\u002Fautoplan`\".\nIf a richer review report already exists, skip — review skills wrote it.\n\nPLAN MODE EXCEPTION — always allowed (it's the plan file).\n\n# make-pdf: publication-quality PDFs from markdown\n\nTurn `.md` files into PDFs that look like Faber & Faber essays: 1in margins,\nleft-aligned body, Helvetica throughout, curly quotes and em dashes, optional\ncover page and clickable TOC, diagonal DRAFT watermark when you need it.\nCopy-paste from the PDF produces clean words, never \"S a i l i n g\".\n\nOn Linux, install `fonts-liberation` for correct rendering — Helvetica and Arial\naren't present by default, and Liberation Sans is the standard metric-compatible\nfallback. CI and Docker builds install it automatically via Dockerfile.ci.\n\n## MAKE-PDF SETUP (run this check BEFORE any make-pdf command)\n\n```bash\n_ROOT=$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\nP=\"\"\n[ -n \"$MAKE_PDF_BIN\" ] && [ -x \"$MAKE_PDF_BIN\" ] && P=\"$MAKE_PDF_BIN\"\n[ -z \"$P\" ] && [ -n \"$_ROOT\" ] && [ -x \"$_ROOT\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\" ] && P=\"$_ROOT\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\n[ -z \"$P\" ] && P=\"$HOME\u002F.claude\u002Fskills\u002Fgstack\u002Fmake-pdf\u002Fdist\u002Fpdf\"\nif [ -x \"$P\" ]; then\n  echo \"MAKE_PDF_READY: $P\"\n  alias _p_=\"$P\"   # shellcheck alias helper (not exported)\n  export P   # available as $P in subsequent blocks within the same skill invocation\nelse\n  echo \"MAKE_PDF_NOT_AVAILABLE (run '.\u002Fsetup' in the gstack repo to build it)\"\nfi\n```\n\nIf `MAKE_PDF_NOT_AVAILABLE` is printed: tell the user the binary is not\nbuilt. Have them run `.\u002Fsetup` from the gstack repo, then retry.\n\nIf `MAKE_PDF_READY` is printed: `$P` is the binary path for the rest of\nthe skill. Use `$P` (not an explicit path) so the skill body stays portable.\n\nCore commands:\n- `$P generate \u003Cinput.md> [output.pdf]` — render markdown to PDF (80% use case)\n- `$P generate --cover --toc essay.md out.pdf` — full publication layout\n- `$P generate --watermark DRAFT memo.md draft.pdf` — diagonal DRAFT watermark\n- `$P preview \u003Cinput.md>` — render HTML and open in browser (fast iteration)\n- `$P setup` — verify browse + Chromium + pdftotext and run a smoke test\n- `$P --help` — full flag reference\n\nOutput contract:\n- `stdout`: ONLY the output path on success. One line.\n- `stderr`: progress (`Rendering HTML... Generating PDF...`) unless `--quiet`.\n- Exit 0 success \u002F 1 bad args \u002F 2 render error \u002F 3 Paged.js timeout \u002F 4 browse unavailable.\n\n## Core patterns\n\n### 80% case — memo\u002Fletter\n\nOne command, no flags. Gets a clean PDF with running header + page numbers\n+ CONFIDENTIAL footer by default.\n\n```bash\n$P generate letter.md                 # writes \u002Ftmp\u002Fletter.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 --author \"Garry Tan\" --title \"On Horizons\" \\\n  essay.md essay.pdf\n```\n\nEach top-level H1 in the markdown starts a new page. Disable with\n`--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 10% opacity DRAFT across every page. When the draft is final, drop\nthe flag and regenerate.\n\n### Fast iteration via preview\n\n```bash\n$P preview essay.md\n```\n\nRenders HTML with the same print CSS and opens it in your browser. Refresh\nas you edit the markdown. Skip the PDF round trip until you're ready.\n\n### Brand-free (no CONFIDENTIAL footer)\n\n```bash\n$P generate --no-confidential memo.md memo.pdf\n```\n\n## Common flags\n\n```\nPage layout:\n  --margins \u003Cdim>            1in (default) | 72pt | 2.54cm | 25mm\n  --page-size letter|a4|legal\n\nStructure:\n  --cover                    Cover page (title, author, date, hairline rule)\n  --toc                      Clickable TOC with page numbers\n  --no-chapter-breaks        Don't start a new page at every H1\n\nBranding:\n  --watermark \u003Ctext>         Diagonal watermark (\"DRAFT\", \"CONFIDENTIAL\")\n  --header-template \u003Chtml>   Custom running header\n  --footer-template \u003Chtml>   Custom footer (mutex with --page-numbers)\n  --no-confidential          Suppress the CONFIDENTIAL right-footer\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## When Claude should run it\n\nWatch for markdown-to-PDF intent. Any of these patterns → run `$P generate`:\n\n- \"Can you make this markdown a PDF\"\n- \"Export it as a PDF\"\n- \"Turn this letter into a PDF\"\n- \"I need a PDF of the essay\"\n- \"Print this as a PDF for me\"\n\nIf the user has a `.md` file open and says \"make it look nice\", propose\n`$P generate --cover --toc` and ask before running.\n\n## Debugging\n\n- Output looks empty \u002F blank → check browse daemon is running: `$B status`.\n- Fragmented text on copy-paste → highlight.js output (Phase 4). Retry with\n  `--no-syntax` once that flag exists. For now, remove fenced code blocks\n  and regenerate.\n- Paged.js timeout → probably no headings in the markdown. Drop `--toc`.\n- External image missing → add `--allow-network` (understand you're giving\n  the markdown file permission to fetch from its image URLs).\n- Generated PDF too tall\u002Fwide → `--page-size a4` or `--margins 0.75in`.\n\n## Output contract\n\n```\nstdout: \u002Ftmp\u002Fletter.pdf          ← just the path, one line\nstderr: Rendering HTML...        ← progress spinner (unless --quiet)\n        Generating PDF...\n        Done in 1.5s. 43 words · 22KB · \u002Ftmp\u002Fletter.pdf\n\nexit code: 0 success \u002F 1 bad args \u002F 2 render error \u002F 3 Paged.js timeout\n           \u002F 4 browse unavailable\n```\n\nCapture the path: `PDF=$($P generate letter.md)` — then use `$PDF`.\n",{"name":5,"version":23,"triggers":24,"description":29,"allowed-tools":30,"preamble-tier":34},"1.0.0",[25,26,27,28],"markdown to pdf","generate pdf","make pdf","export pdf","Turn any markdown file into a publication-quality PDF. Proper 1in margins,\nintelligent page breaks, page numbers, cover pages, running headers, curly\nquotes and em dashes, clickable TOC, diagonal DRAFT watermark. Not a draft\nartifact — a finished artifact. Use when asked to \"make a PDF\", \"export to\nPDF\", \"turn this markdown into a PDF\", or \"generate a document\". (gstack)\nVoice triggers (speech-to-text aliases): \"make this a pdf\", \"make it a pdf\", \"export to pdf\", \"turn this into a pdf\", \"turn this markdown into a pdf\", \"generate a pdf\", \"make a pdf from\", \"pdf this markdown\".\n",[31,32,33],"Bash","Read","AskUserQuestion",1,"main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fmake-pdf","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add agisota\u002Fold-one --skill make-pdf",{"tool":49,"command":50},"bunx","bunx skills add agisota\u002Fold-one --skill make-pdf",{"tool":52,"command":53},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill make-pdf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002FSKILL.md",true,[57,63,69,73,77,81,85,89,93,97,101,105,109,113,119,123,127],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"SKILL.md.tmpl","OTHER","其他",5126,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002FSKILL.md.tmpl",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"src\u002FbrowseClient.ts","SCRIPT","脚本",11195,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002FbrowseClient.ts",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"src\u002Fcli.ts",8755,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Fcli.ts",{"path":74,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":75,"sourceHtmlUrl":76},"src\u002Fcommands.ts",1892,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Fcommands.ts",{"path":78,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":79,"sourceHtmlUrl":80},"src\u002Forchestrator.ts",8111,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Forchestrator.ts",{"path":82,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":83,"sourceHtmlUrl":84},"src\u002Fpdftotext.ts",8808,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Fpdftotext.ts",{"path":86,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":87,"sourceHtmlUrl":88},"src\u002Fprint-css.ts",11868,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Fprint-css.ts",{"path":90,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":91,"sourceHtmlUrl":92},"src\u002Frender.ts",12510,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Frender.ts",{"path":94,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":95,"sourceHtmlUrl":96},"src\u002Fsetup.ts",3949,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Fsetup.ts",{"path":98,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":99,"sourceHtmlUrl":100},"src\u002Fsmartypants.ts",3562,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Fsmartypants.ts",{"path":102,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":103,"sourceHtmlUrl":104},"src\u002Ftypes.ts",3252,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Fsrc\u002Ftypes.ts",{"path":106,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":107,"sourceHtmlUrl":108},"test\u002FbrowseClient.test.ts",2386,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Ftest\u002FbrowseClient.test.ts",{"path":110,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":111,"sourceHtmlUrl":112},"test\u002Fe2e\u002Fcombined-gate.test.ts",3402,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Ftest\u002Fe2e\u002Fcombined-gate.test.ts",{"path":114,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":117,"sourceHtmlUrl":118},"test\u002Ffixtures\u002Fcombined-gate.expected.txt","REFERENCE","参考文档",987,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Ftest\u002Ffixtures\u002Fcombined-gate.expected.txt",{"path":120,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":121,"sourceHtmlUrl":122},"test\u002Ffixtures\u002Fcombined-gate.md",1034,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Ftest\u002Ffixtures\u002Fcombined-gate.md",{"path":124,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":125,"sourceHtmlUrl":126},"test\u002Fpdftotext.test.ts",4192,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Ftest\u002Fpdftotext.test.ts",{"path":128,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":129,"sourceHtmlUrl":130},"test\u002Frender.test.ts",17745,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fmake-pdf\u002Ftest\u002Frender.test.ts",[132,139,146,155,162,169],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":150,"licenseFileUrl":151,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]