Agent skill · software engineering · jeremylongshore
anth-architecture-variants
Choose and implement Claude API architecture patterns for different
Why this skill is useful
Adds four executable architecture patterns for Claude API integrations that provide specific implementation details not commonly found in public documentation.
What it needs
Requires anthropic, celery, fastapi installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Anthropic Architecture Variants Overview Four validated architecture patterns for Claude API integrations at different scales and use cases. Variant 1: Serverless (AWS Lambda / Cloud Functions) Trade-offs: Cold starts add 1-3s. Lambda timeout (15min) limits long generations. No connection pooling between invocations. Variant 2: Streaming Microservice (FastAPI + WebSocket) Variant 3: Queue-Based Pipeline (Celery / Cloud Tasks) Variant 4: Multi-Model Orchestrator Architecture Selection Guide Factor Serverless Microservice Queue-Based Orchestrator -------- ----------- ------------- ------------- ------------- Latency High (cold start) Low (streaming) N/A (async) Medium Volume Low (<100 RPM) Medium High Medium Cost Pay-per-use Fixed infra Batch savings Optimized per-task Complexity Low Medium Medium High Best for APIs, triggers Chatbots ETL, processing Complex workflows Prerequisites Document latency, throughput, availability, data residency, retention, budget, and side-effect requirements before choosing a variant. Provide an approved model/workspace allowlist, secret-manager integration, authenticated ingress/egress, shared rate limiter where needed, and a rollback owner. Use synthetic fixtures and a no-op tool/sink in a sandbox. Logs must contain topology and aggregate metrics only, not prompts, completions, credentials, or tool arguments. Instructions 1. Select the smallest architecture that satisfies measured latency and volume, then record why its timeout, queue, connection, and failure boundaries are adequate. 2. Keep API keys server-side, validate tenant/model/destination scope at ingress, and apply least privilege to workers and queues. Isolate streaming connections from batch consumers. 3. Add bounded retries, circuit breaking, backpressure, idempotent result handling, and health checks appropriate to the selected variant. Protect every tool or downstream write with an allowlist and approval gate. 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/anth-architecture-variants