anth-multi-env-setup
'Configure Claude API across dev, staging, and production environments
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-multi-env-setupInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of anth-multi-env-setup
anth-multi-env-setup scores 87/100 on our quality scale, 1471st of 3,845 Development & Engineering skills we index (top 39%).
Its SKILL.md is 5.5 KB long, well organised into 21 sections with 4 code examples: a solid amount of guidance for an agent.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so anth-multi-env-setup is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
anth-multi-env-setup compared with similar skills
All 4 of these similar skills score higher than anth-multi-env-setup; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| anth-multi-env-setup (this skill)by jeremylongshore | 87 | 2.8k | 6d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 86.3k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.5k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 4d ago | CLAUDE.md |
Frequently asked questions
- How do I install anth-multi-env-setup?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-multi-env-setup. The install tabs above show the steps for each supported agent. - Which AI agents does anth-multi-env-setup work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is anth-multi-env-setup safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is anth-multi-env-setup still maintained?
- The repository was last updated 6 days ago, so anth-multi-env-setup is actively maintained.
Skill content
View source on GitHubname: anth-multi-env-setup description: '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".
' allowed-tools: Read, Write, Edit, Bash(npm:*), Grep version: 1.7.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io tags:
- saas
- ai
- anthropic compatibility: Designed for Claude Code
Anthropic Multi-Environment Setup
Overview
Configure isolated Claude API environments with per-env API keys, model selection, and spend controls using Anthropic Workspaces.
Environment Configuration
# 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]
Anthropic Workspaces (Key Isolation)
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.
Environment Files
# .env.development
ANTHROPIC_API_KEY_DEV=sk-a…[redacted]
APP_ENV=development
# .env.staging
ANTHROPIC_API_KEY_STAGING=sk-a…[redacted]
APP_ENV=staging
# .env.production (stored in secret manager, not files)
ANTHROPIC_API_KEY_PROD=sk-a…[redacted]
APP_ENV=production
Client Factory
import 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,
)
Per-Environment Model Override
# 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
Error Handling
| 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 |
Prerequisites
- Define the environment inventory, workspace/key ownership, model policy, rate and spend budgets, data classification, and promotion approver.
- Provision separate least-privileged credentials through a secret manager; production secrets must not exist in repository files, shell history, examples, or CI logs.
- Prepare synthetic fixtures, environment isolation tests, a canary route, and a rollback configuration before changing any workspace or client factory.
Instructions
- Map each environment to exactly one approved Anthropic workspace and secret-manager reference. Validate environment identity at startup and fail closed on a missing or mismatched key.
- Load configuration through the environment-specific client factory, pin model and API settings, and enforce per-environment token, rate, timeout, retry, data, and destination limits.
- Run authentication, cross-environment isolation, budget, and request-shape tests with synthetic fixtures. Capture only aggregate pass/fail and usage metadata.
- Promote a reviewed artifact from staging to a small internal canary before production. Require owner approval and verify no production traffic or data can reach non-production workspaces.
- On drift, leaked scope, or failed health checks, disable the route, restore the previous environment mapping, rotate affected credentials, and retain a redacted receipt.
Output
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.
Examples
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.
Resources
Next Steps
For monitoring, see anth-observability.
Related Skills
Agent-Reach
86.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
44.5kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
