cf-pages-deploy
Skill1 starsChanged 6 days agoMITView on GitHub
Deploy a static site or single HTML file to Cloudflare Pages safely and verify it is live. Stages a clean copy (no .env, node_modules, README, keys), scans for secrets, creates the project if asked, deploys to production or a preview branch, then checks the live file matches byte for byte. Use for any "deploy/redeploy this to Cloudflare Pages / pages.dev" request.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- jin2004-cmd/codex-practical-skillstheir own version, first seen Nov 1, 2026
- 18798aa12/claude-code-skillstheir own version, first seen May 14, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- 18798aa12/claude-code-skills★ 1same name
- jin2004-cmd/codex-practical-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- bash-checkpointSkill
- brave-cdpSkill
- cf-backupSkill
- claude-md-doctorSkill
- claude-safety-auditSkill
- claude-sandboxSkill
- claude-token-auditSkill
- cws-extension-checkSkill
- env-doctorSkill
- event-recap-videoSkill
- freelance-proposalSkill
- gif-makerSkill
- itch-html5-packageSkill
- link-preview-checkSkill
- mcp-auditSkill
- package-guardSkill
- pwa-checkSkill
- read-guardSkill
- readme-upgradeSkill
- release-notesSkill
- secret-commit-guardSkill
- session-handoffSkill
- site-qaSkill
- thumbnail-makerSkill
- visual-diffSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Run --dry-run and read the file list before the first deploy of any folder.
- Very specific: line 21
Prefer --include for project folders that mix site and source files.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cf-pages-deploy
scripts/deploy.mjs is zero-dependency Node 22+ and calls npx wrangler. Run npx wrangler whoami first; if it says you're not logged in, ask the user to run npx wrangler login.
node deploy.mjs --project my-site --dir ./public --dry-run # ALWAYS first: shows exactly what goes live
node deploy.mjs --project my-site --dir ./public # production (branch main), verified
node deploy.mjs --project my-site --dir . --include "index.html,*.css,*.js,assets/**"
node deploy.mjs --project my-site --dir dist --build "npm run build"
node deploy.mjs --project new-site --dir dist --create # make the project if missing
node deploy.mjs --project my-site --dir dist --branch preview # preview URL; production untouchedRules
- Run
--dry-runand read the file list before the first deploy of any folder. Everything uploaded is public. - Prefer
--includefor project folders that mix site and source files. A single-file site is--include index.html. - Excluded by default:
.git,node_modules,.wrangler,.env*,.dev.vars, keys/certs,*.md,package*.json, lockfiles,wrangler.*, OS junk, logs and databases. They stay out under--includetoo (*.jsdoesn't reach intonode_modules) unless--includenames the exact path, and--excludestill applies. - The secret scan reads every non-binary file that would go live, whatever its extension.
- A secret found in a file that would go public stops the deploy. Never pass
--allow-secretsunless the user confirms the value is meant to be public (e.g. a browser-restricted Maps key). --createonly when the user wants a NEW project. Look up existing names first withnpx wrangler pages project list.- Production deploys replace the live site. Confirm with the user unless they asked for a deploy/redeploy.
Gotchas this script handles
- Real URL ≠ project name. Pages may add a suffix (
my-game-28c.pages.dev). The script reads the domain fromwrangler pages project list --json; report that URL, not a guessed one. - wrangler 4.15x+
pages project createdelegates to "Pages in Workers" and can fail ("Could not detect a directory containing static files") or create a Worker instead. The script passes the hidden--forceflag to create a classic Pages project. Only creation needs it. --branch main= production. Any other branch = preview deployment athttps://<hash>.<project>.pages.dev.- Unknown paths return HTTP 200 with
index.html(SPA fallback), so a 200 on/.envdoesn't mean it leaked. Check the body. - Limits: 25 MiB per file, 20,000 files per deployment.
- Redirects/headers: put
_redirects/_headersfiles in the site root. They're deployed as-is. - Verification retries for ~60 s. If it still fails, the edge may be slow. Report the deployment URL and re-check; don't redeploy blindly.
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
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.

