Help us improve
Share bugs, ideas, or general feedback.
From astro
ACTIVATE when working with environment variables, feature flags, or runtime configuration in Astro. ACTIVATE for 'import.meta.env', '.env', 'PUBLIC_', 'feature flag', 'TRAINING_ENABLED'. Covers: server vs client variables (PUBLIC_ prefix), feature flags pattern with centralized config, TypeScript env declarations, build-time vs runtime variables, Netlify/Vercel deployment vars. DO NOT use for: general Astro setup, content configuration.
npx claudepluginhub fabiensalles/claude-marketplace --plugin astroHow this skill is triggered — by the user, by Claude, or both
Slash command
/astro:astro-envThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Patterns for configuration and feature flags in Astro projects.
Configures Astro adapters, environment variables, and build output for deploying to Vercel, Node.js, Cloudflare, and Netlify. Useful for first-time deploys, target switches, env management, and production debugging.
Provides Astro framework patterns for islands architecture, content collections, rendering strategies (SSG, SSR, hybrid), view transitions, partial hydration, and Cloudflare deployment.
Deploying Astro 6 apps — @astrojs/cloudflare (Workers, D1, KV, R2), @astrojs/vercel (Serverless/Edge, Image CDN), @astrojs/netlify (Edge Functions), @astrojs/node (standalone), ISR patterns, edge middleware, skew protection. Use for any deployment configuration.
Share bugs, ideas, or general feedback.
Patterns for configuration and feature flags in Astro projects.
project/
├── .env # Default (all environments)
├── .env.local # Local overrides (gitignored)
├── .env.development # Dev server only
├── .env.production # Build only
└── .env.example # Template for team
.env.{mode}.local (highest).env.{mode}.env.local.env (lowest)| Pattern | Server | Client | Notes |
|---|---|---|---|
MY_VAR | Yes | No | Default, secure |
PUBLIC_MY_VAR | Yes | Yes | Exposed in bundle |
import.meta.env.PROD | Yes | Yes | Built-in |
process.env.VAR | Functions only | No | Node.js runtime |
| Variable | Description |
|---|---|
import.meta.env.MODE | development or production |
import.meta.env.PROD | true in production |
import.meta.env.DEV | true in development |
import.meta.env.SSR | true on server |
import.meta.env.SITE | Site URL from config |
import.meta.env.BASE_URL | Base path from config |
# Server-side only (default)
DATABASE_URL=postgresql://localhost/mydb
# Client-side (PUBLIC_ prefix)
PUBLIC_API_URL=https://api.example.com
When implementing feature flags with centralized config, read
references/env-configuration-examples.mdfor the complete feature flags pattern with .env files and config.ts.
When adding TypeScript declarations for env vars, read
references/env-configuration-examples.mdfor the env.d.ts setup.
When deploying to Netlify/Vercel or understanding build-time vs runtime behavior, read
references/env-configuration-examples.mdfor deployment patterns and security best practices.