anth-architecture-variants

Featured

Choose and implement Claude API architecture patterns for different scales: serverless, microservice, event-driven, and edge deployment. Trigger with phrases like "anthropic architecture", "claude serverless", "claude microservice design", "edge claude deployment".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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) ```python # Best for: < 100 RPM, event-driven, pay-per-invocation # lambda_function.py import anthropic import json def handler(event, context): client = anthropic.Anthropic() # Key from Lambda env var body = json.loads(event["body"]) msg = client.messages.create( model="claude-haiku-4-20250514", # Haiku for Lambda speed max_tokens=512, messages=[{"role": "user", "content": body["prompt"]}] ) return { "statusCode": 200, "body": json.dumps({ "text": msg.content[0].text, "tokens": msg.usage.input_tokens + msg.usage.output_tokens }) } ``` **Trade-offs:** Cold starts add 1-3s. Lambda timeout (15min) limits long generations. No connection pooling between invocations. ## Variant 2: Streaming Microservice (FastAPI + WebSocket) ```python # Best for: chatbots, interactive UIs, real-time responses from fastapi import FastAPI, WebSocket import anthropic app = FastAPI() client = anthropic.Anthropic() @app.websocket("/chat") async def chat_ws(websocket: WebSocket): await websocket.accept() while True: prompt = await websocket.receive_text() with client.messages.stream( model="claude-sonnet-4-20250514", max_tokens=2048, mess...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

anth-reference-architecture

Implement Claude API reference architectures for common use cases. Use when designing a Claude-powered application, choosing between direct API vs queue-based, or planning a multi-model architecture. Trigger with phrases like "anthropic architecture", "claude system design", "anthropic reference architecture", "design claude integration".

2,266 Updated today
jeremylongshore
AI & Automation Listed

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

0 Updated today
CodeWithBehnam
AI & Automation Solid

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

199,464 Updated today
affaan-m
AI & Automation Featured

clade-architecture-variants

Build different types of Claude-powered applications — chatbots, RAG systems, Use when working with architecture-variants patterns. agents, content pipelines, and code generation tools. Trigger with "claude architecture", "anthropic rag", "build with claude", "claude agent pattern", "anthropic app design".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anth-webhooks-events

Implement event-driven patterns with Claude API: streaming SSE events, Message Batches callbacks, and async processing architectures. Use when building real-time Claude integrations or processing batch results. Trigger with phrases like "anthropic events", "claude streaming events", "anthropic async processing", "claude batch callbacks".

2,266 Updated today
jeremylongshore