anth-reference-architecture

Featured

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".

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 Reference Architecture ## Overview Three validated architecture patterns for Claude API integrations: synchronous API gateway, async queue-based processing, and multi-model routing. ## Architecture 1: Sync API Gateway (Simple) ``` User → API Gateway → Claude Service → Messages API ↓ Response → User ``` ```python # Best for: chatbots, interactive tools, low-volume (<100 RPM) from fastapi import FastAPI import anthropic app = FastAPI() client = anthropic.Anthropic(max_retries=3, timeout=60.0) @app.post("/chat") async def chat(prompt: str): msg = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{"role": "user", "content": prompt}] ) return {"text": msg.content[0].text, "tokens": msg.usage.output_tokens} ``` ## Architecture 2: Async Queue-Based (Scalable) ``` User → API → Queue (Redis/SQS) → Worker Pool → Messages API ↑ ↓ └──────────── Status/Result ←── Result Store ←───┘ ``` ```python # Best for: batch processing, high-volume, background tasks from redis import Redis from rq import Queue import anthropic redis = Redis() task_queue = Queue("claude-tasks", connection=redis) result_store = Redis(db=1) def process_task(task_id: str, prompt: str, model: str): client = anthropic.Anthropic() msg = client.messages.create( model=model, max_tokens=10...

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-architecture-variants

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".

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 Listed

claude-api

Build apps with the Claude API or Anthropic SDK. TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`/`claude_agent_sdk`, or user asks to use Claude API, Anthropic SDKs, or Agent SDK. DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.

1 Updated 1 weeks ago
DROOdotFOO