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".
What this skill does
# 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
```bash
#!/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
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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)
```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
- [Groq Error Codes](https://console.groq.com/docs/errors)
- [Groq Status Page](https://status.groq.com)
## Next Steps
For rate limit issues, see `groq-rate-limits`.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.