Agent skill · research science · jeremylongshore
anth-advanced-troubleshooting
Debug complex Claude API issues including context window overflow,
Why this skill is useful
Provides specific debugging patterns and scripts for handling Claude API issues that are not widely documented.
What it needs
Requires bash installed locally. Requires anthropic account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Anthropic Advanced Troubleshooting Issue: Context Window Overflow Issue: Tool Use Not Triggering Issue: Streaming Drops or Corruption Issue: Unexpected Stop Reason Stop Reason Meaning Action ------------- --------- -------- endturn Normal completion Expected maxtokens Hit token limit Increase maxtokens stopsequence Hit stop sequence Check stopsequences array tooluse Wants to call a tool Process tool call and continue Issue: Response Quality Degradation Diagnostic Curl Commands Overview This guide isolates difficult Claude API failures by testing one variable at a time: token budget, tool schema and choice, stream transport, stop reason, or prompt configuration. It complements the common status-code guide and should produce evidence that is safe to share with an operator. Prerequisites Use an approved sandbox workspace, a pinned model ID, and synthetic messages/tools that cannot access production data or perform side effects. Have a bounded request timeout, retry cap, token-counting access where enabled, and a known-good baseline request for comparison. Configure telemetry to retain request ID, model, token counts, stop reason, event counts, and latency only; redact prompts, completions, tool arguments, headers, and secrets. Instructions 1. Reproduce the smallest failing case in the sandbox and record a correlation ID. Change one input at a time, starting with token count and request shape. 2. For context failures, count tokens before sending and trim or summarize using an explicit policy that keeps required system context. For tool failures, validate the schema and use a no-op tool before enabling any real action. 3. For streaming failures, count received events and restart the complete non-resumable request with a bounded retry; deduplicate downstream presentation by correlation ID. 4. Compare stop reason, usage, latency, and output-shape assertions against the known-good baseline. Run one canary against the approved environment before promotion. 5. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/anth-advanced-troubleshooting