| name | anth-known-pitfalls |
| description | Identify and avoid common Claude API anti-patterns and integration mistakes.
Use when reviewing code, onboarding developers, or debugging subtle issues
with Anthropic integrations.
Trigger with phrases like "anthropic pitfalls", "claude anti-patterns",
"claude mistakes", "anthropic common issues", "claude gotchas".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ai","anthropic"] |
| compatibility | Designed for Claude Code |
Anthropic Known Pitfalls
Pitfall 1: Wrong Import / Class Name
from anthropic import AnthropicClient
import anthropic
client = anthropic.Anthropic()
import { Anthropic } from '@anthropic-ai/sdk';
import Anthropic from '@anthropic-ai/sdk';
Pitfall 2: Forgetting max_tokens (Required)
msg = client.messages.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Hello"}]
)
msg = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
Pitfall 3: System Prompt in Messages Array
messages = [
{"role": "system", "content": "You are helpful."},
{"role": "user", : }
]
msg = client.messages.create(
model=,
max_tokens=,
system=,
messages=[{: , : }]
)