Manage Symfony configuration with .env files, parameters, secrets, and environment-specific settings
Manages Symfony environment variables, parameters, and secrets for configuration across development, testing, and production environments. Claude will use this when setting up .env files, configuring services.yaml parameters, or managing encrypted secrets for different deployment environments.
/plugin marketplace add MakFly/superpowers-symfony/plugin install makfly-superpowers-symfony@MakFly/superpowers-symfonyThis skill inherits all available tools. When active, it can use any tool Claude has access to.
.env # Default values (committed)
.env.local # Local overrides (not committed)
.env.test # Test environment defaults
.env.test.local # Local test overrides (not committed)
.env.prod # Production defaults
.env.prod.local # Production local overrides
1. .env
2. .env.local (not in test)
3. .env.{APP_ENV}
4. .env.{APP_ENV}.local
Later files override earlier ones.
# .env
# App configuration
APP_ENV=dev
APP_DEBUG=true
APP_SECRET=change-this-in-production
# Database
DATABASE_URL="postgresql://user:pass@localhost:5432/myapp?serverVersion=15"
# Mailer
MAILER_DSN=smtp://localhost:1025
# Third-party APIs
STRIPE_API_KEY=sk_test_xxx
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=xxx
# Feature flags
FEATURE_NEW_CHECKOUT=false
# Boolean
FEATURE_ENABLED=true # string "true"
# In PHP, compare as string or cast
$enabled = $_ENV['FEATURE_ENABLED'] === 'true';
# Or use filter_var
$enabled = filter_var($_ENV['FEATURE_ENABLED'], FILTER_VALIDATE_BOOLEAN);
# config/services.yaml
parameters:
app.admin_email: 'admin@example.com'
app.items_per_page: 20
app.supported_locales: ['en', 'fr', 'de']
# Using environment variables
app.database_url: '%env(DATABASE_URL)%'
app.stripe_key: '%env(STRIPE_API_KEY)%'
# Type casting
app.port: '%env(int:APP_PORT)%'
app.debug: '%env(bool:APP_DEBUG)%'
app.hosts: '%env(json:ALLOWED_HOSTS)%'
parameters:
# Cast to int
port: '%env(int:PORT)%'
# Cast to bool
debug: '%env(bool:DEBUG)%'
# Cast to float
rate: '%env(float:TAX_RATE)%'
# Parse JSON
config: '%env(json:CONFIG_JSON)%'
# Parse CSV
hosts: '%env(csv:ALLOWED_HOSTS)%'
# Base64 decode
secret: '%env(base64:ENCODED_SECRET)%'
# Read from file
cert: '%env(file:SSL_CERT_PATH)%'
# Resolve env var name from another env var
dsn: '%env(resolve:DATABASE_DSN)%'
# Default value
port: '%env(default:3000:PORT)%'
# Chained processors
config: '%env(json:file:CONFIG_PATH)%'
<?php
class PaginationService
{
public function __construct(
#[Autowire('%app.items_per_page%')]
private int $itemsPerPage,
) {}
}
// Or bind in services.yaml
services:
_defaults:
bind:
$adminEmail: '%app.admin_email%'
$itemsPerPage: '%app.items_per_page%'
# Generate keys (once per environment)
php bin/console secrets:generate-keys
# Add a secret
php bin/console secrets:set DATABASE_PASSWORD
# For production
php bin/console secrets:set DATABASE_PASSWORD --env=prod
# From file
php bin/console secrets:set SSL_CERT < cert.pem
config/secrets/
├── dev/
│ ├── dev.encrypt.public.php # Public key (committed)
│ └── dev.decrypt.private.php # Private key (not committed)
└── prod/
├── prod.encrypt.public.php
├── prod.DATABASE_PASSWORD.28a3f.php # Encrypted secret
└── prod.decrypt.private.php # Deploy securely
# Secrets are accessed like env vars
parameters:
database_password: '%env(DATABASE_PASSWORD)%'
doctrine:
dbal:
password: '%env(DATABASE_PASSWORD)%'
php bin/console secrets:list
php bin/console secrets:list --reveal # Show values
config/
├── packages/
│ ├── framework.yaml # All environments
│ ├── doctrine.yaml
│ ├── dev/
│ │ └── web_profiler.yaml # Dev only
│ ├── prod/
│ │ └── doctrine.yaml # Prod overrides
│ └── test/
│ └── framework.yaml # Test overrides
# config/packages/framework.yaml
when@dev:
framework:
profiler:
collect: true
when@prod:
framework:
profiler:
collect: false
when@test:
framework:
test: true
# config/services.yaml
parameters:
feature.new_checkout: '%env(bool:FEATURE_NEW_CHECKOUT)%'
feature.dark_mode: '%env(bool:FEATURE_DARK_MODE)%'
<?php
class CheckoutController
{
public function __construct(
#[Autowire('%feature.new_checkout%')]
private bool $newCheckoutEnabled,
) {}
public function checkout(): Response
{
if ($this->newCheckoutEnabled) {
return $this->newCheckoutFlow();
}
return $this->legacyCheckoutFlow();
}
}
# .env.local (not committed)
DATABASE_URL="postgresql://dev:dev@localhost:5432/myapp_dev"
MAILER_DSN=smtp://localhost:1025
# Set via server/container environment, not files
export APP_ENV=prod
export APP_SECRET=your-production-secret
export DATABASE_URL="postgresql://prod:xxx@db.server:5432/myapp"
class StripeService
{
public function __construct(
#[Autowire('%env(STRIPE_API_KEY)%')]
private string $apiKey,
) {
if (empty($this->apiKey)) {
throw new \RuntimeException('STRIPE_API_KEY is required');
}
}
}
# .gitignore
.env.local
.env.*.local
config/secrets/*/decrypt.private.php
# Show all parameters
php bin/console debug:container --parameters
# Show environment variables
php bin/console debug:container --env-vars
# Show secrets
php bin/console secrets:list --reveal
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.