/groq-pack:groq-data-handlingfrom groq-pack
Sanitizes Groq API calls by redacting PII, filtering responses, audit-logging conversations, and tracking token usage and cost.
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.
Read when SKILL.md points to them.
Manage data flowing through Groq's inference API. This skill wires a privacy pipeline around the Groq SDK: sanitize prompts before they are sent, filter responses after they return, redact PII, hash-log an audit trail, and track token usage and cost. Key fact: Groq does not use API data for model training (Groq Privacy Policy).
groq-sdk package installed (npm i groq-sdk).GROQ_API_KEY. The SDK reads it automatically
from the environment — new Groq() needs no explicit argument. Never hardcode
the key; keep it in an untracked .env or your secret manager.crypto module (for the audit hash) — no install needed.The pipeline layers in four stages; drop simple add-ons (moderation, cost reporting) on top. Each snippet below is the skeleton — the full, copy-ready code for every stage is in references/implementation.md.
Sanitize input — run a PII rule table over every message before it leaves your process, flagging which categories were caught:
function sanitizeMessages(messages: any[]): { messages: any[]; hadPII: boolean } {
// apply PII_RULES to each message's content; return redacted copy + flag
}
Wrap the completion call — call safeCompletion(...) instead of the raw
groq.chat.completions.create, so input and response both pass the sanitizer.
Track usage — trackUsage(model, completion.usage, sessionId) records
token counts and estimated cost per call using a per-model price table.
Audit — auditedCompletion(...) ties it together and logs a SHA-256
hash of the prompt (never the prompt text) so the audit trail carries no
sensitive content.
For content moderation via Llama Guard and a daily cost report, see references/examples.md.
[EMAIL], [PHONE], [SSN],
[CARD], [IP] placeholders swapped in for detected PII, plus a hadPII
boolean and a list of redacted categories.type: "groq_usage") with model,
token counts, and estimatedCostUsd.type: "groq_audit") carrying a
prompt hash, piiDetected, responseFiltered, and the usage record.totalCost, totalTokens,
totalCalls, and a per-model breakdown (see the sample in
references/examples.md).| Issue | Cause | Solution |
|---|---|---|
| PII leaks in response | Model echoes sensitive input | Apply response filtering on all completions |
| Cost spike | 70B model for all requests | Route simple tasks to 8B |
| Missing usage data | Streaming mode | Use non-streaming for tracked requests, or estimate |
| Audit gaps | Not all code paths use wrapper | Lint rule: ban direct groq.chat.completions.create |
GROQ_API_KEY not set | Key missing from environment | Export the key before running; the SDK throws on an unauthenticated call |
Minimal end-to-end use once the helpers are in place:
const { content, audit } = await auditedCompletion(sessionId, messages);
// content is PII-filtered; audit is a hash-only record safe to persist
For enterprise access controls, see the groq-enterprise-rbac skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
groq, pii-redaction, data-privacy, audit-logging, token-tracking, compliance
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin groq-pack24 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-aOther plugins' skills for the same job