# Claude Code - Skills Shared Environment Variables # Location: .claude/skills/.env # Priority: Medium (overrides .claude/.env, overridden by skill-specific .env) # Scope: Shared across all skills, higher priority than global .claude/.env # Setup: Copy to .claude/skills/.env and configure # ============================================ # Environment Variable Hierarchy # ============================================ # Priority order (highest to lowest): # 1. process.env - Runtime environment (HIGHEST) # 2. .claude/skills//.env - Skill-specific overrides # 3. .claude/skills/.env - Shared across skills (this file) # 4. .claude/.env - Global defaults (LOWEST) # # All skills use centralized resolver: ~/.claude/scripts/resolve_env.py # Debug hierarchy: python ~/.claude/scripts/resolve_env.py --show-hierarchy --skill # ============================================ # Common Skill API Keys # ============================================ # Google Gemini API (shared by multiple skills) # Skills using: ai-multimodal, docs-seeker, repomix # Get from: https://aistudio.google.com/apikey GEMINI_API_KEY= # Vertex AI (Optional, for production workloads) # GEMINI_USE_VERTEX=true # VERTEX_PROJECT_ID= # VERTEX_LOCATION=us-central1 # ============================================ # Payment Integration APIs # ============================================ # SePay API (Vietnamese payment gateway) # Skill: payment-integration # SEPAY_API_KEY= # SEPAY_WEBHOOK_SECRET= # Polar API (Global SaaS monetization) # Skill: payment-integration # POLAR_ACCESS_TOKEN= # POLAR_WEBHOOK_SECRET= # ============================================ # MCP Server Configuration # ============================================ # Context7 MCP (Documentation search) # Skill: docs-seeker, mcp-management # Get your API key from https://context7.com/dashboard/api-keys # CONTEXT7_API_KEY= # ============================================ # Development Tools # ============================================ # Chrome DevTools (for chrome-devtools skill) # CHROME_EXECUTABLE_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome # PUPPETEER_SKIP_DOWNLOAD=true # ============================================ # Media Processing # ============================================ # FFmpeg path (if not in PATH) # Skill: media-processing, ai-multimodal # FFMPEG_PATH=/usr/local/bin/ffmpeg # ImageMagick path (if not in PATH) # Skill: media-processing # IMAGEMAGICK_PATH=/usr/local/bin/convert # ============================================ # Database Configuration (Shared) # ============================================ # Common database URLs shared across skills # DATABASE_URL=postgresql://user:pass@localhost:5432/db # MONGODB_URI=mongodb://localhost:27017/db # REDIS_URL=redis://localhost:6379 # ============================================ # Example Usage Scenarios # ============================================ # Scenario 1: Global default for all skills # .claude/.env: GEMINI_API_KEY=global-dev-key # Result: All skills use global-dev-key # # Scenario 2: Override for all skills # .claude/.env: GEMINI_API_KEY=global-dev-key # .claude/skills/.env (this file): GEMINI_API_KEY=skills-prod-key # Result: All skills use skills-prod-key # # Scenario 3: Skill-specific override # .claude/.env: GEMINI_API_KEY=global-key # .claude/skills/.env (this file): GEMINI_API_KEY=shared-key # .claude/skills/ai-multimodal/.env: GEMINI_API_KEY=high-quota-key # Result: ai-multimodal uses high-quota-key, other skills use shared-key # # Scenario 4: Runtime testing # export GEMINI_API_KEY=test-key # Result: All skills use test-key regardless of config files # # Priority: runtime > skill-specific > shared (this file) > global