Skip to main content Início Criadores jeremylongshore tons-of-skills-marketplace mistral-debug-bundle
mistral-debug-bundle Collect Mistral AI debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for Mistral AI problems.
Trigger with phrases like "mistral debug", "mistral support bundle",
"collect mistral logs", "mistral diagnostic".
Ir para a instalação Skills Marketplace Descubra e explore skills de IA criadas pela comunidade.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Copiar promptMostrar detalhes do prompt Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace --skill mistral-debug-bundleO comando permanece em uma só linha. Role horizontalmente para revisá-lo antes de copiar.
Prefere uma cópia local? Baixe os arquivos disponíveis atualmente no SkillsMP.
Baixar Zip Baixando... Mais deste repositório langchain-deploy-integration Deploy a LangChain 1.0 / LangGraph 1.0 app to Cloud Run, Vercel, or LangServe correctly — with timeouts sized for chain length, cold-start mitigation, SSE anti-buffering headers, and Secret Manager over .env. Use when prepping a first production deploy, debugging a stream that hangs behind a proxy, or diagnosing p99 latency spikes. Trigger with "langchain deploy", "langchain cloud run", "langchain vercel python", "langchain langserve", or "langchain docker".
langchain-langgraph-agents Build a correct LangGraph 1.0 ReAct agent with create_react_agent — typed tools, error propagation, recursion caps, and stop conditions that actually stop. Use when writing a first tool-calling agent, migrating from AgentExecutor or initialize_agent, or diagnosing an agent that loops on vague prompts. Trigger with "langgraph agent", "create_react_agent", "langgraph tool calling", "AgentExecutor migration", or "agent loop cost".
langchain-langgraph-human-in-loop Build LangGraph 1.0 human-in-the-loop approval flows with interrupt_before /
interrupt_after and Command(resume=...) — JSON-serializable state, clean
resume semantics, and UI wiring for approval decisions. Use when adding an
approval gate before an expensive tool call, wiring a Slack/web UI for agent
approvals, or debugging a graph that crashes on interrupt.
Trigger with "langgraph human in loop", "langgraph interrupt_before",
"langgraph approval flow", "Command resume", "langgraph HITL".
name mistral-debug-bundle description Collect Mistral AI debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for Mistral AI problems.
Trigger with phrases like "mistral debug", "mistral support bundle",
"collect mistral logs", "mistral diagnostic".
allowed-tools Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep version 1.12.0 license MIT author Jeremy Longshore <jeremy@intentsolutions.io> tags ["saas","mistral","debugging"] compatibility Designed for Claude Code
Mistral AI Debug Bundle
Current State
!node --version 2>/dev/null || echo 'N/A'
!python3 --version 2>/dev/null || echo 'N/A'
Overview
Collect all necessary diagnostic information for Mistral AI support tickets. Creates a redacted bundle with environment info, SDK versions, API connectivity test, available models, and recent error logs.
Prerequisites
Mistral AI SDK installed
Access to application logs
MISTRAL_API_KEY set (for connectivity test)
Instructions
Step 1: Complete Debug Script
#!/bin/bash
set -e
BUNDLE_DIR="mistral-debug-$(date +%Y%m%d-%H%M%S) "
mkdir -p "$BUNDLE_DIR "
echo "Creating Mistral AI debug bundle..."
cat > "$BUNDLE_DIR /summary.txt" << EOF
=== Mistral AI Debug Bundle ===
Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)
Hostname: $(hostname)
--- Environment ---
Node.js: $(node --version 2>/dev/null || echo 'not installed')
Python: $(python3 --version 2>/dev/null || echo 'not installed')
npm: $(npm --version 2>/dev/null || echo 'not installed')
OS: $(uname -a)
MISTRAL_API_KEY: ${MISTRAL_API_KEY:+[SET, length=${#MISTRAL_API_KEY}]}${MISTRAL_API_KEY:-[NOT SET]}
EOF
echo -e "\n--- SDK Versions ---" >> "$BUNDLE_DIR /summary.txt"
npm list @mistralai/mistralai 2>/dev/null >> "$BUNDLE_DIR /summary.txt" \
|| echo "Node SDK: not installed" >> "$BUNDLE_DIR /summary.txt"
pip show mistralai 2>/dev/null | grep -E "^(Name|Version)" >> "$BUNDLE_DIR /summary.txt" \
|| >>
-e >>
[ -n ];
HTTP_STATUS=$(curl -s -o -w \
-H \
https://api.mistral.ai/v1/models 2>/dev/null)
>>
[ = ];
-e >>
jq -r >> 2>/dev/null
-f
>>
[ -f ];
-e >>
jq package.json 2>/dev/null >>
>
[ -d ];
grep -i logs/*. 2>/dev/null | -100 >>
[ -f ];
sed . >
> <<
-euo pipefail
curl -X POST https://api.mistral.ai/v1/chat/completions \
-H \
-H \
-d 2>&1
-e
SCRIPT
+x
tar -czf
-rf
echo
"Python SDK: not installed"
"$BUNDLE_DIR /summary.txt"
echo
"\n--- API Connectivity ---"
"$BUNDLE_DIR /summary.txt"
if
"${MISTRAL_API_KEY:-} "
then
"$BUNDLE_DIR /api-response.json"
"%{http_code}"
"Authorization: Bearer ${MISTRAL_API_KEY} "
echo
"HTTP Status: $HTTP_STATUS "
"$BUNDLE_DIR /summary.txt"
if
"$HTTP_STATUS "
"200"
then
echo
"\n--- Available Models ---"
"$BUNDLE_DIR /summary.txt"
'.data[].id'
"$BUNDLE_DIR /api-response.json"
"$BUNDLE_DIR /summary.txt"
fi
rm
"$BUNDLE_DIR /api-response.json"
else
echo
"Skipped (no API key)"
"$BUNDLE_DIR /summary.txt"
fi
if
"package.json"
then
echo
"\n--- Dependencies ---"
"$BUNDLE_DIR /summary.txt"
'{dependencies, devDependencies}'
"$BUNDLE_DIR /summary.txt"
fi
echo
"--- Recent Logs (redacted) ---"
"$BUNDLE_DIR /logs.txt"
if
"logs"
then
"mistral\|error\|429\|401\|500"
log
tail
"$BUNDLE_DIR /logs.txt"
fi
if
".env"
then
's/=.*/=***REDACTED***/'
env
"$BUNDLE_DIR /config-redacted.txt"
fi
cat
"$BUNDLE_DIR /reproduce.sh"
'SCRIPT'
set
"Content-Type: application/json"
"Authorization: Bearer ${MISTRAL_API_KEY} "
'{"model":"mistral-small-latest","messages":[{"role":"user","content":"ping"}]}'
echo
"\nExit code: $?"
chmod
"$BUNDLE_DIR /reproduce.sh"
"$BUNDLE_DIR .tar.gz"
"$BUNDLE_DIR "
rm
"$BUNDLE_DIR "
echo
"Bundle: $BUNDLE_DIR .tar.gz"
echo
"IMPORTANT: Review for sensitive data before sharing!"
Step 2: TypeScript Debug Helper import { Mistral } from '@mistralai/mistralai' ;
interface DebugInfo {
timestamp : string ;
nodeVersion : string ;
apiKeySet : boolean ;
apiKeyLength : number ;
connectivity : 'ok' | 'auth_error' | 'network_error' | 'unknown_error' ;
availableModels : string [];
latencyMs : number ;
lastError ?: { message : string ; status ?: number };
}
async function collectDebugInfo (error ?: Error ): Promise <DebugInfo > {
const info : DebugInfo = {
timestamp : new Date ().toISOString (),
nodeVersion : process.version ,
apiKeySet : !!process.env .MISTRAL_API_KEY ,
apiKeyLength : process.env .MISTRAL_API_KEY ?.length ?? 0 ,
connectivity : 'unknown_error' ,
availableModels : [],
latencyMs : 0 ,
};
if (error) {
info.lastError = {
message : error.message ,
status : (error as any ).status ,
};
}
if (info.apiKeySet ) {
const start = performance.now ();
try {
const client = new Mistral ({ apiKey : process.env .MISTRAL_API_KEY });
const models = await client.models .list ();
info.connectivity = 'ok' ;
info.availableModels = models.data ?.map (m => m.id ) ?? [];
info.latencyMs = Math .round (performance.now () - start);
} catch (e : any ) {
info.latencyMs = Math .round (performance.now () - start);
info.connectivity = e.status === 401 ? 'auth_error' : 'network_error' ;
}
}
return info;
}
try {
await client.chat .complete ({ model : 'mistral-small-latest' , messages });
} catch (error) {
const debug = await collectDebugInfo (error as Error );
console .error ('Debug info:' , JSON .stringify (debug, null , 2 ));
}
Step 3: Request/Response Logger for Debugging function createDebugClient ( ): Mistral {
const client = new Mistral ({ apiKey : process.env .MISTRAL_API_KEY });
const originalComplete = client.chat .complete .bind (client.chat );
client.chat .complete = async (params : any ) => {
const start = performance.now ();
console .debug ('[MISTRAL REQUEST]' , {
model : params.model ,
messageCount : params.messages ?.length ,
hasTools : !!params.tools ?.length ,
temperature : params.temperature ,
});
try {
const response = await originalComplete (params);
console .debug ('[MISTRAL RESPONSE]' , {
durationMs : Math .round (performance.now () - start),
finishReason : response.choices ?.[0 ]?.finishReason ,
usage : response.usage ,
hasToolCalls : !!response.choices ?.[0 ]?.message ?.toolCalls ?.length ,
});
return response;
} catch (error : any ) {
console .debug ('[MISTRAL ERROR]' , {
durationMs : Math .round (performance.now () - start),
status : error.status ,
message : error.message ,
});
throw error;
}
};
return client;
}
Sensitive Data Rules ALWAYS REDACT: API keys, passwords, PII (emails, names), internal URLs
SAFE TO INCLUDE: Error messages, stack traces, SDK versions, HTTP status codes, model IDs
Output
mistral-debug-YYYYMMDD-HHMMSS.tar.gz containing:
summary.txt — environment, SDK versions, API status
logs.txt — recent redacted error logs
config-redacted.txt — config with secrets masked
reproduce.sh — minimal reproduction script
Error Handling Item Purpose Environment versions Compatibility check SDK version Version-specific bug identification API connectivity test Network/auth diagnosis Available models Key scope verification Error logs (redacted) Root cause analysis
Resources
Next Steps For rate limit issues, see mistral-rate-limits. For common errors, see mistral-common-errors.