/groq-pack:groq-debug-bundlefrom groq-pack
Collects Groq API diagnostic information including environment details, SDK versions, connectivity tests, and rate limit status into a redacted support bundle for troubleshooting.
Ships in groq-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.
None: SKILL.md is the whole skill.
!node --version 2>/dev/null || echo 'N/A'
!python3 --version 2>/dev/null || echo 'N/A'
!npm list groq-sdk 2>/dev/null | grep groq-sdk || echo 'groq-sdk not installed'
Collect all diagnostic information needed to resolve Groq API issues. Produces a redacted support bundle with environment info, SDK version, connectivity test results, and rate limit status.
GROQ_API_KEY set in environmentcurl and jq available#!/bin/bash
set -euo pipefail
BUNDLE_DIR="groq-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"
echo "Collecting Groq debug bundle..."
# === Environment ===
cat > "$BUNDLE_DIR/environment.txt" <<ENVEOF
=== Groq Debug Bundle ===
Generated: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
Hostname: $(hostname)
OS: $(uname -sr)
Node.js: $(node --version 2>/dev/null || echo 'not installed')
Python: $(python3 --version 2>/dev/null || echo 'not installed')
npm groq-sdk: $(npm list groq-sdk 2>/dev/null | grep groq-sdk || echo 'not installed')
pip groq: $(pip show groq 2>/dev/null | grep Version || echo 'not installed')
GROQ_API_KEY: ${GROQ_API_KEY:+SET (${#GROQ_API_KEY} chars, prefix: ${GROQ_API_KEY:0:4}...)}${GROQ_API_KEY:-NOT SET}
ENVEOF
# Test API endpoint and capture headers
echo "--- API Connectivity ---" >> "$BUNDLE_DIR/connectivity.txt"
# Models endpoint (lightweight, confirms auth)
curl -s -w "\nHTTP Status: %{http_code}\nTime: %{time_total}s\n" \
https://api.groq.com/openai/v1/models \
-H "Authorization: Bearer $GROQ_API_KEY" \
| jq '.data | length' >> "$BUNDLE_DIR/connectivity.txt" 2>&1
echo "Models available: $(curl -s https://api.groq.com/openai/v1/models \
-H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[].id' | wc -l)" \
>> "$BUNDLE_DIR/connectivity.txt"
# Make a minimal request and capture rate limit headers
echo "--- Rate Limit Status ---" >> "$BUNDLE_DIR/rate-limits.txt"
curl -si https://api.groq.com/openai/v1/chat/completions \
-H "Authorization: Bearer $GROQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"llama-3.1-8b-instant","messages":[{"role":"user","content":"ping"}],"max_tokens":1}' \
2>/dev/null | grep -iE "^(x-ratelimit|retry-after|x-request-id)" \
>> "$BUNDLE_DIR/rate-limits.txt"
# Quick latency test across models
echo "--- Latency Benchmark ---" >> "$BUNDLE_DIR/latency.txt"
for model in "llama-3.1-8b-instant" "llama-3.3-70b-versatile"; do
latency=$(curl -s -w "%{time_total}" -o /dev/null \
https://api.groq.com/openai/v1/chat/completions \
-H "Authorization: Bearer $GROQ_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"model\":\"$model\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":5}" \
2>/dev/null)
echo "$model: ${latency}s" >> "$BUNDLE_DIR/latency.txt"
done
# Capture recent Groq-related errors from application logs (redacted)
echo "--- Application Logs (redacted) ---" >> "$BUNDLE_DIR/app-logs.txt"
# Node.js logs
if [ -d "logs" ]; then
grep -i "groq\|rate.limit\|429\|api.error" logs/*.log 2>/dev/null | \
tail -50 | \
sed 's/gsk_[a-zA-Z0-9]*/gsk_***REDACTED***/g' \
>> "$BUNDLE_DIR/app-logs.txt"
fi
# Config (redacted)
echo "--- Config (redacted) ---" >> "$BUNDLE_DIR/config-redacted.txt"
if [ -f ".env" ]; then
sed 's/=.*/=***REDACTED***/' .env >> "$BUNDLE_DIR/config-redacted.txt"
fi
# Create tarball
tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"
rm -rf "$BUNDLE_DIR"
echo "Bundle created: $BUNDLE_DIR.tar.gz"
echo "Review before sharing -- ensure no secrets are included."
import Groq from "groq-sdk";
async function groqDiagnostic() {
const groq = new Groq();
const report: Record<string, any> = {};
// Test auth
try {
const models = await groq.models.list();
report.auth = "OK";
report.modelsAvailable = models.data.map((m) => m.id);
} catch (err) {
report.auth = `FAILED: ${(err as Error).message}`;
return report;
}
// Test completion
try {
const start = performance.now();
const completion = await groq.chat.completions.create({
model: "llama-3.1-8b-instant",
messages: [{ role: "user", content: "Reply: OK" }],
max_tokens: 5,
temperature: 0,
});
report.completion = "OK";
report.latencyMs = Math.round(performance.now() - start);
report.model = completion.model;
report.usage = completion.usage;
} catch (err: any) {
report.completion = `FAILED: ${err.status} ${err.message}`;
}
return report;
}
groqDiagnostic().then((r) => console.log(JSON.stringify(r, null, 2)));
| File | Purpose | Sensitive? |
|---|---|---|
environment.txt | Node/Python versions, SDK version | Key prefix only |
connectivity.txt | API reachability, model count | No |
rate-limits.txt | Current rate limit headers | No |
latency.txt | Response times per model | No |
app-logs.txt | Recent error logs (redacted) | Redacted |
config-redacted.txt | Config keys only (values masked) | Redacted |
gsk_)For rate limit issues, see groq-rate-limits.
What SKILL.md sets; muted values are Claude Code's defaults
24 skills in this plugin
/groq-ci-integrationConfigure Groq CI/CD integration with GitHub Actions, testing, and model validation.
Use when setting up automated testing, configuring CI pipelines,
or integrating Groq tests into your build process.
Trigger with phrases like "groq CI", "groq GitHub Actions",
"groq automated tests", "CI groq".
/groq-common-errorsDiagnose and fix Groq API errors with real error codes and solutions.
Use when encountering Groq errors, debugging failed requests,
or troubleshooting integration issues.
Trigger with phrases like "groq error", "fix groq",
"groq not working", "debug groq", "groq 429".
/groq-core-workflow-aExecute Groq primary workflow: chat completions with tool use and JSON mode.
Use when implementing chat interfaces, function calling, structured output,
or building AI features with Groq's fast inference.
Trigger with phrases like "groq chat completion", "groq tool use",
"groq function calling", "groq JSON mode".
/groq-core-workflow-bExecute Groq secondary workflows: audio transcription (Whisper), vision,
text-to-speech, and batch model evaluation.
Trigger with phrases like "groq whisper", "groq transcription",
"groq audio", "groq vision", "groq TTS", "groq speech".
/groq-cost-tuningOptimize Groq costs through model routing, token management, and usage monitoring.
Use when analyzing Groq billing, reducing API costs,
or implementing usage monitoring and budget alerts.
Trigger with phrases like "groq cost", "groq billing",
"reduce groq costs", "groq pricing", "groq expensive", "groq budget".
/groq-data-handlingImplement prompt sanitization, PII redaction, response filtering, and
usage tracking for Groq API integrations.
Trigger with phrases like "groq data", "groq PII",
"groq GDPR", "groq data retention", "groq privacy", "groq compliance".
npx claudepluginhub flight505/skill-forge --plugin groq-packOther plugins' skills for the same job