Agent skill · Audited from source
Groq Reference Architecture
skill · jeremylongshore/claude-code-plugins-plus-skillsMIT licenceAudited 8 Oct 2026 · source 4f83675ca38a
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 4f83675ca38a and found no filesystem, network or shell access and no hard-coded secrets. What it does: Implement Groq reference architecture with model routing, streaming
Cite
Cite this page
ModelsAtlas. “Groq Reference Architecture (jeremylongshore/claude-code-plugins-plus-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/jeremylongshore/groq-reference-architecture
Trust audit
Audit 0.4.1 · source read 8 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 4f83675ca38a · 8 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherjeremylongshore GitHub userOwner of the repository this skill is read from
- Source folderjeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/groq-pack/skills/groq-reference-architectureThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict4f83675ca38aA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Implement Groq reference architecture with model routing, streaming
--- name: groq-reference-architecture description: 'Implement Groq reference architecture with model routing, streaming pipelines, and fallbacks. Use when designing new Groq integrations, reviewing project structure, or establishing architecture standards for Groq applications. Trigger with phrases like "groq architecture", "groq best practices", "groq project structure", "how to organize groq", "groq design". ' allowed-tools: Read, Grep version: 1.11.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - groq - groq-reference compatibility: Designed for Claude Code --- # Groq Reference Architecture ## Overview Production architecture for applications built on Groq's LPU inference API. It covers four concerns that every serious Groq integration needs: routing requests to the right model by latency/capability/cost, a middleware band (cache, metrics, retry), a multi-provider fallback chain, and a streaming pipeline. The service layer built here is reusable across a chat UI, an API backend, a batch processor, or an agent. The full layer diagram and how the pieces interact lives in [references/architecture.md](references/architecture.md); the complete, copy-ready TypeScript for every layer is in [references/implementation.md](references/implementation.md). ## Prerequisites - **Groq API key** — create one at [console.groq.com](https://console.groq.com) and export it as `GROQ_API_KEY`. The Groq SDK reads it from the environment; the client is constructed as `new Groq({ apiKey: process.env.GROQ_API_KEY })`. Never hardcode the key. - **Runtime**: Node.js 18+ (for `performance.now()` and native `fetch`). - **Packages**: `groq-sdk` and `lru-cache` (`npm install groq-sdk lru-cache`). - **Optional backup provider**: an OpenAI-compatible key if you extend the fallback chain beyond Groq's own models. ## Instructions Build the service layer in five ordered steps. Each step is one file under `src/groq/`. The router depends on the registry; the middleware and fallback depend on the client; the streaming pipeline stands alone. Full source for every step (verbatim) is in [references/implementation.md](references/implementation.md). 1. **Model Registry** (`models.ts`) — declare a `ModelSpec` for each model with its tier, context window, speed, cost, and capabilities. Skeleton: ```typescript export const MODELS: Record<string, ModelSpec> = { "llama-3.1-8b-instant": { tier: "speed", /* fast, cheap */ }, "llama-3.3-70b-versatile": { tier: "quality", /* tools + JSON */ }, "meta-llama/llama-4-scout-17b-16e-instruct": { tier: "vision" }, "whisper-large-v3-turbo": { tier: "audio" }, }; ``` 2. **Model Router** (`router.ts`) — `selectModel(req)` maps requirements (`maxLatencyMs`, `needsVision`, `needsTools`, `costSensitive`) to the cheapest model that satisfies them. Callers pass requirements, never hardcoded ids. 3. **Middleware** (`middleware.ts`) — `completionWithMiddleware()` wraps each call with an LRU cache (deterministic requests only, `temperature === 0`), latency + token metrics, and a pluggable metrics sink. 4. **Fallback Chain** (`fallback.ts`) — `completionWithFallback()` tries the primary model, drops to a model in a different rate-limit pool on 429/5xx, then returns a graceful-degradation payload instead of throwing. 5. **Streaming Pipeline** (`streaming.ts`) — `streamCompletion()` is an async generator yielding `{ type: "token" | "done" | "error" }` for real-time SSE UIs. When applying this to an existing repo, `Read` the current `src/` layout and `Grep` for direct `groq.chat.completions.create` calls to find code that should route through the middleware and fallback wrappers instead. ## Integration Patterns | Pattern | When to Use | Groq Feature | |---------|-------------|-------------| | Direct completion | Simple request/response | `chat.completions.create` | | Streaming SSE | Real-time chat UI | `stream: true` | | Tool calling | Agent with function execution | `tools` parameter | | JSON extraction | Structured data from text | `response_format: json_object` | | Batch processing | High-volume document processing | Queue + rate limiting | | Audio transcription | Voice input | `audio.transcriptions.create` | | Vision analysis | Image understanding | Llama 4 Scout/Maverick | ## Output Applying this skill produces a `src/groq/` service layer with six files (`client.ts`, `models.ts`, `router.ts`, `middleware.ts`, `fallback.ts`, `streaming.ts`) plus the service and API layers that consume it. At runtime you get: - **Routed completions** — `selectModel()` returns a `ModelSpec`; callers never hardcode a model id, so cost/latency policy lives in one place. - **Cached deterministic responses** — repeated `temperature: 0` calls return from the LRU cache instead of re-billing the API. - **Resilient calls** — `completionWithFallback()` returns a valid completion shape even when Groq is rate-limited, never surfacing a raw 429 to the user. - **Streamed tokens** — `streamCompletion()` yields `{ type, content }` events for SSE, with a terminal `done` or `error` event. - **Metrics** — every call emits `{ model, latencyMs, tokens, cached }` to your metrics sink (Prometheus, Datadog, or `console.log` by default). ## Error Handling | Issue | Cause | Solution | |-------|-------|----------| | 429 on primary model | RPM/TPM exceeded | Fall back to different model | | High latency | Wrong model tier | Route to `8b-instant` for latency-critical paths | | Context overflow | Input > 128K tokens | Truncate or chunk input | | Vision errors | Wrong model for images | Use Llama 4 Scout full model path | | `GROQ_API_KEY` undefined | Env var not exported | Export the key before starting the process | ## Examples A latency-critical chat turn routes to the speed tier and returns one completion: ```typescript const model = selectModel({ maxLatencyMs: 80, costSensitive: true }); // → llama
Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 4f83675
git clone https://github.com/jeremylongshore/claude-code-plugins-plus-skills git -C claude-code-plugins-plus-skills checkout 4f83675ca38a
The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f83675ca38a only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| Claude Code | Mentioned in its text, not tested | Skills for Claude Code · About Claude Code |
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
4f83675ca38a
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/jeremylongshore/groq-reference-architecture/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
jeremylongshore/claude-code-plugins-plus
Deploy and orchestrate Vertex AI ADK agents using A2A protocol. Manages
Add this badge to your README
[](https://modelsatlas.com/skills/jeremylongshore/groq-reference-architecture/)
<a href="https://modelsatlas.com/skills/jeremylongshore/groq-reference-architecture/"><img src="https://modelsatlas.com/skills/jeremylongshore/groq-reference-architecture/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Groq Reference Architecture
What does the Groq Reference Architecture skill do?
Is Groq Reference Architecture safe to install?
What can Groq Reference Architecture access on my machine?
Which assistants does Groq Reference Architecture work with?
How current is this page?
Sources
- github.com/jeremylongshore/claude-code-plugins-plus-skills/tree/ — the audited source at commit 4f83675ca38a and every finding aboveObserved · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Groq Reference Architecture skill do?
- Is Groq Reference Architecture safe to install?
- What can Groq Reference Architecture access on my machine?