/claude-pack:clade-advanced-troubleshootingfrom claude-pack
Debugs complex Claude API integration issues including inconsistent outputs, tool use failures, streaming drops, max_tokens truncation, and image/vision problems.
Ships in claude-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Debug complex Claude integration issues that go beyond basic error handling — inconsistent outputs, tool use failures where Claude calls nonexistent tools, streaming connection drops, max_tokens truncation, and image/vision format problems.
Symptom: Same prompt gives different answers each time.
Cause: temperature defaults to 1.0 (maximum randomness).
// Fix: Set temperature to 0 for deterministic outputs
const message = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
temperature: 0, // Deterministic
messages,
});
Symptom: Claude calls a tool that doesn't exist or sends wrong parameters.
// Always validate tool calls before executing
const toolUse = response.content.find(b => b.type === 'tool_use');
if (toolUse) {
const validTools = tools.map(t => t.name);
if (!validTools.includes(toolUse.name)) {
console.error(`Claude requested unknown tool: ${toolUse.name}`);
// Send error back as tool_result
messages.push({ role: 'assistant', content: response.content });
messages.push({ role: 'user', content: [{
type: 'tool_result',
tool_use_id: toolUse.id,
is_error: true,
content: `Tool "${toolUse.name}" does not exist. Available: ${validTools.join(', ')}`,
}]});
}
}
Symptom: Stream stops mid-response without message_stop event.
// Detect incomplete streams
const stream = client.messages.stream({ ... });
let gotStop = false;
for await (const event of stream) {
if (event.type === 'message_stop') gotStop = true;
// ... process events
}
if (!gotStop) {
console.error('Stream ended without message_stop — connection dropped');
// Retry the request
}
max_tokens TruncationSymptom: Response cuts off mid-sentence.
const message = await client.messages.create({ ... });
if (message.stop_reason === 'max_tokens') {
console.warn('Response truncated — increase max_tokens or ask for shorter output');
// Option 1: Increase max_tokens
// Option 2: Add "Be concise" to system prompt
// Option 3: Continue the response with another call
}
Symptom: Claude says it can't see the image.
data field)// Correct image format
{
type: 'image',
source: {
type: 'base64',
media_type: 'image/png', // Must match actual format
data: buffer.toString('base64'), // Raw base64, no "data:image/png;base64," prefix
},
}
stop_reason check| Error | Cause | Solution |
|---|---|---|
| API Error | Check error type and status code | See clade-common-errors |
See Inconsistent Outputs (temperature fix), Tool Use Failures (validation), Streaming Connection Drops (detection), max_tokens Truncation (stop_reason check), and Image/Vision Issues (correct format) above.
See clade-debug-bundle for collecting support evidence.
clade-common-errors for basic error handlingEach section contains production-ready code examples. Copy and adapt them to your use case.
Integrate the patterns that match your requirements. Test each change individually.
Run your test suite to confirm the integration works correctly.
What SKILL.md sets; muted values are Claude Code's defaults
32 skills in this plugin
/clade-architecture-variantsBuild different types of Claude-powered applications — chatbots, RAG systems,
Use when working with architecture-variants patterns.
agents, content pipelines, and code generation tools.
Trigger with "claude architecture", "anthropic rag", "build with claude",
"claude agent pattern", "anthropic app design".
/clade-ci-integrationTest and validate Claude integrations in CI/CD pipelines —
Use when working with ci-integration patterns.
GitHub Actions, mocking strategies, and cost control.
Trigger with "anthropic ci", "test claude in ci", "anthropic github actions",
"claude automated testing".
/clade-common-errorsDiagnose and fix Anthropic API errors — authentication, rate limits,
Use when working with common-errors patterns.
overloaded, context length, and content policy issues.
Trigger with "anthropic error", "claude 429", "claude overloaded",
"anthropic not working", "debug claude api".
/clade-core-workflow-aRedirect to claude-model-inference for Messages API streaming,
vision, and structured output patterns.
Use when looking for the primary Anthropic workflow.
Trigger with "anthropic workflow", "claude main workflow".
/clade-core-workflow-bRedirect to claude-embeddings-search for tool use (function calling)
and agentic loop patterns with Claude.
Use when looking for the secondary Anthropic workflow.
Trigger with "anthropic tools", "claude function calling".
/clade-cost-tuningOptimize Anthropic API costs — model selection, prompt caching, batches,
Use when working with cost-tuning patterns.
token reduction, and usage monitoring.
Trigger with "anthropic pricing", "claude cost", "reduce anthropic spend",
"anthropic billing", "claude cheaper".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin claude-packOther plugins' skills for the same job