astro-deployment

Configures Astro 7 deployment adapters for Cloudflare, Vercel, Netlify, and Node.js platforms.

1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/fusengine/kimi-code --skill astro-deployment-fusengine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: astro-deployment
Source: https://github.com/fusengine/kimi-code/tree/main/plugins/astro-expert/skills/astro-deployment
Command: npx skills add https://github.com/fusengine/kimi-code --skill astro-deployment-fusengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deploying an Astro application to production requires choosing and correctly configuring a platform adapter, output mode, caching strategy, and edge middleware — each with platform-specific quirks and version constraints that are easy to get wrong. ## Core Features & Use Cases - Adapter Configuration: Set up @astrojs/cloudflare (v13+, workerd runtime, D1/KV/R2 bindings via platformProxy), @astrojs/vercel (Serverless/Edge, Image CDN, skew protection), @astrojs/netlify (Deno Edge Functions), and @astrojs/node (standalone or Express middleware mode). - ISR Patterns: Implement incremental static regeneration using Vercel ISR options, Cloudflare KV caching, or Cache-Control: stale-while-revalidate headers, since Astro has no native ISR. - Edge Middleware: Build middleware for auth checks, geo-based redirects, and A/B testing using defineMiddleware and sequence. - Use Case: You need to deploy an Astro 7 site to Cloudflare Workers with a D1 database and KV cache — this Skill provides the wrangler.toml bindings, adapter config, and per-page prerender setup to do it correctly. ## Quick Start Ask the agent to configure your Astro project for deployment to Cloudflare Workers with D1 and KV bindings enabled in local dev.

Frequently Asked Questions about astro-deployment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy an Astro site to Cloudflare Workers?▼

Install the adapter with `npx astro add cloudflare`, set `output: 'server'` in astro.config.mjs, and configure D1, KV, or R2 bindings in wrangler.toml. Astro 6+ requires `@astrojs/cloudflare` v13+ and Node.js 22+, with `platformProxy` enabling bindings in local dev.

How to implement ISR in Astro without native support?▼

Astro has no built-in ISR, so use platform caching instead. On Vercel, enable the `isr` adapter option with an expiration value; on Cloudflare, cache responses in KV with a TTL; on any platform, send `Cache-Control: s-maxage` with `stale-while-revalidate` headers.

Which Astro adapter should I use: Cloudflare, Vercel, Netlify, or Node?▼

Choose based on your hosting platform: `@astrojs/cloudflare` for Workers with D1/KV/R2, `@astrojs/vercel` for Serverless or Edge with Image CDN, `@astrojs/netlify` for Deno-based Edge Functions, and `@astrojs/node` for self-hosted standalone servers or Express integration.

Does Astro 7 support Node.js 18 or 20?▼

No, Astro 7 requires Node.js 22 or later and drops support for Node 18 and 20. The Cloudflare adapter additionally requires `@astrojs/cloudflare` v13+ and Wrangler 4.x for workerd-based local development.

How do I mix static and server-rendered pages in Astro?▼

Set `output: 'server'` in astro.config.mjs, then control rendering per page with `export const prerender = true` for static pages or `false` for SSR. This lets you combine static marketing pages with dynamic routes in one project.

How do I access Cloudflare D1 or KV bindings in Astro routes?▼

Access bindings through `Astro.locals.runtime.env` in .astro frontmatter or API routes, for example `DB.prepare('SELECT ...').all()` for D1 or `KV.put('key', 'value')` for KV. Enable `platformProxy` in the adapter config to use these bindings during local development.