agentsclimarketplace

Groq

Skill phucbm/skills/skills/ai/groq

Claude Plugin - Personal knowledge base for Claude Code — patterns and integrations across projects

Install
npx -y skills add phucbm/skills --skill groq

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Integrate GROQ LLM streaming into a project. Use when the user wants to add GROQ, set up GROQ streaming, or use a GROQ model in their app.

SKILL.md

2.0 KB, as published. Nobody here has run it

Apply the pattern below to the current project's stack and existing code structure. Ask the user which model to use if not specified (default: llama-3.3-70b-versatile). Copy the .env block as a template — remind the user to fill in GROQ_API_KEY.


GROQ Streaming Integration

GROQ provides fast LLM inference via an OpenAI-compatible API — drop-in replacement for OpenAI, just swap the base URL and key.

Endpoint

POST https://api.groq.com/openai/v1/chat/completions

.env setup

# Groq — enable by setting GROQ_API_KEY
GROQ_API_KEY=
GROQ_MODELS=llama-3.3-70b-versatile,llama-3.1-8b-instant

# LLM temperature (0 = deterministic, good for structured extraction)
LLM_TEMPERATURE=0

Request body

{
  "model": "llama-3.3-70b-versatile",
  "stream": true,
  "temperature": 0,
  "max_tokens": 16384,
  "messages": [{ "role": "user", "content": "your prompt here" }]
}

Headers

Content-Type: application/json
Authorization: Bearer <GROQ_API_KEY>

Parsing the SSE stream

Response is Server-Sent Events. For each line:

  1. Skip lines not starting with data:
  2. Strip the data: prefix
  3. Skip [DONE]
  4. Parse JSON → extract choices[0].delta.content
parseLine: line => {
    if (!line.startsWith('data: ')) return null;
    const data = line.slice(6).trim();
    if (!data || data === '[DONE]') return null;
    try {
        const obj = JSON.parse(data);
        return obj.choices?.[0]?.delta?.content || null;
    } catch { return null; }
}

Error handling

Check for non-2xx HTTP status before reading the stream. For stream errors, same SSE format applies — obj.error?.message on each parsed line.

Source

Observed in phucbm/openwalletvn/apiadmin/routes/extract.ts. Part of a multi-provider LLM streaming abstraction (Ollama, Gemini, GROQ).

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.