agentleFS
relorureloru/new-relo/.claude/skills/deploy/SKILL.md

deploy

Skill1 starsChanged todayMITView on GitHub

Deploy the crosbynews Worker to Cloudflare and verify it's live. Syntax-checks every file under src/, surfaces branch/working-tree state, runs `npx wrangler deploy`, then curls the live site. Use when asked to deploy, ship, or push the Worker live.

161 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pm-discovery, qa-phase and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ww-w-aiSkill

    pm-discovery

    PM Agent Team - Automated product discovery, strategy, and PRD generation. Runs PM analysis workflow to produce comprehensive PRD before PDCA Plan phase.

    Also in 3 projects that use this

  • ww-w-aiSkill

    qa-phase

    Run QA tests at various levels (L1-L5) for features under PDCA management. Integrates with MCP tools to execute structured test plans.

    Also in 3 projects that use this

  • +10 more from ww-w-ai

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 143 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS contains --dry-run, run step 1, then the dry-run in step 3, and stop — nothing is uploaded and nothing goes live.

    line 15
  2. Distinctive:

    Not on a clean main? Say so and confirm the intent is a direct prod push from this working tree before continuing.

    line 51
  3. Very specific:

    Wait a few seconds, then confirm the live site — run the /verify-site checks, or at minimum re-fetch the homepage and any route you touched:

    line 69
  4. Very specific:

    Use -o /dev/null -w, not curl -sI: the proxy prepends an HTTP/1.1 200 Connection Established CONNECT line, so the first HTTP/...

    line 74
  5. Distinctive:

    If a change looks missing right after deploy, wait and re-check before calling it a failure — propagation isn't instant.

    line 77

“Common” is measured: kept by at least 6 in 10 of the 143 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy the Worker

Ship the Worker source under src/ to the crosbynews Worker and confirm the live site is healthy. Auth comes from CLOUDFLARE_API_TOKEN paired with CLOUDFLARE_ACCOUNT_ID (never a zone id — wrangler has no such concept) — never run wrangler login (it clobbers the token auth).

If $ARGUMENTS contains --dry-run, run step 1, then the dry-run in step 3, and stop — nothing is uploaded and nothing goes live.

1. Pre-flight — syntax gate

Mirror CI's gate before shipping. If this fails, STOP — do not deploy. It covers every file under src/, not just the entry point: node --check validates one file at a time and doesn't follow imports, so checking only src/index.js would pass while an imported module was unparseable.

find src -name '*.js' -print0 | xargs -0 -n1 node --check

Then the cross-module reference check and the renderer sweep (both pure node, no install):

node scripts/check-module-refs.mjs
node scripts/check-renders.mjs
node scripts/test-routes.mjs
node scripts/test-site-metrics.mjs
node scripts/test-record.mjs
node scripts/test-freshness.mjs
node scripts/test-health.mjs

node --check catches syntax errors but NOT a missing or renamed export — the dry-run in step 3 catches that, so treat it as a merge gate, not an optional extra. And NEITHER catches a module using another module's export without importing it, because esbuild treats an unresolved identifier as a global. That is what check-module-refs.mjs is for; run all three.

2. Pre-flight — know what you're shipping

npx wrangler deploy uploads the current working tree, not git. Deploying from a feature branch pushes that code straight to production, bypassing the PR + Syntax check gate. Check first:

git branch --show-current
git status --short
  • Not on a clean main? Say so and confirm the intent is a direct prod push from this working tree before continuing.
  • The canonical path is merge-to-main → CI deploys. A manual deploy is for out-of-band / urgent ships.

3. Deploy

npx wrangler deploy

Build-only check that uploads nothing (safe to run anytime):

npx wrangler deploy --dry-run

Note the Version ID and deployed URL from the output. (wrangler may also print a one-line "Cloudflare agent skills are available" banner — cosmetic; CI=1 npx wrangler deploy silences it.)

4. Verify (deploys land in ~10–40s)

Wait a few seconds, then confirm the live site — run the /verify-site checks, or at minimum re-fetch the homepage and any route you touched:

curl -s -o /dev/null -w "%{http_code}\n" https://crosbynews.com/

Use -o /dev/null -w, not curl -sI: the proxy prepends an HTTP/1.1 200 Connection Established CONNECT line, so the first HTTP/... line isn't the response's and a 301 misreads as 200 (see /verify-site). If a change looks missing right after deploy, wait and re-check before calling it a failure — propagation isn't instant.

Troubleshooting

  • Auth/permission error right after adding a new binding (D1, Queues, Vectorize, KV, …): a genuinely missing permission on CLOUDFLARE_API_TOKEN. Widening it needs the Cloudflare dashboard, which a session can't do itself — say so rather than retrying blind.
  • "Missing entry-point" / can't parse wrangler.jsonc: that's wrangler 3.x. Locally the pinned wrangler@^4 devDependency avoids it; in CI it's the wranglerVersion: "4" setting.
  • Never run wrangler login.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.