← 返回 Skills 市场
devcsde

OATDA Text Completion

作者 devcsde · GitHub ↗ · v1.0.5 · MIT-0
cross-platform ✓ 安全检测通过
119
总下载
0
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install oatda-text-completion
功能描述
Generate text using OATDA's unified LLM API. Triggers when the user wants to generate, write, or complete text using a specific LLM provider (OpenAI, Anthrop...
使用说明 (SKILL.md)

OATDA Text Completion

Generate text from 10+ LLM providers through OATDA's unified API.

API Key Resolution

All commands need the OATDA API key. Resolve it inline for each exec call:

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}"

If the key is empty or null, tell the user to get one at https://oatda.com and configure it.

Security: Never print the full API key. Only verify existence or show first 8 chars.

Model Mapping

User says Provider Model
gpt-4o openai gpt-4o
gpt-4o-mini openai gpt-4o-mini
o1 openai o1
claude, sonnet anthropic claude-3-5-sonnet
haiku anthropic claude-3-5-haiku
opus anthropic claude-3-opus
gemini google gemini-2.0-flash
gemini-1.5 google gemini-1.5-pro
deepseek deepseek deepseek-chat
mistral mistral mistral-large
grok xai grok-2
qwen alibaba qwen-max

Default: openai / gpt-4o if no model specified. If user provides provider/model format, split on /.

⚠️ Models update frequently. If a model ID fails, query oatda-list-models for the latest available models.

API Call

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X POST "https://oatda.com/api/v1/llm" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OATDA_API_KEY" \
  -d '{
    "provider": "\x3CPROVIDER>",
    "model": "\x3CMODEL>",
    "prompt": "\x3CUSER_PROMPT>",
    "temperature": 0.7,
    "maxTokens": 4096
  }'

Optional Parameters

  • temperature: 0 (deterministic) to 2 (creative). Default: 0.7
  • maxTokens: Max tokens to generate. Default: 4096 (max 128000 for some models)
  • stream: Set to true for streaming (not recommended via curl)

Response Format

{
  "success": true,
  "provider": "openai",
  "model": "gpt-4o",
  "response": "The generated text content...",
  "tokenUsage": {
    "prompt_tokens": 25,
    "completion_tokens": 150,
    "total_tokens": 175,
    "cost": 0.001375
  }
}

Present the response field to the user. Optionally mention token usage and cost.

Error Handling

HTTP Status Meaning Action
401 Invalid API key Tell user to check key at https://oatda.com/dashboard/api-keys
402 Insufficient credits Tell user to check balance at https://oatda.com/dashboard/usage
429 Rate limited Wait 5 seconds and retry once
400 Bad request / model not found Check model format, suggest oatda-list-models

Example

User: "Write a haiku about code using claude"

export OATDA_API_KEY="${OATDA_API_KEY:-$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null)}" && \
curl -s -X POST "https://oatda.com/api/v1/llm" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OATDA_API_KEY" \
  -d '{
    "provider": "anthropic",
    "model": "claude-3-5-sonnet",
    "prompt": "Write a haiku about code",
    "temperature": 0.7,
    "maxTokens": 256
  }'

Notes

  • The API expects prompt as a plain string, NOT a messages array
  • Split provider/model into separate JSON fields
  • For long-form content, increase maxTokens
  • Use oatda-list-models to see all available models
  • Use oatda-vision-analysis for image analysis tasks
安全使用建议
This skill appears coherent: it only needs your OATDA_API_KEY (or will read it from ~/.oatda/credentials.json) and uses curl/jq to call the OATDA API. Before installing, verify you trust the OATDA service and that the homepage (https://oatda.com) is correct. Be aware that whoever has the API key can make requests that may incur charges and see prompts/responses — do not provide highly sensitive secrets to prompts. The skill's SKILL.md explicitly avoids printing the full key, which is good. If you prefer stricter control, keep the skill user-invocable (not always enabled) and consider using a key with limited scope or billing limits. If you see unexpected requests to other endpoints or extra environment variables later, revoke the API key and investigate.
功能分析
Type: OpenClaw Skill Name: oatda-text-completion Version: 1.0.5 The skill provides a standard interface for interacting with the OATDA unified LLM API. It uses curl and jq to send user prompts to https://oatda.com and manages its own API keys via environment variables or a specific local configuration file (~/.oatda/credentials.json). No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
Name/description (text completion via OATDA) match the declared requirements: curl and jq for making and parsing HTTP calls, OATDA_API_KEY as the primary credential, and ~/.oatda/credentials.json as an alternate key source. No unrelated binaries or credentials are requested.
Instruction Scope
SKILL.md only instructs the agent to read the declared credentials file to resolve the API key, to call the documented OATDA endpoint, and to present responses and minimal token info. It does not ask to read unrelated system files, collect extra environment variables, or send data to unexpected endpoints.
Install Mechanism
Instruction-only skill with no install spec and no code files. This is the lowest-risk install posture: nothing is downloaded or written by an installer.
Credentials
Only OATDA_API_KEY is required and is the declared primary credential. The optional credential fallback (reading ~/.oatda/credentials.json) is declared in metadata and is proportional to the skill's purpose.
Persistence & Privilege
always is false and the skill doesn't request elevated or permanent system-wide privileges. No modifications of other skills or system configs are instructed.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install oatda-text-completion
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /oatda-text-completion 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.5
Re-publish with config path declaration for trust scan refresh
v1.0.3
Declare credentials.json file access in manifest
v1.0.2
Declare OATDA_API_KEY credential in metadata for trust scan
v1.0.1
Restore concrete model IDs with fallback note
v1.0.0
Initial release
元数据
Slug oatda-text-completion
版本 1.0.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

OATDA Text Completion 是什么?

Generate text using OATDA's unified LLM API. Triggers when the user wants to generate, write, or complete text using a specific LLM provider (OpenAI, Anthrop... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 119 次。

如何安装 OATDA Text Completion?

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

OATDA Text Completion 是免费的吗?

是的,OATDA Text Completion 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

OATDA Text Completion 支持哪些平台?

OATDA Text Completion 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 OATDA Text Completion?

由 devcsde(@devcsde)开发并维护,当前版本 v1.0.5。

💬 留言讨论