Anthropic Multi-Environment Setup
SkillAI & models'Configure Claude across dev, staging, and production with different
Use Anthropic Multi-Environment Setup in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Anthropic Multi-Environment Setup and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Anthropic Multi-Environment Setup skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by jeremylongshore/tons-of-skills-marketplace in skills/.curated/clade-multi-env-setup/SKILL.md and read by ahel’s review.
Overview
Use different API keys, models, and limits across dev/staging/prod.
Environment Configuration
// config/anthropic.ts
interface AnthropicConfig {
apiKey: string;
model: string;
maxTokens: number;
maxRetries: number;
}
const configs: Record<string, AnthropicConfig> = {
development: {
apiKey: process.env.ANTHROPIC_API_KEY!,
model: 'claude-haiku-4-5-20251001', // Cheap for dev
maxTokens: 256,
maxRetries: 1,
},
staging: {
apiKey: process.env.ANTHROPIC_API_KEY!,
model: 'claude-sonnet-4-20250514',
maxTokens: 1024,
maxRetries: 2,
},
production: {
apiKey: process.env.ANTHROPIC_API_KEY!,
model: 'claude-sonnet-4-20250514',
maxTokens: 4096,
maxRetries: 3,
},
};
export const config = configs[process.env.NODE_ENV || 'development'];
Separate API Keys Per Environment
Use different Anthropic API keys for each environment:
- Dev key: Low tier, spending alerts at $10
- Staging key: Medium tier, spending alerts at $50
- Prod key: Highest tier, spending alerts at usage baseline + 50%
# .env.development
ANTHROPIC_API_KEY=sk-ant-dev-...
# .env.staging
ANTHROPIC_API_KEY=sk-ant-staging-...
# .env.production
ANTHROPIC_API_KEY=sk-ant-prod-...
Model Selection Strategy
| Environment | Model | Why |
|---|---|---|
| Development | Haiku | Fast iteration, cheap |
| Staging | Sonnet | Match prod quality |
| Production | Sonnet (default) | Balanced cost/quality |
| Production (complex) | Opus | Complex reasoning tasks |
Output
- Environment-specific Anthropic configuration (model, maxTokens, maxRetries)
- Separate API keys per environment with appropriate tier limits
- Spending alerts configured per environment
- Dev using Haiku (cheap), staging matching prod (Sonnet), prod using Sonnet/Opus
Error Handling
| Error | Cause | Solution |
|---|---|---|
| API Error | Check error type and status code | See clade-common-errors |
Examples
See Environment Configuration TypeScript pattern, API key separation strategy, and Model Selection Strategy table above.
Resources
Next Steps
See clade-observability for monitoring across environments.
Prerequisites
- Completed
clade-install-auth - Multiple environments (dev/staging/prod) configured
- Separate Anthropic API keys created per environment
Instructions
Step 1: Review the patterns below
Each section contains production-ready code examples. Copy and adapt them to your use case.
Step 2: Apply to your codebase
Integrate the patterns that match your requirements. Test each change individually.
Step 3: Verify
Run your test suite to confirm the integration works correctly.
Signals
- GitHub stars
- 3k
- Forks
- 415
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
clade-multi-env-setup- Source
- github.com/jeremylongshore/tons-of-skills-marketplace
github.com/jeremylongshore/tons-of-skills-marketplace
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptskill-creator
Skill · anthropics
More in AI & modelstriage
Skill · mattpocock
More in AI & modelsalgorithmic-art
Skill · anthropics
More in AI & modelscode-review-and-quality
Skill · addyosmani
More in AI & models