Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Configure Claude API across dev, staging, and production environments with isolated keys, model routing, and spend controls per environment. Trigger with phrases like "anthropic environments", "claude multi-env", "anthropic staging setup", "claude dev vs prod config".
.claude/skills/jeremylongshore-anth-multi-env-setup/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -37% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -14% | 0% |
Configure isolated Claude API environments with per-env API keys, model selection, and spend controls using Anthropic Workspaces.
python# config.py import os from dataclasses import dataclass @dataclass class ClaudeConfig: api_key: str model: str max_tokens: int max_retries: int timeout: float monthly_budget_usd: float CONFIGS = { "development": ClaudeConfig( api_key=os.environ["ANTHROPIC_API_KEY_DEV"], model="claude-haiku-4-20250514", # Cheap for dev max_tokens=256, max_retries=1, timeout=15.0, monthly_budget_usd=10.0, ), "staging": ClaudeConfig( api_key=os.environ["ANTHROPIC_API_KEY_STAGING"], model="claude-sonnet-4-20250514", max_tokens=1024, max_retries=2, timeout=30.0, monthly_budget_usd=50.0, ), "production": ClaudeConfig( api_key=os.environ["ANTHROPIC_API_KEY_PROD"], model="claude-sonnet-4-20250514", max_tokens=4096, max_retries=5, timeout=120.0, monthly_budget_usd=5000.0, ), } def get_config() -> ClaudeConfig: env = os.getenv("APP_ENV", "development") return CONFIGS[env]
Create separate Workspaces in console.anthropic.com:
| Workspace | Purpose | Rate Limit Tier | |-----------|---------|-----------------| | dev | Development & testing | Tier 1 | | staging | Pre-production validation | Tier 2 | | production | Live traffic | Tier 3+ |
Each workspace has independent API keys, usage tracking, and rate limits.
bash# .env.development ANTHROPIC_API_KEY_DEV=sk-ant-api03-dev-... APP_ENV=development # .env.staging ANTHROPIC_API_KEY_STAGING=sk-ant-api03-stg-... APP_ENV=staging # .env.production (stored in secret manager, not files) ANTHROPIC_API_KEY_PROD=sk-ant-api03-prd-... APP_ENV=production
pythonimport anthropic def create_client() -> anthropic.Anthropic: config = get_config() return anthropic.Anthropic( api_key=config.api_key, max_retries=config.max_retries, timeout=config.timeout, )
python# Development: always use Haiku (cheapest) # Staging: use production model for accuracy testing # Production: use configured model def get_model(override: str | None = None) -> str: if override: return override return get_config().model
| Issue | Cause | Fix | |-------|-------|-----| | Dev key used in prod | Wrong env loaded | Validate key prefix matches environment | | Staging rate limited | Low tier workspace | Upgrade staging workspace tier | | Cost overrun in dev | No budget guard | Add per-env spend limits |
Produce an environment receipt containing environment/workspace classes, config and artifact digests, model policy, isolation and synthetic-test results, canary/approval state, secret rotation status, retention, and rollback reference. Exclude API keys, endpoint tokens, prompts, responses, and member identifiers.
Run a synthetic fixture-request-001 through development and staging with separate keys, assert workspace_crossing=0; production_key_in_nonprod=0; content_logged=0, and record canary=internal; approval=pending. Promotion remains blocked until the owner approves the staging receipt.
For monitoring, see anth-observability.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 15,721 | 9,877 | -37% | 1 | 1 | 0% | 3,427 | 3,301 | -4% | 0 | 0 | — |
case-02 | fail→fail | 16,997 | 13,179 | -22% | 1 | 1 | 0% | 3,200 | 3,839 | +20% | 0 | 0 | — |
case-03 | fail→fail | 14,111 | 12,241 | -13% | 1 | 1 | 0% | 3,020 | 3,719 | +23% | 0 | 0 | — |
case-04 | pass→pass | 12,422 | 9,822 | -21% | 1 | 1 | 0% | 2,415 | 2,992 | +24% | 0 | 0 | — |
case-05 | pass→pass | 17,091 | 15,950 | -7% | 1 | 1 | 0% | 4,053 | 4,533 | +12% | 0 | 0 | — |
case-06 | pass→pass | 9,014 | 6,059 | -33% | 1 | 1 | 0% | 1,850 | 2,183 | +18% | 0 | 0 | — |
case-07 | fail→fail | 11,862 | 5,424 | -54% | 1 | 1 | 0% | 2,391 | 2,064 | -14% | 0 | 0 | — |
case-08 | fail→pass | 5,749 | 2,472 | -57% | 1 | 1 | 0% | 1,072 | 1,462 | +36% | 0 | 0 | — |
case-09 | fail→pass | 11,070 | 2,271 | -79% | 1 | 1 | 0% | 2,205 | 1,400 | -37% | 0 | 0 | — |
case-10 | pass→pass | 10,775 | 4,565 | -58% | 1 | 1 | 0% | 1,968 | 1,802 | -8% | 0 | 0 | — |
case-11 | pass→pass | 10,762 | 4,847 | -55% | 1 | 1 | 0% | 2,015 | 1,871 | -7% | 0 | 0 | — |
case-12 | fail→pass | 11,211 | 6,694 | -40% | 1 | 1 | 0% | 1,870 | 2,080 | +11% | 0 | 0 | — |
case-13 | pass→pass | 12,379 | 7,192 | -42% | 1 | 1 | 0% | 2,350 | 2,347 | -0% | 0 | 0 | — |
case-14 | fail→pass | 8,578 | 2,502 | -71% | 1 | 1 | 0% | 1,638 | 1,349 | -18% | 0 | 0 | — |
case-15 | fail→pass | 10,499 | 4,428 | -58% | 1 | 1 | 0% | 2,107 | 1,806 | -14% | 0 | 0 | — |
case-16 | pass→pass | 11,354 | 8,740 | -23% | 1 | 1 | 0% | 1,989 | 2,688 | +35% | 0 | 0 | — |
case-17 | fail→pass | 7,939 | 3,824 | -52% | 1 | 1 | 0% | 1,673 | 1,759 | +5% | 0 | 0 | — |
case-18 | fail→pass | 4,407 | 3,565 | -19% | 1 | 1 | 0% | 793 | 1,618 | +104% | 0 | 0 | — |
case-19 | pass→pass | 9,430 | 2,239 | -76% | 1 | 1 | 0% | 1,788 | 1,401 | -22% | 0 | 0 | — |
case-20 | pass→pass | 6,469 | 3,284 | -49% | 1 | 1 | 0% | 1,305 | 1,611 | +23% | 0 | 0 | — |
case-21 | fail→pass | 7,767 | 1,649 | -79% | 1 | 1 | 0% | 1,610 | 1,291 | -20% | 0 | 0 | — |
case-22 | fail→pass | 2,640 | 1,714 | -35% | 1 | 1 | 0% | 393 | 1,248 | +218% | 0 | 0 | — |
case-23 | fail→pass | 16,518 | 6,660 | -60% | 1 | 1 | 0% | 3,307 | 2,029 | -39% | 0 | 0 | — |
case-24 | fail→pass | 2,301 | 1,727 | -25% | 1 | 1 | 0% | 373 | 1,275 | +242% | 0 | 0 | — |
case-25 | fail→pass | 5,910 | 2,458 | -58% | 1 | 1 | 0% | 1,026 | 1,396 | +36% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +48 percentage points is the difference between those two pass rates over the 25 comparable cases.
The publisher has shipped newer versions since this run, so these numbers describe v1, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.