Agent skill · writing content · jeremylongshore
anth-known-pitfalls
Identify and avoid common Claude API anti-patterns and integration mistakes.
Why this skill is useful
Provides specific integration patterns and common pitfalls for using the Claude API that the AI wouldn't reliably generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Anthropic Known Pitfalls Overview This reference is a review aid for common Anthropic API integration mistakes. Apply the checks to the actual SDK/API version in use and confirm changing behavior against Anthropic’s current documentation before making a compatibility claim. Pitfall 1: Wrong Import / Class Name Pitfall 2: Forgetting maxtokens (Required) Pitfall 3: System Prompt in Messages Array Pitfall 4: Accessing Response Wrong Pitfall 5: Ignoring Stop Reason Pitfall 6: Not Handling tooluseid Properly Pitfall 7: Hardcoding Model IDs Without Versioning Pitfall 8: Not Using SDK Auto-Retry Pitfall 9: Inflated maxtokens Pitfall 10: No Cost Tracking Quick Reference: Anthropic vs OpenAI Differences Feature OpenAI Anthropic --------- -------- ----------- maxtokens Optional Required System prompt In messages array system parameter Response text .choices[0].message.content .content[0].text Default import Named export Default export Auto-retry No Yes (configurable) Streaming Yields chunks SSE events Prerequisites Identify the SDK/runtime versions, pinned model IDs, request paths, tool definitions, data classification, and owner of the integration. Use a sandbox workspace, synthetic prompts, least-privileged credentials, and a redaction policy for review and reproduction; do not paste production content or keys into diagnostics. Define acceptance checks for authentication, request shape, stop reasons, tool IDs, retries, token budgets, cost, and logging hygiene. Instructions 1. Review imports, request construction, response parsing, model/version pins, retry behavior, and token limits against the installed SDK and official API reference. 2. Exercise each suspected pitfall with synthetic fixtures, including malformed requests, truncated output, tool calls, 429/5xx, timeout, and duplicate retry cases. Assert no sensitive content appears in logs or receipts. 3. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/anth-known-pitfalls