anth-advanced-troubleshooting
Installation
SKILL.md
Anthropic Advanced Troubleshooting
Issue: Context Window Overflow
# Symptom: invalid_request_error about token count
# Diagnosis: pre-check with Token Counting API
import anthropic
client = anthropic.Anthropic()
count = client.messages.count_tokens(
model="claude-sonnet-4-20250514",
messages=conversation_history,
system=system_prompt
)
print(f"Input tokens: {count.input_tokens}")
# Claude Sonnet: 200K context, Claude Opus: 200K context