igm-pages — Quick GuideA Claude Code skill (/igm-pages) that publishes a single self-contained HTML artefact to one of my Cloudflare Pages sites and returns a verified live URL — in one command.
TL;DR
publish <site> <slug> <file.html> --title "…"
Stages the artefact, deploys the whole site snapshot, and verifies the live URL returns 200 with the right title. Sites: ianmarr, virtualian.
| Site | URL | For |
|---|---|---|
ianmarr | ianmarr.pages.dev | Research briefings & profiles |
virtualian | virtualian.pages.dev | Experiments & general artefacts |
The canonical URL checked is https://<domain>/<slug> — the live page must return HTTP 200 and contain the artefact's own <title> in the body. The slug is the kebab-case URL path segment (e.g. secure-wipe-windows).
Exactly two. The agent runs the installed bundle — e.g. node ~/.claude/skills/igm-pages/scripts/igm-pages.mjs publish <site> <slug> <file.html> — while a human typically just asks Claude or types /igm-pages.
| Command | Does |
|---|---|
publish <site> <slug> <file.html> | Stage the artefact at its slug into the site's snapshot, deploy the full snapshot, verify the live URL. Flag: --title overrides the card title; otherwise taken from the artefact's <title>, else the slug. |
sync <site> [<slug>] | Redeploy the site's current on-disk snapshot without staging — the path for edits & removals: change files on disk, then sync. With a <slug>, verify that one URL. |
.html — all CSS/JS inlined, every image a data-URI. No external or local asset files.secure-wipe-windows).publish <site> <slug> <file.html> --title "…"Every run reports exactly one outcome. Relay it as-is:
published | Deployed and the live URL returned 200 with the expected title. |
|---|---|
deployed-but-unverified | Deploy succeeded but the content check didn't confirm in-window. |
failed | The deploy errored; nothing changed live. |
The one gotcha
Every Cloudflare Pages deploy replaces the entire site and publishes every file in the deployed folder. That's why the tool always redeploys the whole local snapshot at live/<site>/ — so adding one artefact never wipes the others. Never hand-run wrangler pages deploy on a partial folder.
There is no landing page on the live site: a site root / returns 404 by design, and artefacts are reached only by their direct slug URL. Instead, a local-only catalogue lives at the data dir's index.html (never deployed). It lists every artefact's title grouped by site, links to the live canonical URLs, and links to a local copy of this guide (guide.html).
An XDG layout. Only the snapshot under live/ is ever deployed; the data dir is not git-managed (durability comes from Time Machine, with Cloudflare as a secondary copy).
~/projects/igm-pages/ code (canonical) + content/<site>/<slug>/index.html — guide source, NO page data ~/.config/igm-pages/ config.json — Site → project/domain map ($XDG_CONFIG_HOME) ~/.local/share/igm-pages/ index.html — local-only catalogue → live URLs ($XDG_DATA_HOME) guide.html — local copy of this guide live/<site>/<slug>/index.html — the deployed snapshot ~/.claude/skills/igm-pages/ SKILL.md · scripts/igm-pages.mjs — installed bundle ~/.claude/commands/igm-pages.md the /igm-pages command
The tool is installed by install.sh as an esbuild single-file bundle with zero runtime npm dependencies — Node built-ins plus npx wrangler — and runs with the repo absent.
| Auth | CLOUDFLARE_API_TOKEN exported (scope: Account → Cloudflare Pages → Edit) and CLOUDFLARE_ACCOUNT_ID exported — or grant the token Account → Account Settings → Read so wrangler self-resolves the single account. |
|---|---|
| Runtime | node / npx (wrangler runs via npx); zero runtime npm dependencies. |
| Visibility | All *.pages.dev sites are public — only publish content cleared for release. |
| Artefact | One self-contained .html: CSS/JS inlined, images as data-URI; no external or local assets. |
| Cache | Deleting a slug and syncing leaves it absent from the new deploy, but Cloudflare's edge cache may serve the old copy until s-maxage (~days) expires. Verify a removal on the fresh per-deploy alias https://<hash>.<project>.pages.dev/…. |