Agent skill · software engineering · jeremylongshore

groq-core-workflow-a

Execute Groq's 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".

Why this skill is useful

Adds specific integration patterns and code snippets for Groq's chat completion and tool use that the AI wouldn't reliably generate on its own.

What it needs

Requires groq-sdk installed locally. Requires groq account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Groq Core Workflow A: Chat, Tools & Structured Output Overview 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/. Prerequisites Install the SDK with npm install groq-sdk. Set GROQAPIKEY in the environment (see Authentication below). Familiarity with the Groq model line-up and which model fits each task. Authentication Groq authenticates via an API key. Create one at console.groq.com/keys and export it as GROQAPIKEY; 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. Model Selection for This Workflow 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 Instructions Work through the five patterns in order. Read the target file, then Write or Edit the integration code into your project. 1. Chat completion — send system + user messages to groq.chat.completions.create and return choices[0].message.content plus usage. Skeleton below; full example in worked examples. 2. Tool use / function calling — a three-phase loop: send the message with tools + toolchoice: "auto", execute any returned toolcalls, then send the results back for the final answer. Full code in implementation. 3. JSON mode — set responseformat: { type: "jsonobject" } and describe the JSON shape in the system prompt. See implementation. 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/groq-core-workflow-a

View the source on GitHub

Browse the @skills marketplace