sickn33/agentic-awesome-skills/cloudflare-pages
Claude Code and agent skill by sickn33/agentic-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Deploy static sites and full-stack apps on Cloudflare Pages with previews,
Install
npx vskill@latest install sickn33/agentic-awesome-skills/cloudflare-pagesSKILL.md
Cloudflare Pages
Deploy frontend projects with preview builds, edge functions, and global CDN delivery on Cloudflare's network.
When to Use
- Deploying static sites (React, Vue, Astro, Hugo, Next.js static export).
- Full-stack applications using Pages Functions for server-side logic.
- Projects that need automatic preview deployments per pull request.
- Teams that want zero-config CDN with custom domain and TLS.
- Migrating from Vercel, Netlify, or GitHub Pages to Cloudflare's ecosystem.
Prerequisites
Pin a supported Wrangler/Node version; framework adapters and provider limits change. Full-stack Next.js requires the current supported Workers/OpenNext workflow rather than assuming the legacy next-on-pages adapter. Confirm account/project/environment before deploy/delete/domain changes; previews can expose private builds and need access control. _headers applies to static assets, not Functions responses: set security/CORS headers in Functions and implement OPTIONS as needed. Bindings/cache keys must be scoped to authorized users/tenants when data is private; the shared key sample is only for public data. The CI example needs trusted-branch secret boundaries and an explicit preview branch; do not deploy untrusted PR builds with production credentials.
- Node.js 18+ and npm installed locally.
- A Cloudflare account (free tier works for most projects).
- Wrangler CLI installed:
npm install -g wrangler. - Authenticated via
wrangler loginorCLOUDFLARE_API_TOKENenvironment variable. - Source code in a Git repository (GitHub or GitLab for dashboard integration).
Project Setup via Wrangler
Create a New Project
Deploy from Local Build Output
List and Manage Deployments
Dashboard Git Integration
- Navigate to Workers & Pages > Create application > Pages.
- Connect your GitHub or GitLab account.
- Select the repository and configure:
- Production branch:
main - Build command:
npm run build - Build output directory:
dist(orbuild,.next,publicdepending on framework)
- Set environment variables per environment (Production vs Preview).
Framework Presets
Cloudflare auto-detects frameworks. Override if needed:
| Framework | Build Command | Output Directory | |
|---|---|---|---|
| React CRA | npm run build | build | |
| Vite | npm run build | dist | |
| Next.js static export | npm run build with export configuration | out | |
| Astro | npm run build | dist | |
| Hugo | hugo | public | |
| SvelteKit | npm run build | .svelte-kit/cloudflare |
Preview Deployments
Every non-production branch gets a unique preview URL automatically.
Branch-Based Access Control
Preview Comment on Pull Requests
Enable the Cloudflare Pages GitHub App to post deployment URLs as PR comments. Configure under Settings > Builds & deployments > Preview comment.
Pages Functions
Pages Functions provide server-side logic deployed alongside your static site. Place files in a functions/ directory at the project root.
Basic API Route
Middleware
Functions with Bindings
Wrangler Configuration
Headers and Redirects
Custom Headers
Redirects
Custom Domains
CI/CD Integration
GitHub Actions
Troubleshooting
| Symptom | Cause | Fix | |
|---|---|---|---|
| Build fails with out-of-memory | Inspect current platform limit and logs | Reduce build memory or use a supported build environment | |
| Functions return 404 | functions/ directory not at project root | Move functions/ to repo root, not inside src/ | |
| Preview URL shows old content | Browser cache or stale deployment | Hard refresh; check deployment list for latest commit hash | |
| Custom domain shows SSL error | DNS/domain activation or certificate issue | Verify Pages domain status and official DNS requirements before changing records | |
_headers file ignored | File not in build output directory | Place in public/ so it copies to dist/ during build | |
| Bindings undefined in Functions | Missing wrangler.toml or dashboard config | Add bindings in wrangler.toml and redeploy | |
| Function size limit exceeded | Bundle exceeds current plan limit | Inspect bundle and supported limits; storing libraries remotely is not an automatic runtime fix |
Related Skills
- cloudflare-workers (
cloudflare-workers) - Edge backend logic and API routes - cloudflare-r2 (
cloudflare-r2) - Object storage for assets and uploads - cloudflare-zero-trust (
cloudflare-zero-trust) - Protect preview deployments with Access policies - cdn-setup (
cdn-setup) - General CDN configuration patterns
Limitations
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
- Docs-only import: upstream scripts and templates not bundled.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cloudflare-pages/SKILL.md
Popularity
- Repository stars
- 47,054
- Repository forks
- 6,853
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/agentic-awesome-skills/cloudflare-pages)