AGENT SKILL

groq-debug-bundle

Collect Groq debug evidence for support tickets and troubleshooting. Use when encountering persistent issues, preparing support tickets, or collecting diagnostic information for Groq problems. Trigger with phrases like "groq debug", "groq support bundle", "collect groq logs", "groq diagnostic".

License 许可
MIT
最近更新
2026-07-13
Stars
★ 1
Forks
0

01 前言 Front Matter

name
groq-debug-bundle
tags
[ "saas", "groq", "debugging" ]
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Collect Groq debug evidence for support tickets and troubleshooting. Use when encountering persistent issues, preparing support tickets, or collecting diagnostic information for Groq problems. Trigger with phrases like "groq debug", "groq support bundle", "collect groq logs", "groq diagnostic".
allowed-tools
Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep
compatible-with
claude-code, codex, openclaw

03 SKILL.md 正文

Groq Debug Bundle

Current State

!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'

Overview

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.

Prerequisites

  • GROQ_API_KEY set in environment
  • curl and jq available
  • Access to application logs

Instructions

Step 1: Create Debug Bundle Script

#!/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

Step 2: API Connectivity Test

# 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"

Step 3: Rate Limit Status

# 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"

Step 4: Latency Benchmark

# 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

Step 5: Application Log Extraction

# 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

Step 6: Package Bundle

# 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."

Programmatic Debug Check (TypeScript)

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)));

Bundle Contents

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

ALWAYS Redact Before Sharing

  • API keys (anything starting with gsk_)
  • Bearer tokens
  • PII (emails, names, IDs)
  • Internal hostnames and IPs

Resources

Next Steps

For rate limit issues, see groq-rate-limits.

04 同仓库更多 Skills

jukeyman
jukeyman/jukeyman-skills

zustand-store-creator

Create zustand store creator operations. Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like "zustand store creator", "zustand creator", "zustand".

★ 1
jukeyman
jukeyman/jukeyman-skills

zero-trust-config-helper

Configure with zero trust config helper operations. Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like "zero trust config helper", "zero helper", "zero".

★ 1
jukeyman
jukeyman/jukeyman-skills

zapier-integration-helper

Assist with zapier integration helper operations. Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like "zapier integration helper", "zapier helper", "zapier".

★ 1
jukeyman
jukeyman/jukeyman-skills

yaml-config-validator

Validate yaml config validator operations. Auto-activating skill for DevOps Basics. Triggers on: yaml config validator, yaml config validator Part of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like "yaml config validator", "yaml validator", "yaml".

★ 1
jukeyman
jukeyman/jukeyman-skills

xvary-stock-research

Thesis-driven equity analysis from public SEC EDGAR and market data; /analyze, /score, /compare workflows with bundled Python tools (Claude Code, Cursor, Codex).

★ 1
jukeyman
jukeyman/jukeyman-skills

xss-vulnerability-scanner

Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals. Triggers on: xss vulnerability scanner, xss vulnerability scanner Part of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like "xss vulnerability scanner", "xss scanner", "xss".

★ 1