/groq-pack:groq-core-workflow-afrom groq-pack
Executes Groq's primary workflow: chat completions with tool use, JSON mode, and structured outputs. Use for building AI features with Groq's fast inference.
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.
Primary integration patterns for Groq: chat completions, tool/function calling, JSON mode, and structured outputs. Groq's LPU delivers sub-200ms time-to-first-token, making these patterns viable for real-time user-facing features. This skill walks through five workflow steps; the lean skeleton lives here, and the full copy-paste code lives in references/.
npm install groq-sdk.GROQ_API_KEY in the environment (see Authentication below).Groq authenticates via an API key. Create one at console.groq.com/keys and
export it as GROQ_API_KEY; the SDK reads it automatically, so new Groq()
needs no explicit argument. Never hardcode the key — read it from the
environment (or a secrets manager) so it stays out of source control.
| Task | Recommended Model | Why |
|---|---|---|
| Chat with tools | llama-3.3-70b-versatile | Best tool-calling accuracy |
| JSON extraction | llama-3.1-8b-instant | Fast, accurate for structured tasks |
| Structured outputs | llama-3.3-70b-versatile | Supports strict: true schema compliance |
| Vision + chat | meta-llama/llama-4-scout-17b-16e-instruct | Multimodal input |
Work through the five patterns in order. Read the target file, then Write or Edit the integration code into your project.
system + user messages to
groq.chat.completions.create and return choices[0].message.content plus
usage. Skeleton below; full example in
worked examples.tools + tool_choice: "auto", execute any returned tool_calls, then send
the results back for the final answer. Full code in
implementation.response_format: { type: "json_object" } and describe
the JSON shape in the system prompt. See
implementation.response_format.json_schema with
strict: true for guaranteed schema compliance (no post-validation). See
implementation.Minimal chat skeleton:
import Groq from "groq-sdk";
const groq = new Groq();
const completion = await groq.chat.completions.create({
model: "llama-3.3-70b-versatile",
messages: [
{ role: "system", content: "You are a concise technical assistant." },
{ role: "user", content: userMessage },
],
temperature: 0.7,
max_tokens: 1024,
});
// completion.choices[0].message.content, completion.usage
Each pattern returns a predictable shape:
{ reply: string, usage: {...} }; usage carries
prompt_tokens / completion_tokens for cost metering.content string, produced after the tool
results are fed back; intermediate tool_calls carry function.name and a
JSON-string function.arguments.message.content with JSON.parse).| Error | Cause | Solution |
|---|---|---|
tool_calls with malformed JSON | Model hallucinated arguments | Wrap JSON.parse in try/catch, retry with lower temperature |
json_object returns non-JSON | System prompt missing JSON instruction | Always include "respond with JSON" in system prompt |
context_length_exceeded | Conversation too long | Trim older messages, keep system prompt |
| Tool call loop | Model keeps calling tools | Set tool_choice: "none" on final completion |
The chat skeleton above is the smallest complete call. Two fuller runnable examples live in worked examples:
reply and token usage.For tool use, JSON mode, and strict structured outputs, see full implementation.
For audio, vision, and speech workflows, see the companion groq-core-workflow-b
skill, which covers Whisper transcription, vision inputs, and text-to-speech.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-bOther plugins' skills for the same job