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.
From astronpx claudepluginhub fabiensalles/claude-marketplace --plugin astroThis skill uses the workspace's default tool permissions.
references/env-configuration-examples.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
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.