[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79HZYDF3Z1WFH9X4DPGT4DM":3,"skill-same:01M79HZYDF3Z1WFH9X4DPGT4DM":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":45},"01M79HZYDF3Z1WFH9X4DPGT4DM","explainer-reading-site-deploy",null,"Publish an already-built \u003CWORK_DIR>\u002Fsite\u002F to the shared Access-protected Cloudflare Pages library. Use when a local site exists and the user wants it online; use explainer-reading-site-initialize if hosting is not set up.","choplin\u002Fexplainer-studio","choplin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F342798?v=4","01M79HWTA907677Q3R963A4PVZ","Akihiro Okuno","01M79HWTB0VNAN238405SZ6ESK",1,"MIT","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fexplainer\u002Fexplainer-reading-site-deploy\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: explainer-reading-site-deploy\ndescription: \"Publish an already-built \u003CWORK_DIR>\u002Fsite\u002F to the shared Access-protected Cloudflare Pages library. Use when a local site exists and the user wants it online; use explainer-reading-site-initialize if hosting is not set up.\"\nuser-invocable: true\n---\n\n# Deploy Site — add a book to the hosted library\n\nPublish a pre-built reading site (`\u003CWORK_DIR>\u002Fsite\u002F`, from the matching PDF,\nEPUB, or paper site consumer) by adding it as a subpath to the shared **library**\ncreated by [[explainer-reading-site-initialize]], then deploying the whole library\nto its one Cloudflare Pages project. The book lands at\n`https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F`; earlier books stay put; the one Cloudflare\nAccess policy already covers it.\n\nKept separate from [[book-explainer-generate-site]] and the paper consumer (which\nonly build `site\u002F`) so generated sites can be reviewed before they go online and\nall hosting knowledge lives here.\n\nThe library manager (`library.py`) is owned by the **`explainer-reading-site-library-base`** skill; this skill runs it and drives wrangler. If `explainer-reading-site-library-base` is not installed, stop and say so rather than guessing a path.\n\n## When this applies\n\nThe inputs are a built `\u003CWORK_DIR>\u002Fsite\u002F` and an already-initialized library. If\n`site\u002F` does not exist, run the source format's site consumer first. If the library\nis not set up yet (first ever deploy), run [[explainer-reading-site-initialize]]\nfirst — this skill only adds to an existing library.\n\n## Prerequisites\n\n- The book site exists: `\u003CWORK_DIR>\u002Fsite\u002Findex.html` is present.\n- The library is initialized: `python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py status --namespace pdf-explainer`. If it prints \"not initialized\", stop and run [[explainer-reading-site-initialize]] first.\n- **`wrangler` is an essential prerequisite — this skill cannot publish without it.** Verify it is authenticated (`wrangler whoami`); if missing or unauthenticated, stop and have the user set it up before re-running. Do not attempt a non-wrangler deploy path.\n\n## Procedure\n\nRun **both `library.py` and wrangler without the command sandbox** (`dangerouslyDisableSandbox: true`). Two different reasons: wrangler needs the network, and `library.py` writes into the XDG library (`~\u002F.local\u002Fshare\u002Fpdf-explainer\u002F`) — **outside the workspace**, which the sandbox denies with a `PermissionError` on `shutil.rmtree`\u002F`copytree`. \"Local-only\" is not the same as \"sandbox-safe\": what decides it is *where a command writes*, not whether it touches the network.\n\n`library.py` renders a document-type-neutral index (the deploy root is shared across studios), and the XDG library namespace is caller-chosen via `--namespace` (**it must come after the subcommand**, e.g. `library.py add --namespace pdf-explainer …`). These pdf-explainer skills always pass `--namespace pdf-explainer`, so the library stays at `${XDG_DATA_HOME:-$HOME\u002F.local\u002Fshare}\u002Fpdf-explainer\u002F` exactly as before — no migration.\n\n1. **Decide the book's slug and card text.**\n   - `\u003Cslug>`: the URL subpath, lowercase `a-z0-9-`, derived from the work dir name. For a Japanese name, propose a romanized slug and confirm it. Reusing an existing slug **replaces** that already-published book in place — so `library.py add` refuses an existing slug unless `--force`. Check `library.py status` first; if the slug is already listed, confirm with the user that they mean to replace the published book before re-running with `--force`.\n   - `\u003Ctitle>`: the book's display title (from `reports\u002Foverview.md`'s heading).\n   - `\u003Cdesc>`: one line for the library index card — compose a short blurb from the overview's opening (not a copied sentence).\n2. **Add the book to the library** (copies `site\u002F` into `public\u002F\u003Cslug>\u002F`, records it, and rebuilds the library index):\n   ```sh\n   python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py \\\n     add --namespace pdf-explainer --slug \u003Cslug> --title \"\u003Ctitle>\" --desc \"\u003Cdesc>\" --from \"\u003CWORK_DIR>\u002Fsite\"\n   ```\n   Append `--force` **only** when deliberately replacing an existing slug, after the user confirmed the replace in step 1; without it, `add` stops rather than silently overwriting a published book.\n3. **Deploy the whole library** to the recorded project:\n   ```sh\n   PROJECT=$(python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py project --namespace pdf-explainer)\n   PUBLIC=$(python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py public --namespace pdf-explainer)\n   wrangler pages deploy \"$PUBLIC\" --project-name=\"$PROJECT\"\n   ```\n4. **Verify and report.** `curl -sI https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F` should return a 302 to the Access login (protected) — or 200 only if the user deliberately left Access off. Report the book URL `https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F` and the index URL.\n\n## Gotchas\n\n- **`wrangler` needs the network — run it without the command sandbox** (`dangerouslyDisableSandbox: true`). Under the sandbox it fails with TLS\u002Fconnection errors that look like auth problems.\n- **`library.py` also needs the sandbox off, for a different reason.** It never touches the network, but it writes to `~\u002F.local\u002Fshare\u002Fpdf-explainer\u002F` — outside the workspace the sandbox permits — so under the sandbox `add` dies with `PermissionError` while copying `site\u002F` into `public\u002F\u003Cslug>\u002F`. Do not read that as a broken script or a bad path; run it unsandboxed.\n- **Deploy always targets the whole `public\u002F`, never one book.** `wrangler pages deploy` replaces the project's entire content with the given directory, so deploying a single book's `site\u002F` would wipe every other book. Always deploy the library root from `library.py public`. `library.py add` is what puts the book into that root first.\n- **Access is already handled by [[explainer-reading-site-initialize]].** It covers the whole project, so a new subpath is protected automatically — no per-book Access step. If `curl` unexpectedly returns 200, Access was never enabled; point the user to initialize-site step 4.\n- **Never report the protection state from a local file.** Access lives in the Cloudflare dashboard; `library.json` does not record it (by design — see [[explainer-reading-site-library-base]]). The only way to know whether the site is protected is to ask the deployed URL, which is what step 4's `curl -sI` does. Telling the user \"the site is public\" on the strength of a local record is how you hand them a confident falsehood.\n- **Regenerate, then redeploy.** The matching PDF, EPUB, or paper consumer rebuilds\n  `\u003CWORK_DIR>\u002Fsite\u002F` from source; this skill copies whatever is there now. Re-run\n  that consumer before redeploying a changed book (same slug replaces it in place —\n  gated behind a user-confirmed `--force`).\n- **Pages limits: 25 MiB per file, 20,000 files across the whole library.** [[explainer-audio-narrate]]'s 64 kbps m4a (~5 MB\u002F10 min) is fine; a hand-added WAV can exceed 25 MiB and the deploy will reject it — re-encode it.\n\n## Success criteria\n\n- [ ] `library.py add` reported the book at `public\u002F\u003Cslug>\u002F`, and `library.py status` lists it once (replacing an existing slug went through a user-confirmed `--force`; no duplicate slug).\n- [ ] `wrangler pages deploy` targeted the library root (`library.py public`), not the book's own `site\u002F`, so previously deployed books are still present.\n- [ ] `curl -sI` against the book URL returned a 302 Access redirect (or 200 only if the user chose to keep the site public), and the state was reported.\n- [ ] The book URL `https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F` was reported to the user.\n","# Deploy Site — add a book to the hosted library\n\nPublish a pre-built reading site (`\u003CWORK_DIR>\u002Fsite\u002F`, from the matching PDF,\nEPUB, or paper site consumer) by adding it as a subpath to the shared **library**\ncreated by [[explainer-reading-site-initialize]], then deploying the whole library\nto its one Cloudflare Pages project. The book lands at\n`https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F`; earlier books stay put; the one Cloudflare\nAccess policy already covers it.\n\nKept separate from [[book-explainer-generate-site]] and the paper consumer (which\nonly build `site\u002F`) so generated sites can be reviewed before they go online and\nall hosting knowledge lives here.\n\nThe library manager (`library.py`) is owned by the **`explainer-reading-site-library-base`** skill; this skill runs it and drives wrangler. If `explainer-reading-site-library-base` is not installed, stop and say so rather than guessing a path.\n\n## When this applies\n\nThe inputs are a built `\u003CWORK_DIR>\u002Fsite\u002F` and an already-initialized library. If\n`site\u002F` does not exist, run the source format's site consumer first. If the library\nis not set up yet (first ever deploy), run [[explainer-reading-site-initialize]]\nfirst — this skill only adds to an existing library.\n\n## Prerequisites\n\n- The book site exists: `\u003CWORK_DIR>\u002Fsite\u002Findex.html` is present.\n- The library is initialized: `python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py status --namespace pdf-explainer`. If it prints \"not initialized\", stop and run [[explainer-reading-site-initialize]] first.\n- **`wrangler` is an essential prerequisite — this skill cannot publish without it.** Verify it is authenticated (`wrangler whoami`); if missing or unauthenticated, stop and have the user set it up before re-running. Do not attempt a non-wrangler deploy path.\n\n## Procedure\n\nRun **both `library.py` and wrangler without the command sandbox** (`dangerouslyDisableSandbox: true`). Two different reasons: wrangler needs the network, and `library.py` writes into the XDG library (`~\u002F.local\u002Fshare\u002Fpdf-explainer\u002F`) — **outside the workspace**, which the sandbox denies with a `PermissionError` on `shutil.rmtree`\u002F`copytree`. \"Local-only\" is not the same as \"sandbox-safe\": what decides it is *where a command writes*, not whether it touches the network.\n\n`library.py` renders a document-type-neutral index (the deploy root is shared across studios), and the XDG library namespace is caller-chosen via `--namespace` (**it must come after the subcommand**, e.g. `library.py add --namespace pdf-explainer …`). These pdf-explainer skills always pass `--namespace pdf-explainer`, so the library stays at `${XDG_DATA_HOME:-$HOME\u002F.local\u002Fshare}\u002Fpdf-explainer\u002F` exactly as before — no migration.\n\n1. **Decide the book's slug and card text.**\n   - `\u003Cslug>`: the URL subpath, lowercase `a-z0-9-`, derived from the work dir name. For a Japanese name, propose a romanized slug and confirm it. Reusing an existing slug **replaces** that already-published book in place — so `library.py add` refuses an existing slug unless `--force`. Check `library.py status` first; if the slug is already listed, confirm with the user that they mean to replace the published book before re-running with `--force`.\n   - `\u003Ctitle>`: the book's display title (from `reports\u002Foverview.md`'s heading).\n   - `\u003Cdesc>`: one line for the library index card — compose a short blurb from the overview's opening (not a copied sentence).\n2. **Add the book to the library** (copies `site\u002F` into `public\u002F\u003Cslug>\u002F`, records it, and rebuilds the library index):\n   ```sh\n   python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py \\\n     add --namespace pdf-explainer --slug \u003Cslug> --title \"\u003Ctitle>\" --desc \"\u003Cdesc>\" --from \"\u003CWORK_DIR>\u002Fsite\"\n   ```\n   Append `--force` **only** when deliberately replacing an existing slug, after the user confirmed the replace in step 1; without it, `add` stops rather than silently overwriting a published book.\n3. **Deploy the whole library** to the recorded project:\n   ```sh\n   PROJECT=$(python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py project --namespace pdf-explainer)\n   PUBLIC=$(python3 explainer-reading-site-library-base\u002Fscripts\u002Flibrary.py public --namespace pdf-explainer)\n   wrangler pages deploy \"$PUBLIC\" --project-name=\"$PROJECT\"\n   ```\n4. **Verify and report.** `curl -sI https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F` should return a 302 to the Access login (protected) — or 200 only if the user deliberately left Access off. Report the book URL `https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F` and the index URL.\n\n## Gotchas\n\n- **`wrangler` needs the network — run it without the command sandbox** (`dangerouslyDisableSandbox: true`). Under the sandbox it fails with TLS\u002Fconnection errors that look like auth problems.\n- **`library.py` also needs the sandbox off, for a different reason.** It never touches the network, but it writes to `~\u002F.local\u002Fshare\u002Fpdf-explainer\u002F` — outside the workspace the sandbox permits — so under the sandbox `add` dies with `PermissionError` while copying `site\u002F` into `public\u002F\u003Cslug>\u002F`. Do not read that as a broken script or a bad path; run it unsandboxed.\n- **Deploy always targets the whole `public\u002F`, never one book.** `wrangler pages deploy` replaces the project's entire content with the given directory, so deploying a single book's `site\u002F` would wipe every other book. Always deploy the library root from `library.py public`. `library.py add` is what puts the book into that root first.\n- **Access is already handled by [[explainer-reading-site-initialize]].** It covers the whole project, so a new subpath is protected automatically — no per-book Access step. If `curl` unexpectedly returns 200, Access was never enabled; point the user to initialize-site step 4.\n- **Never report the protection state from a local file.** Access lives in the Cloudflare dashboard; `library.json` does not record it (by design — see [[explainer-reading-site-library-base]]). The only way to know whether the site is protected is to ask the deployed URL, which is what step 4's `curl -sI` does. Telling the user \"the site is public\" on the strength of a local record is how you hand them a confident falsehood.\n- **Regenerate, then redeploy.** The matching PDF, EPUB, or paper consumer rebuilds\n  `\u003CWORK_DIR>\u002Fsite\u002F` from source; this skill copies whatever is there now. Re-run\n  that consumer before redeploying a changed book (same slug replaces it in place —\n  gated behind a user-confirmed `--force`).\n- **Pages limits: 25 MiB per file, 20,000 files across the whole library.** [[explainer-audio-narrate]]'s 64 kbps m4a (~5 MB\u002F10 min) is fine; a hand-added WAV can exceed 25 MiB and the deploy will reject it — re-encode it.\n\n## Success criteria\n\n- [ ] `library.py add` reported the book at `public\u002F\u003Cslug>\u002F`, and `library.py status` lists it once (replacing an existing slug went through a user-confirmed `--force`; no duplicate slug).\n- [ ] `wrangler pages deploy` targeted the library root (`library.py public`), not the book's own `site\u002F`, so previously deployed books are still present.\n- [ ] `curl -sI` against the book URL returned a 302 Access redirect (or 200 only if the user chose to keep the site public), and the state was reported.\n- [ ] The book URL `https:\u002F\u002F\u003Cproject>.pages.dev\u002F\u003Cslug>\u002F` was reported to the user.\n",{"name":5,"description":7,"user-invocable":24},true,"main","08b762ef2ded20d4feadbe6fb7bfdd28747b0848","skills\u002Fexplainer\u002Fexplainer-reading-site-deploy",0,"https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio","https:\u002F\u002Fgithub.com\u002Fchoplin","http:\u002F\u002Fwww.chopl.in\u002F","2026-10-27 17:11:10",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":24},[35,38,41],{"tool":36,"command":37},"npx","npx skills add choplin\u002Fexplainer-studio --skill explainer-reading-site-deploy",{"tool":39,"command":40},"bunx","bunx skills add choplin\u002Fexplainer-studio --skill explainer-reading-site-deploy",{"tool":42,"command":43},"pnpm","pnpm dlx skills add choplin\u002Fexplainer-studio --skill explainer-reading-site-deploy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fexplainer\u002Fexplainer-reading-site-deploy\u002FSKILL.md",[],[47,53,60,67,74,81],{"skillNo":48,"name":49,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M79J25VYQ91K75R5HNDYYV4Z","invalid-skill-frontmatter","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Finvalid-skill-frontmatter\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M79J1ZWAX4EYVXPKTMB2WBMG","pdf-explainer-summarize","Digest a book, manual, or other long non-paper PDF into a source-anchored Markdown overview. Use when the requested deliverable is only a report, digest, or summary. Use paper-explainer-summarize for academic papers, direct reading for short PDFs, and book-explainer for coordinated reports, audio, site, rebuild, or resume.","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-explainer\u002Fpdf-explainer-summarize\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M79J1WEQW2GT78X92RMFY1AF","pdf-explainer-pdf-stitch","Internal Phase 2 worker invoked once by pdf-explainer-summarize after chunk extraction. Reconciles sections across chunk boundaries, deduplicates the material, and writes the canonical structural spine and outline.","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-explainer\u002Fpdf-explainer-pdf-stitch\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M79J1RZTE0VSWAJ26BYSPDD9","pdf-explainer-pdf-extract","Internal Phase 1 worker invoked by pdf-explainer-summarize once per page chunk. Reads the chunk visually or from a faithful text layer and writes structured source material with a verbatim heading stream, not a finished report.","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-explainer\u002Fpdf-explainer-pdf-extract\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M79J1NVVQY4XP1BQAEJJ4A23","pdf-explainer-pdf-detail","Internal per-chapter worker invoked by book-explainer for PDF input. Re-read one resolved chapter span visually or from a faithful text layer and write a standalone detail report with [pNN] source anchors.","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-explainer\u002Fpdf-explainer-pdf-detail\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79J1JQM36YS9WVXFPFJHWC7","pdf-explainer-generate-site","Compatibility entry point for requesting a local PDF reading site from an existing work directory. Route through book-explainer so Artifact reconciliation and Planning still occur.","https:\u002F\u002Fgithub.com\u002Fchoplin\u002Fexplainer-studio\u002Fblob\u002Fmain\u002Fskills\u002Fpdf-explainer\u002Fpdf-explainer-generate-site\u002FSKILL.md",[],[]]