Skip to content
Skills Library
DevOps & cloud · Automation

publish-web

/publish-web

Deploy a Next.js, Vite, or static web app to Vercel, or a Vite, static, or Next.js static-export app to Cloudflare Pages, with a custom domain and PWA install support. Use when the creator says publish, deploy, go live, put it online, PWA, custom domain, 发布网站, 部署, 上线, 网页版.

Licence
MIT
Last repository change
12.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
7
Scripts
1
HTML comments
0
URLs in SKILL.md
37
Deprecation

No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/check-pwa.sh

What it does and when to use it

Deploy a Next.js, Vite, or static web app to Vercel, or a Vite, static, or Next.js static-export app to Cloudflare Pages, with a custom domain and PWA install support. Use when the creator says publish, deploy, go live, put it online, PWA, custom domain, 发布网站, 部署, 上线, 网页版.

Original author description

Deploy a Next.js, Vite, or static web app to Vercel, or a Vite, static, or Next.js static-export app to Cloudflare Pages, with a custom domain and PWA install support. Use when the creator says publish, deploy, go live, put it online, PWA, custom domain, 发布网站, 部署, 上线, 网页版.

How it works

  1. When to use
  2. What you must provide
  3. Before you start
  4. Steps
  5. Verify
  6. Troubleshooting
  7. Update state
  8. Sources
Original SKILL.md headings · 151 lines, 2,144 words
SKILL.md preview
---
name: publish-web
description: >
  Deploy a Next.js, Vite, or static web app to Vercel, or a Vite, static,
  or Next.js static-export app to Cloudflare Pages, with a custom domain
  and PWA install support. Use when the creator says
  publish, deploy, go live, put it online, PWA, custom domain,
  发布网站, 部署, 上线, 网页版.
license: MIT
metadata:
  stage: publish
  platform: web
  version: "0.1.2"
  verified: "unverified"
  verified_version: ""
  zh: SKILL.zh.md
---

中文版:先读 SKILL.zh.md。If the creator writes in Chinese, read SKILL.zh.md and follow it instead.

## When to use

- The creator wants a web app live on a public HTTPS URL: "publish", "deploy", "go live", "put it online".
- The creator wants the app installable from the browser (PWA) or served on their own domain.
- `.app-creators/state.md` has `targets.web.intent: wanted` and `targets.web.status` is not `live`.
- Not this skill: the app ships as a native iOS or Android binary. Use `publish-ios` or `publish-android`.
- Not this skill: the creator asks whether the app is ready to publish, not to publish it. Use `publish-readiness`.

## What you must provide

- A Vercel account: the deploy target. The free Hobby plan is enough for a personal, non-commercial app; a commercial app needs a paid plan. Takes 5 minutes to sign up.
- A custom domain and access to its DNS settings (optional): only for the domain step. Buying a domain takes 10 minutes; `A` and `CNAME` changes usually propagate faster than nameserver changes, which can take 24 to 48 hours.
- A decision on the app's display name and short name (`name`, `short_name` in the manifest): shown under the installed icon. Takes 1 minute.

Ask once; record in `.app-creators/state.md`. Never ask for, paste, or store a token. Interactive runs use `vercel login`, which the creator completes in the browser. For CI or other non-interactive runs, the creator sets `VERCEL_TOKEN` in the environment. The Cloudflare Pages alternative reads `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`.

## Before you start

Read `.app-creators/state.md`. If the file is missing, run `app-creators` first and come back; if it is not installed, ask the creator to run `npx skills add interskh/app-creators-skills --skill app-creators`. If `schema` has a different major version than `1`, stop and ask the creator to run `app-creators`.

These fields must exist:

| field | set by |
|---|---|
| `framework.kind` (`vite`, `nextjs`, or `static`) | `app-creators` |
| `framework.package_manager` | `app-creators` |
| `targets.web.intent` | `app-creators` |
| `app.slug` | `app-creators` |
| `accounts.vercel` | the creator (ask once, see above) |
| `readiness.web` | `publish-readiness` |

If `framework.kind` is another value, stop: this skill deploys web builds only. If the project contradicts `framework.kind` (for example a `next.config.*` file in a project marked `vite`), trust the project and say so.

Readiness gate. A revision is current when no project file outside `.app-creators/` differs from it, in commits or the working tree: `git status --porcelain -- . ':(exclude).app-creators'` prints nothing and `git diff --quiet <revision> HEAD -- . ':(exclude).app-creators'` exits 0. An empty `revision` or a failing command means not current. `readiness.web.result: fail` at the current revision stops the skill; tell the creator to fix what `publish-readiness` reported. `unknown`, or a `pass` or `fail` whose `revision` is not current, lets the skill proceed with its own minimal checks; say "readiness is unknown, running minimal checks" to the creator. When the record is a `fail` that is not current, say instead "the last report recorded a fail at an older or uncommitted revision; run `publish-readiness` again", and still run the minimal checks. The minimal checks are: the production build succeeds (step 1) and `scripts/check-pwa.sh` passes on the local preview (step 2).

`scripts/` in this skill means this skill's own `scripts/` directory. Run every command below from the project root.

## Steps

1. Build the app. Default: the project's own build script. Alternative: none needed; Cloudflare Pages uses the same build.
   Run: `<pm> run build`, where `<pm>` is `framework.package_manager`.
   Expect: exit 0 and an output directory:
   - `vite`: `dist`.
   - `nextjs`: Vercel uses its Next.js defaults; Cloudflare Pages takes only a static export (`output: 'export'` in `next.config.*`), written to `out`.
   - `static`: no build; Vercel serves `public` if it exists, else the project root.
   If the build fails, stop and show the creator the first error.

2. Check PWA installability locally. Default: `scripts/check-pwa.sh`. Alternative: Chrome DevTools, Application panel, Manifest tab, Installability section.
   Run: `<pm> run preview` (Vite serves `dist` on port 4173); `<pm> run start` for a server-rendered Next.js app (`next start`, port 3000, after `<pm> run build`); or `python3 -I -m http.server 4173 --directory <output-dir>` for `static` and a Next.js export. Then `bash scripts/check-pwa.sh --allow-http <preview-url>` against the address the server prints.
   Expect: every line `PASS`. On a `FAIL`, fix the manifest, icons, or service worker with `references/pwa-checklist.md` and rebuild. If the creator says install support is not wanted, continue and skip the PWA lines in Verify. Stop the preview server afterwards.

3. Install the CLI and sign in. Default: Vercel CLI. Alternative: Wrangler, `npm i -D wrangler@latest`, then `npx wrangler login`.
   Run: `npm i -g vercel`, then `vercel login` if `vercel project ls` reports that you are not logged in.
   Expect: `vercel project ls` prints the projects in the creator's scope.

4. **effective** Link the Vercel project. Default: Vercel CLI. Alternative: `npx wrangler pages project list`, then `npx wrangler pages project create <app.slug> --production-branch=main` only if it is absent.
   Check first: if `.vercel/project.json` exists, the directory is already linked; reuse it and skip to step 5. Otherwise run `vercel project ls --filter <app.slug>`.
   Run: `--filter` matches substrings, so look for a project named exactly `<app.slug>`. If it exists, `vercel link --yes --project <app.slug>`. If not, `vercel project create <app.slug>`, then the same `vercel link` command.
   Expect: `.vercel/project.json` with `orgId` and `projectId`. Record `tools.deploy` and `targets.web.provider` right away: `vercel`, or `cloudflare-pages` on the alternative.

5. **effective** Deploy to production. Default: Vercel CLI. Alternative: `npx wrangler pages deploy <output-dir> --project-name=<app.slug> --branch=main --commit-hash=<src>`; `--branch` must be the project's production branch (ask the creator if the project existed before step 4), or Wrangler makes a preview. Check `npx wrangler pages deployment list --project-name=<app.slug>` for `<src>` first.
   Check first, in git: if `git status --porcelain -- . ':(exclude).app-creators' ':(exclude).vercel'` prints anything, ask the creator to commit. `<src>` is `git log -1 --format=%H -- . ':(exclude).app-creators' ':(exclude).vercel'`, the last commit that changed the app, so state-only commits keep the key. If `targets.web.url` is set, run `vercel list --prod --status READY -m commit=<src>` and `vercel inspect <targets.web.url>`. If the deployment `inspect` shows is in that list, production already serves this code: reuse it and skip the deploy command. In every other case, including either command failing, deploy. Not in git, or no commits yet: skip this check and deploy without `--meta`.
   Run: `vercel deploy --prod --meta commit=<src>`
   Expect: stdout is the unique deployment URL. The first deployment of a new project is production even without `--prod`. The unique URL can require a Vercel login under Standard Protection; production domains stay public, so the live checks use the production domain. If `targets.web.url` is empty, ask the creator for the production domain shown on the project's Overview tab in the Vercel dashboard. Record `targets.web.url` as its HTTPS URL right away. On Cloudflare Pages the production domain is `<app.slug>.pages.dev`, or the host the deploy output prints.

6. **effective** Add the custom domain (only if the creator gave one). Default: Vercel CLI. Alternative: Cloudflare dashboard, Workers & Pages, the project, Custom domains, Set up a domain.
   Check first: `vercel domains ls`. If the domain is listed for this project, skip the add command.
   Run: `vercel domains add <domain> <app.slug>`, then `vercel domains verify <domain> --project <app.slug>`.
   Expect: verify prints the records to set. Apex domain (`example.com`): an `A` record. Subdomain (`www.example.com`): a `CNAME` to the project-specific target, copied exactly, including the trailing period. A domain used by another Vercel account first needs the `TXT` record at `_vercel`. The creator adds these at the DNS provider. Rerun verify until it exits 0, then check the certificate with `vercel certs ls`. Record `targets.web.domain: <domain>` and set `targets.web.url` to the HTTPS URL of `<domain>`.
   On Cloudflare Pages, a subdomain needs a `CNAME` to `<app.slug>.pages.dev`, added after the domain is set up in the dashboard; an apex domain must be a zone on the same Cloudflare account.

7. Check the live site. Default: `scripts/check-pwa.sh`. Alternative: Chrome DevTools, Application panel, Manifest tab, on the live URL.
   Run: `bash scripts/check-pwa.sh <targets.web.url>`
   Expect: every line `PASS` and exit 0. Then run Verify and Update state.

Provider details and more commands: `references/vercel.md`, `references/cloudflare-pages.md`.

## Verify

- Run `bash scripts/check-pwa.sh <targets.web.url>` (no `--allow-http`). Expect: exit 0 and one `PASS` line each for `https`, `html`, `manifest-link`, `manifest-json`, `manifest-name`, `manifest-start-url`, `manifest-display`, `manifest-prefer-related-applications`, `icon-192x192`, `icon-512x512`, `service-worker-registration`, `service-worker-script`. Any `FAIL` line names the check and the reason; fix it and redeploy before you say done.
- If a custom domain was added, run `vercel domains verify <domain> --project <app.slug>`. Expect: exit 0.
- Ask the creator to open the live URL in Chrome, click the page once, and stay on it for 30 seconds. Expect: an Install button on the right of the address bar, or an Install item in the browser's overflow menu. After they install it, expect the app on the device's launch surface: the Applications folder on macOS, the Start menu on Windows, the home screen on Android.

## Troubleshooting

| symptom | cause | fix |
|---|---|---|
| Vercel shows **Invalid Configuration** for the domain | DNS records at the provider are missing or conflict with old `A`, `AAAA`, or `CNAME` records | Set the values from `vercel domains verify`; remove conflicting records for the same hostname |
| Subdomain does not resolve | Record name entered as the full hostname, or the `CNAME` value lost its trailing period | Use `www` as the name; copy the value exactly, including the final `.` |
| Certificate is not issued for the custom domain | A `CAA` record does not allow Let's Encrypt | Add `0 issue "letsencrypt.org"` to the domain's `CAA` records |
| Deep links in a Vite single-page app return 404 on Vercel | No rewrite to `index.html` | Add a `rewrites` entry from `/(.*)` to `/index.html` in `vercel.json`, then rerun `check-pwa.sh` |
| Cloudflare Pages custom domain shows error 522 | The `CNAME` was added before the domain was set up in the Pages dashboard | Set up the domain under the project's Custom domains first, then keep the `CNAME` |
| `check-pwa.sh`: `FAIL icon-512x512: no icons entry ...` while a 512 icon exists | The only 512 icon has `purpose: maskable` | Add a 512x512 PNG entry with no `purpose` or `purpose: any` |
| `check-pwa.sh`: `FAIL icon-...` or `FAIL service-worker-script` saying `served as text/html` | The file is missing from the build output and a rewrite to `index.html` answers for it | Put the file where the build copies it (Vite: `public/`), rebuild, and redeploy |
| `check-pwa.sh`: `FAIL https` on a local preview | Local previews use http | Pass `--allow-http` for the local preview only, never for the live URL |

## Update state

Read the whole frontmatter, change only these fields, append one `history` row, and write the whole frontmatter back in one write. Never write `readiness.*`.

- `targets.web.status`: `live` after step 7 passes on the live URL; `ready` if the deploy succeeded but Verify still fails.
- `targets.web.url`: the HTTPS URL of the production domain, or of the custom domain once it verifies.
- `targets.web.provider`: `vercel` or `cloudflare-pages`.
- `targets.web.domain`: the custom domain, or `""` if none.
- `tools.deploy`: `vercel` or `cloudflare-pages`.
- `accounts.vercel`: `has` or `missing`, only if the creator answered in this run.
- `history`: append `{ skill: publish-web, version: "0.1.2", date: <YYYY-MM-DD>, result: <live | ready | stopped> }`. Write the reason for `ready` or `stopped` in the notes below the frontmatter, not in the row.

## Sources

- [Vercel CLI overview](https://vercel.com/docs/cli), checked 2026-10-26.
- [vercel deploy](https://vercel.com/docs/cli/deploy), checked 2026-10-26.
- [vercel link](https://vercel.com/docs/cli/link), checked 2026-10-26.
- [Linking projects with Vercel CLI](https://vercel.com/docs/cli/project-linking), checked 2026-10-26.
- [vercel project](https://vercel.com/docs/cli/project), checked 2026-10-26.
- [vercel list](https://vercel.com/docs/cli/list), checked 2026-10-26.
- [vercel inspect](https://vercel.com/docs/cli/inspect), checked 2026-10-26.
- [vercel domains](https://vercel.com/docs/cli/domains), checked 2026-10-26.
- [vercel login](https://vercel.com/docs/cli/login), checked 2026-10-26.
- [Vercel CLI global options](https://vercel.com/docs/cli/global-options), checked 2026-10-26.
- [Deploying a project from the CLI](https://vercel.com/docs/projects/deploy-from-cli), checked 2026-10-26.
- [Generated URLs](https://vercel.com/docs/deployments/generated-urls), checked 2026-10-26.
- [Deployment Protection](https://vercel.com/docs/deployment-protection), checked 2026-10-26.
- [Configuring a build](https://vercel.com/docs/builds/configure-a-build), checked 2026-10-26.
- [Vite on Vercel](https://vercel.com/docs/frameworks/frontend/vite), checked 2026-10-26.
- [Next.js on Vercel](https://vercel.com/docs/frameworks/full-stack/nextjs), checked 2026-10-26.
- [Hobby plan](https://vercel.com/docs/plans/hobby), checked 2026-10-26.
- [Adding and configuring a custom domain](https://vercel.com/docs/domains/working-with-domains/add-a-domain), checked 2026-10-26.
- [Setting up a custom domain](https://vercel.com/docs/domains/set-up-custom-domain), checked 2026-10-26.
- [Troubleshooting domains](https://vercel.com/docs/domains/troubleshooting), checked 2026-10-26.
- [Cloudflare Pages Direct Upload](https://developers.cloudflare.com/pages/get-started/direct-upload/), checked 2026-10-26.
- [Wrangler Pages commands](https://developers.cloudflare.com/workers/wrangler/commands/pages/), checked 2026-10-26.
- [Install Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/), checked 2026-10-26.
- [Direct Upload with continuous integration](https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/), checked 2026-10-26.
- [Cloudflare Pages build configuration](https://developers.cloudflare.com/pages/configuration/build-configuration/), checked 2026-10-26.
- [Next.js on Cloudflare Pages](https://developers.cloudflare.com/pages/framework-guides/nextjs/), checked 2026-10-26.
- [Cloudflare Pages custom domains](https://developers.cloudflare.com/pages/configuration/custom-domains/), checked 2026-10-26.
- [Vite: deploying a static site](https://vite.dev/guide/static-deploy), checked 2026-10-26.
- [Next.js static exports](https://nextjs.org/docs/app/guides/static-exports), checked 2026-10-26.
- [Next.js CLI: next start](https://nextjs.org/docs/app/api-reference/cli/next), checked 2026-10-26.
- [Next.js: deploying as a Node.js server](https://nextjs.org/docs/app/getting-started/deploying), checked 2026-10-26.
- [web.dev: What does it take to be installable?](https://web.dev/articles/install-criteria), checked 2026-10-26.
- [Chrome DevTools: debug Progressive Web Apps](https://developer.chrome.com/docs/devtools/progressive-web-apps/), checked 2026-10-26.
- [MDN: Making PWAs installable](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable), checked 2026-10-26.
- [MDN: manifest icons](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/icons), checked 2026-10-26.
- [MDN: ServiceWorkerContainer.register()](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register), checked 2026-10-26.
- [W3C Service Workers: JavaScript MIME type requirement](https://w3c.github.io/ServiceWorker/), checked 2026-10-26.
Files in this package (7)
  • SKILL.md 17 KB
  • SKILL.zh.md 17 KB
  • references/cloudflare-pages.md 4 KB
  • references/pwa-checklist.md 8 KB
  • references/vercel.md 5 KB
  • references/verified-runs.md 1 KB
  • scripts/check-pwa.sh 21 KB

Versions

The database has no other skills named publish-web.

Database snapshot: 13.11.2026 · package version 9247ffd651e9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95lov-deploy-to-vercel
    Deploy frontend projects to Vercel with automatic custom domain setup. Handles Vite, Next.js, CRA, and static sites. Auto-configures Cloudflare DNS CNAME records and Vercel domain aliases. Supports SPA routing via vercel.json. Trigger when user says "deploy to vercel", "部署到…
  • 100cloudflare-pages
    Deploy static sites to Cloudflare Pages with custom domains and CI/CD. Use when the user wants to deploy a site to Cloudflare Pages, add a custom domain to a Pages project, set up GitHub Actions CI/CD for Cloudflare Pages, roll back a deployment, or verify deployment status.…
  • 100site-deploy
    Publishes this site to GitHub Pages, Cloudflare Pages, or both, including custom domains, DNS records, credentials and post-deploy verification. Use when the user says "publish this", "deploy", "deploy to GitHub", "deploy to Cloudflare", "set up the domain", "point my domain at…
  • 100cloudflare-deploy
    Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare. Do NOT use for deploying to Vercel, Netlify, or Render (use their respective skills).
  • 100cloudflare-deploy
    Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.
  • 95cloudflare-deploy
    Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.