$npx -y skills add Amal-David/pagecast --skill publish-reportPublish local HTML, Markdown, or built static web projects with Pagecast as shareable public URLs. Use whenever Codex creates or finishes an .html, .htm, .md, .markdown, or static build output that a person could share (a report, plan, doc, dashboard, or analysis) — proactively o
| 1 | # Publish with Pagecast |
| 2 | |
| 3 | Pagecast turns a local **HTML or Markdown** file (a report, plan, doc, or |
| 4 | dashboard) into a shareable public URL in the user's Pagecast Home. Execute an |
| 5 | explicit Pagecast request immediately; offer once when publishing would be |
| 6 | useful but the user did not request it. |
| 7 | |
| 8 | ## Consent and intent |
| 9 | |
| 10 | - “Publish this as a Pagecast”, “Pagecast this”, or equivalent is sufficient |
| 11 | consent. Run the publish command immediately and return the URL; do not ask |
| 12 | again. |
| 13 | - A proactive suggestion still asks once before publishing. |
| 14 | - If the user asks only for the command, provide the command and do not run it. |
| 15 | |
| 16 | ## When to offer |
| 17 | |
| 18 | **Default to offering.** Whenever you produce an `.html`/`.htm` or |
| 19 | `.md`/`.markdown` file that a person could reasonably share, proactively offer to |
| 20 | publish it — once, right after you finish making it. Do **not** wait to be asked, |
| 21 | and do **not** stay silent because you are unsure whether it is "worth it." If it |
| 22 | could be shared, offer. |
| 23 | |
| 24 | This includes: |
| 25 | |
| 26 | - A report you generated — test/coverage/Lighthouse/Playwright output, a data |
| 27 | dashboard, an analysis, a "here's what I built/found" summary. |
| 28 | - A written plan, proposal, design doc, spec, release notes, or doc. |
| 29 | - A static web project that was just built, with a generated entry file such as |
| 30 | `dist/index.html`, `build/index.html`, `out/index.html`, or `public/index.html`. |
| 31 | - Any time the user says "share", "publish", "make a link for", or "send" a doc. |
| 32 | |
| 33 | **The only files to skip** (don't offer): scratch/draft notes the user is clearly |
| 34 | keeping private, source code, config files, secrets, and repo-meta files (README, |
| 35 | CHANGELOG, CONTRIBUTING, LICENSE, AGENTS.md, CLAUDE.md, TODO/tasks), or anything |
| 36 | under `node_modules`/`dist` build internals. When it is borderline, **offer** — |
| 37 | the user can just say no. |
| 38 | |
| 39 | Ask **at most once per file.** If the user declines or ignores the offer, drop it |
| 40 | and don't re-ask for that file. Never nag across multiple turns. |
| 41 | |
| 42 | ## The proactive question |
| 43 | |
| 44 | > "Want me to publish this with Pagecast? It'll create a shareable public link." |
| 45 | |
| 46 | Only a proactive suggestion needs this follow-up. An explicit instruction to |
| 47 | publish with Pagecast already provides confirmation. |
| 48 | |
| 49 | ## How to publish |
| 50 | |
| 51 | Run the headless CLI with the **absolute path** and `--json`: |
| 52 | |
| 53 | ```sh |
| 54 | npx pagecast publish "/absolute/path/to/file.md" --json |
| 55 | ``` |
| 56 | |
| 57 | (HTML and Markdown both work — Markdown is rendered to a clean page. If `pagecast` |
| 58 | is installed globally/in the project, `pagecast publish "<path>" --json` is the same.) |
| 59 | |
| 60 | New links are **unlisted capability URLs**: a memorable prefix plus 128 bits of |
| 61 | opaque entropy. Anyone with the URL can view it; unlisted does not mean private. |
| 62 | The user can rename a link, add password protection, or make a short, shareable |
| 63 | "drop" link from the `npx pagecast` app. Existing word-only links remain valid. |
| 64 | |
| 65 | Managed links live in one user-level Home at `~/.pagecast/home/`, under |
| 66 | `/p/<slug>/`. The same item in the same agent context updates the existing URL; |
| 67 | a new item or context creates a new URL. Pagecast stores only a local hash of |
| 68 | the agent context identifier. |
| 69 | |
| 70 | ### Publish options |
| 71 | |
| 72 | Add any of these to a `publish` command: |
| 73 | |
| 74 | - `--expires <7d|12h|never>` — edge-enforced link expiry (default 30d). The page |
| 75 | returns 410 once expired; `--expires never` keeps it live until revoked. The |
| 76 | result JSON reports `expiresAt` (or none when never). |
| 77 | - `--label "<name>"` — set the page's display name in the Pagecast app. |
| 78 | - `--context-id "<id>"` — explicitly select the local agent context. |
| 79 | - `--new-link` — force a fresh URL. |
| 80 | - `--update "<url|slug|token>"` — update a known publication. |
| 81 | - `--non-interactive` — never open browser authentication; return a structured |
| 82 | authentication-required result instead. |
| 83 | |
| 84 | ```sh |
| 85 | npx pagecast publish "/absolute/path/to/report.html" --expires 7d --label "Launch report" --json |
| 86 | ``` |
| 87 | |
| 88 | ### Password handling |
| 89 | |
| 90 | Never ask the user to provide a page password in chat and never place a secret |
| 91 | in an agent-generated command or tool argument. Publish the page first, then |
| 92 | tell the user to open the local `npx pagecast` app and set password protection |
| 93 | there. This keeps the credential out of the model and tool transcript. |
| 94 | |
| 95 | **Publishing a plan** (e.g. after plan mode): the plan lives in your context, not |
| 96 | a file yet. If the user wants it shared, first write the plan markdown to a file |
| 97 | (e.g. `./plan.md`), then publish that path. Don't overwrite an existing file the |
| 98 | user cares about — pick a clear new name. |