← 返回 Skills 市场
ivangdavila

Groq API Inference

作者 Iván · GitHub ↗ · v1.0.0
linuxdarwinwin32 ✓ 安全检测通过
535
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install groq-api
功能描述
Build and debug Groq API chat and speech workflows with low-latency routing, structured outputs, and production-safe patterns.
使用说明 (SKILL.md)

Setup

On first use, read setup.md for activation preferences, credential verification, and default workflow setup.

When to Use

User needs to build, integrate, or troubleshoot Groq API inference for chat, tool calling, or speech transcription. Agent handles request shaping, model routing, failure recovery, and safe production patterns.

Architecture

Memory lives in ~/groq-api/. See memory-template.md for structure.

~/groq-api/
├── memory.md           # Status, activation preference, and defaults
├── requests/           # Reusable payload snippets
├── logs/               # Optional debug snapshots
└── experiments/        # Prompt/model A-B notes

Quick Reference

Use these files as decision aids, not as static docs: pick the smallest file that resolves the current blocker.

Topic File
Setup process setup.md
Memory template memory-template.md
Request patterns api-patterns.md
Model routing model-selection.md
Failures and recovery troubleshooting.md

Core Rules

1. Verify Auth and Endpoint Before Any Work

Check GROQ_API_KEY first and use Authorization: Bearer $GROQ_API_KEY for every request. Use https://api.groq.com/openai/v1 as the base URL and confirm access with /models.

curl -s https://api.groq.com/openai/v1/models \
  -H "Authorization: Bearer $GROQ_API_KEY" | jq '.data[0].id'

2. Start with a Minimal Deterministic Payload

Begin with small prompts and explicit format instructions. Add complexity only after the baseline call is stable.

3. Route by Task, Not by Habit

Use separate model choices for:

  • Fast interactive chat
  • High-accuracy reasoning
  • Speech transcription

Choose from live /models output instead of hardcoding assumptions.

4. Design for Retry and Degradation

For 429 and 5xx, retry with exponential backoff and capped attempts. If a model is overloaded, fail over to a compatible backup model and log the swap.

5. Validate Output Before Downstream Actions

If output feeds code execution or data writes, enforce JSON schema or strict parsing before acting. Reject malformed output early.

6. Treat Speech as a Separate Reliability Path

Speech uploads have different failure modes than chat. Validate input format, check file size, and surface transcription confidence when available.

7. Keep Secrets and User Data Scoped

Never store API keys in files. Keep request logs sanitized and avoid persisting full sensitive prompts unless the user explicitly asks.

Common Traps

  • Using stale model IDs copied from old examples -> call /models and select available IDs at runtime.
  • Sending giant prompts without truncation -> latency spikes and timeout risk.
  • Ignoring 429 backoff guidance -> repeated failures under load.
  • Mixing chat and transcription assumptions -> wrong endpoint and payload format.
  • Trusting free-form text for automation -> parse and validate before executing.

External Endpoints

All network traffic should be limited to these Groq endpoints for explicit inference tasks requested by the user.

Endpoint Data Sent Purpose
https://api.groq.com/openai/v1/models None (GET) Discover available models
https://api.groq.com/openai/v1/chat/completions Prompt messages and options Chat completions
https://api.groq.com/openai/v1/audio/transcriptions Audio file and transcription params Speech-to-text

No other data is sent externally.

Security & Privacy

Data that leaves your machine:

  • Prompt content sent to Groq inference endpoints
  • Audio content sent to Groq transcription endpoint when requested

Data that stays local:

  • Workflow preferences in ~/groq-api/memory.md
  • Optional local debug notes in ~/groq-api/logs/

This skill does NOT:

  • Store GROQ_API_KEY in project files
  • Access files outside ~/groq-api/ for persistence
  • Call undeclared third-party endpoints
  • Modify itself or other skills

Trust

By using this skill, prompts and optional audio content are sent to Groq. Only install if you trust Groq with that data.

Related Skills

Install with clawhub install \x3Cslug> if user confirms:

  • api — reusable REST patterns, auth, and error handling
  • models — model comparison and selection heuristics
  • ai — current AI landscape checks before implementation decisions
  • fine-tuning — adaptation workflows when prompting is not enough
  • langchain — orchestration patterns for multi-step LLM pipelines

Feedback

  • If useful: clawhub star groq-api
  • Stay updated: clawhub sync
安全使用建议
This skill appears coherent for Groq API work, but follow safe practices before installing: only provide a Groq API key (GROQ_API_KEY) and never paste it into saved files; restrict permissions on ~/groq-api/ (chmod 700) so local memory/log files are private; inspect any saved logs before sharing; confirm that the actual runtime agent you use will not autonomously exfiltrate data (the skill's docs say it limits network calls to Groq endpoints, but the agent environment enforces that); and avoid installing unrelated skills that request other credentials unless you need them. If you want extra assurance, run the example curl /models check yourself to verify expected behavior before enabling broader automation.
功能分析
Type: OpenClaw Skill Name: groq-api Version: 1.0.0 The OpenClaw skill bundle for Groq API inference is benign. It clearly defines its purpose, limits network communication to declared Groq API endpoints, and restricts local file access to a dedicated `~/groq-api/` directory. The skill explicitly states that `GROQ_API_KEY` is not stored in files and guides the agent to handle credentials responsibly. Instructions in `SKILL.md` and `setup.md` are focused on legitimate API usage, error handling, and user interaction, with no evidence of prompt injection attempts to subvert the agent or perform malicious actions like data exfiltration, unauthorized execution, or persistence mechanisms. All `curl` commands are well-formed and target the declared Groq API.
能力评估
Purpose & Capability
Name and description match the declared requirements: curl + jq and GROQ_API_KEY are appropriate for calling Groq inference endpoints and parsing responses. No unrelated services, binaries, or config paths are requested.
Instruction Scope
Runtime instructions are narrowly scoped to calling Groq endpoints, validating output, and storing small workflow files under ~/groq-api/. The docs explicitly advise not to store GROQ_API_KEY in files and to sanitize logs. This is coherent; the only minor note is that local logs and memory files could accidentally capture sensitive prompts if the user or agent chooses to persist them, so follow the guidance to sanitize before saving.
Install Mechanism
Instruction-only skill with no install spec and no downloads — lowest-risk installation model. It only relies on commonly-available tools (curl, jq) which are declared as required.
Credentials
Requests a single API key (GROQ_API_KEY), which is exactly what the skill needs. The SKILL.md does not reference other env vars or credentials beyond the declared one.
Persistence & Privilege
Does not request permanent 'always' inclusion, does not modify other skills, and only writes to its own directory under the user's home. Persistence is minimal and scoped to the skill's memory/log files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install groq-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /groq-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release with Groq API workflows, model routing guidance, and troubleshooting playbooks for chat and speech.
元数据
Slug groq-api
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Groq API Inference 是什么?

Build and debug Groq API chat and speech workflows with low-latency routing, structured outputs, and production-safe patterns. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 535 次。

如何安装 Groq API Inference?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install groq-api」即可一键安装,无需额外配置。

Groq API Inference 是免费的吗?

是的,Groq API Inference 完全免费(开源免费),可自由下载、安装和使用。

Groq API Inference 支持哪些平台?

Groq API Inference 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 Groq API Inference?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。

💬 留言讨论