All Articles
Claude Sonnet 4.6 vs Opus 4.6 — A Task-by-Task Selection Guide From Daily Use
Choosing between Sonnet 4.6 and Opus 4.6 comes up more often than you'd expect. From someone who uses both daily, here's a task-by-task breakdown — plus how the same yardsticks carry over to Sonnet 5 and Opus 4.8, and where a narrower price gap moves the break-even.
Building a Scalable Real-Time AI Chat Server with Claude API × WebSocket × Redis Pub/Sub — Node.js Production Architecture, Multi-User Management, and Cost Control
Running a real-time AI chat server on Claude API, WebSocket, and Redis Pub/Sub in production. SSE trade-offs, multi-instance routing, and how stop latency quietly corrupts per-user budgets — with the instrumentation code to measure it.
Decoding Claude's 'Spanner Temporarily Unavailable' Error and How to Handle It
The 'Spanner temporarily unavailable' error occasionally appears in Claude API and Claude.ai responses. This guide unpacks what the message reveals about Anthropic's infrastructure and walks through practical retry strategies that production teams actually use.
How I Cut My Claude API Bill in Half With Prompt Caching
Done right, Anthropic's prompt caching can roughly halve your monthly API spend on workloads with long, repeated system prompts. Here is the design playbook I use after six months in production, including the arithmetic that links hit rate to the bill and the break-even points (about 22% on the 5-minute TTL, 53% on the 1-hour TTL).
Test-Driven Development with Claude Code — A TDD Workflow for the Agent Era
Adding the constraint of 'write tests first' to Claude Code stops the agent's drift and dramatically changes the quality of generated code. Here's the TDD workflow I arrived at after six months of trial and error.
Building a Hard-to-Cancel Micro-SaaS with the Claude API — Six Implementation Patterns to Stabilize $1,000/Month
Hitting $1,000/month with a Claude-powered micro-SaaS is one challenge. Holding it for three months running is a much harder one. Here are six implementation patterns — with working Stripe and Cloudflare Workers code — that took my churn from above 10% to under 5%.
Claude API Streaming Stops Mid-Response: Diagnosing and Fixing the 5 Root Causes
When Claude API streaming stops unexpectedly, there are exactly 5 root causes. Learn to diagnose which one you're hitting and apply the right fix — from timeout tuning to stop_reason logging.
Designing Pricing for Indie Projects with Claude Code — Shorten the Lead Time to Your First Revenue
When indie projects fail to earn, the gap is rarely technical — it's pricing design and lead time. Here's a practical mindset for using Claude Code to ship the smallest revenue-ready MVP and reach your first paying customer faster.
Reading Claude API stop_reason Correctly — A Production Guide to end_turn, max_tokens, pause_turn, and refusal
Branching on Claude API's stop_reason properly eliminates a surprising number of production incidents — truncated outputs, missed tool continuations, wasted retries. Here is how to tell end_turn, max_tokens, pause_turn, and refusal apart.
Letting Claude Code Handle Dependency Upgrades — A Verification Loop That Catches Breaking Changes
Once a solo project carries 30+ dependencies, the monthly upgrade run becomes a dreaded ritual. This article maps out where Claude Code can take the wheel, where humans must keep judgment, and the verification loop I use to keep breaking changes out of production.
Shipping Generative UI on Claude API: A Production Pattern for Streaming Dynamic Components with Tool Use and JSON Schema
Combine Claude's Tool Use, JSON Schema, and partial JSON streaming to render AI-assembled UI components safely. We cover registry design, type-safety, fallback, and the pitfalls you only learn after running this in production.
Sharing Claude Code's .claude/ directory across a team — what to commit and what to keep personal
When you start sharing Claude Code's .claude/ directory across a team, which files belong in Git and which stay local? Here are the boundaries I've drawn after running it on four projects, plus a working .gitignore template.