astro-deployment

Use when deploying an Astro 7 app to Cloudflare, Vercel, Netlify, or Node.js — adapter setup, ISR patterns, edge middleware.

fusengine/agents17 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: astro-deployment
description: Use when deploying an Astro 7 app to Cloudflare, Vercel, Netlify, or Node.js — adapter setup, ISR patterns, edge middleware.
license: MIT
---

<objective>
Configures Astro 7 deployment across the four major adapters: `@astrojs/cloudflare` (Workers runtime, D1/KV/R2 bindings, workerd local dev via `platformProxy`, v13+ required), `@astrojs/vercel` (Serverless/Edge, built-in Image CDN, skew protection), `@astrojs/netlify` (Deno-based Edge Functions), and `@astrojs/node` (standalone server).

Also covers output-mode selection (`static`/`server`, per-page `prerender`), ISR patterns implemented via platform caching (Cloudflare KV or Vercel `stale-while-revalidate`, since Astro has no native ISR), and edge middleware for auth/redirects/A-B testing. Does not cover Astro DB setup itself (astro-db) or Islands hydration directives (astro-islands) beyond what's needed to pick a server adapter.
</objective>

# Astro Deployment

Production deployment for Astro 7 across all major platforms — Cloudflare, Vercel, Netlify, and Node.js.

## Agent Workflow (MANDATORY)

Before ANY implementation, use `TeamCreate` to spawn 3 agents:

1. **fuse-ai-pilot:explore-codebase** - Analyze astro.config.mjs, output mode, and existing adapter
2. **fuse-ai-pilot:research-expert** - Verify adapter docs via Context7/Exa for target platform
3. **mcp__context7__query-docs** - Check Astro 7 adapter compatibility and breaking changes

After implementation, run **fuse-ai-pilot:sniper** for validation.

---

## Overview

### When to Use

- Deploying Astro to Cloudflare Workers with D1/KV/R2 bindings
- Configuring Vercel Serverless or Edge runtime with image CDN
- Setting up Netlify Edge Functions
- Running Astro as standalone Node.js server
- Implementing ISR (Incremental Static Regeneration) patterns
- Configuring edge middleware for auth/redirects

### Adapter Matrix

| Platform | Package | Runtime | Notes |
|----------|---------|---------|-------|
| Cloudflare | `@astrojs/cloudflare` v13+ | workerd | Astro 6: `astro dev` runs on workerd |
| Vercel | `@astrojs/vercel` | Node/Edge | Image CDN built-in |
| Netlify | `@astrojs/netlify` | Edge | Deno-based edge functions |
| Node.js | `@astrojs/node` | Node | Standalone server mode |

---

## Core Concepts

### Output Modes

- `output: 'static'` — Full SSG, no adapter needed
- `output: 'server'` — Full SSR, adapter required
- Per-page: Mix with `export const prerender = true/false`

### Cloudflare Astro

Astro 6 runs `astro dev` on workerd — same runtime as production. Enables D1, KV, R2 bindings in local dev via `platformProxy`. No more simulation gaps. Requires `@astrojs/cloudflare` v13+ and Node.js 22+.

### ISR Pattern

Astro has no native ISR. Implement with platform caching: Cloudflare KV as cache layer, or Vercel's `Cache-Control` with `stale-while-revalidate`.

### Skew Protection

On Vercel, enable skew protection to prevent asset mismatches between old client and new server during deployments.

---

## Reference Guide

### Concepts

| Topic | Reference | When to Consult |
|-------|-----------|-----------------|
| **Cloudflare** | [cloudflare-adapter.md](references/cloudflare-adapter.md) | Workers, D1, KV, R2, wrangler |
| **Vercel** | [vercel-adapter.md](references/vercel-adapter.md) | Serverless, Edge, Image CDN |
| **Netlify** | [netlify-adapter.md](references/netlify-adapter.md) | Edge Functions, forms |
| **Node.js** | [node-adapter.md](references/node-adapter.md) | Standalone, Express integration |
| **ISR Patterns** | [isr-patterns.md](references/isr-patterns.md) | Cache strategies, revalidation |
| **Edge Middleware** | [edge-middleware.md](references/edge-middleware.md) | Auth, redirects, A/B testing |

### Templates

| Template | When to Use |
|----------|-------------|
| [cloudflare-setup.md](references/templates/cloudflare-setup.md) | Full Cloudflare config with bindings |
| [vercel-setup.md](references/templates/vercel-setup.md) | Vercel config with Edge/Image CDN |

---

## Best Practices

1. **Match adapter to platform early** - Switching adapters mid-project is painful
2. **Cloudflare: use v13+ for Astro 7** - Required for workerd local dev
3. **Node.js 22+ for Astro 7** - Drops Node 18/20 support
4. **Per-page prerender** - Mix static and SSR for optimal performance
5. **Test bindings locally** - Cloudflare platformProxy enables local D1/KV/R2

More Deployment & CI/CD skills

azure-enterprise-infra-planner

microsoft/azure-skills

Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.

387.5k

azure-kubernetes-app-deploy

microsoft/azure-skills

Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.

380.4k

finetuning

microsoft/azure-skills

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

323.2k

← All Deployment & CI/CD skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY