Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

mindstudio-to-api-custom-function-buildermindstudio TO API custom function 构建器

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

5,773

周安装

248

GitHub Stars

1

下载量

2,024
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mindstudio-to-api-custom-function-builder(mindstudio TO API custom function 构建器)
来源仓库:https://github.com/sol1986/mindstudio-to-api-custom-function-builder
安装命令:
openclaw skills install mindstudio-to-api-custom-function-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install mindstudio-to-api-custom-function-builder

简介

该技能为任意 API 构建 MindStudio Run Function 集成方案。

  • 适合第三方服务对接与自定义函数封装场景。
  • 自动生成请求 schema 与错误处理逻辑。
  • 安装命令:openclaw skills install mindstudio-to-api-custom-function-builder;需提供 API 文档或样例。
  • 注意接口限流与重试机制设计,保障稳定性。

SKILL.md

name
mindstudio-to-api-custom-function-builder
description
Build a complete MindStudio Run Function integration for any API the user wants to connect. Use this skill whenever the user mentions MindStudio, wants to connect an API to a workflow, asks for a "Run Function", wants to call an external service from MindStudio, or says things like "I want to use X API in MindStudio", "build me a MindStudio function for X", "how do I connect X to MindStudio", or "write me a script for MindStudio". Always use this skill — do not try to wing it from memory.

MindStudio Function Builder

Produce a complete, ready-to-paste MindStudio custom function for any API the user wants to connect. Always output all three sections: Code Tab, Configuration Tab, and Test Data Tab.


What to gather before writing

Before writing, collect (from the conversation or by asking):

  1. API endpoint — the full URL to call
  2. HTTP method — GET, POST, etc.
  3. Authentication — API key header name, Bearer token, Basic auth, OAuth, or none
  4. Required fields — what parameters/body fields the API needs
  5. Optional fields — any useful optional params (like research_effort, language, model, etc.)
  6. Response shape — what fields come back (ask or infer from docs/examples)
  7. Output variables — what the user wants to store in their workflow after the call
  8. Execution environment — Sandbox (default, fast) or Virtual Machine (needed for npm packages)

If the user pastes API docs or a code example, extract all of the above from it directly. Only ask for what's missing.


Output Format

Always produce exactly these three sections, in this order, formatted as fenced code blocks.


Section 1 — Code Tab (JavaScript)

Rules:

  • Read all user-configurable values from ai.config.*
  • CRITICAL — input vs output variable pattern:

- inputVariable type config fields are resolved by MindStudio BEFORE the code runs. The value arrives as a plain string. Always read them as ai.config.fieldName directly. NEVER use ai.vars[ai.config.fieldName] for inputs. - outputVariableName type config fields hold the NAME of a workflow variable chosen by the user. Always write outputs as ai.vars[ai.config.outputVarName] = value so results land in the right place.

  • Always validate required fields and throw clear errors if missing
  • Use ai.log(...) to show progress to the user during long calls
  • Use await fetch(...) for HTTP calls — no imports needed in Sandbox
  • Wrap the fetch in try/catch and re-throw with a readable message
  • Use input not query for You.com APIs (learned fix)
  • For Virtual Machine functions, export a named handler async function

Template structure:

// --- Read config ---
const apiKey   = ai.config.apiKey;
const inputVal = ai.config.inputField;   // inputVariable type: value is already resolved, read directly from ai.config
const optional = ai.config.optionalField || "default_value";

// --- Validate ---
if (!apiKey)   throw new Error("Missing API key. Set it in block configuration.");
if (!inputVal) throw new Error("Missing [field]. Provide it in block configuration.");

ai.log("Calling [API name]...");

// --- Request ---
const url = "https://api.example.com/endpoint";
const res = await fetch(url, {
  method: "POST",           // or GET, etc.
  headers: {
    "Authorization": `Bearer ${apiKey}`,   // adjust per API auth style
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    field: inputVal,
    option: optional
  })
});

if (!res.ok) {
  const err = await res.text();
  throw new Error(`[API name] error (${res.status}): ${err}`);
}

const data = await res.json();
ai.log("Done. Storing results...");

// --- Store outputs ---
// outputVariableName type: user names the variable, so use ai.vars[ai.config.outputMain] pattern
ai.vars[ai.config.outputMain]  = data.someField ?? JSON.stringify(data);
ai.vars[ai.config.outputRaw]   = JSON.stringify(data);

Section 2 — Configuration Tab

Rules:

  • Use "secret" type for API keys — never "text"
  • Use "inputVariable" type for fields that should accept a {{variable}} from the workflow. MindStudio resolves the value before code runs — read it in code as ai.config.fieldName, not via ai.vars
  • Use "select" type with selectOptions for fixed-choice fields (e.g. model names, effort levels)
  • Use "outputVariableName" type for fields where the user names their output variables
  • Group into logical sections with clear title values
  • Add helpText to every item
  • Never include a dropdown for something the user controls via a workflow variable

Template:

config = {
  configurationSections: [
    {
      title: "API Settings",
      items: [
        {
          type: "secret",
          label: "API Key",
          variable: "apiKey",
          helpText: "Your [API name] API key. Stored securely, not transferred on remix."
        },
        {
          type: "inputVariable",
          label: "Input Field Label",
          variable: "inputField",
          helpText: "Description of what this input does. Use a {{variable}} from your workflow or type a value directly."
        },
        {
          type: "select",
          label: "Option Label",
          variable: "optionalField",
          helpText: "Description of this option.",
          selectOptions: [
            { label: "Option A", value: "value_a" },
            { label: "Option B", value: "value_b" }
          ]
        }
      ]
    },
    {
      title: "Output",
      items: [
        {
          type: "outputVariableName",
          label: "Main Output Variable",
          variable: "outputMain",
          helpText: "Workflow variable where the main result will be stored."
        },
        {
          type: "outputVariableName",
          label: "Raw Response Variable",
          variable: "outputRaw",
          helpText: "Workflow variable for the full raw JSON response."
        }
      ]
    }
  ]
}

Section 3 — Test Data Tab

Rules:

  • Mirror every ai.config.* variable used in the code
  • Use realistic placeholder values (not "test123")
  • Use the actual default output variable names the user will likely use
  • Match the output variable name values to what the user typed in the Output section config fields
  • For inputVariable type fields, set the value directly in config (not in vars) — e.g. inputField: "AAPL". MindStudio does not require a vars entry for these during testing.

Template:

environment = {
  vars: {},
  config: {
    apiKey:        "your-api-key-here",
    inputField:    "A realistic example input for this API",
    optionalField: "value_a",
    outputMain:    "result",
    outputRaw:     "resultJSON"
  }
}

API Authentication Patterns

Auth typeHeader / approach
API key header"X-API-Key": apiKey
Bearer token"Authorization": \Bearer ${apiKey}\``
Basic auth"Authorization": "Basic " + btoa(user + ":" + pass)
No authOmit headers object or leave empty

Execution Environment Notes

Sandbox (default — use unless told otherwise):

  • Runs in <50ms
  • No npm installs
  • fetch, JSON, ai.* methods all available
  • Python via Pyodide (no pip in Sandbox)
  • Does NOT support browser/Node APIs like URLSearchParams, Buffer, process, require, crypto, fs, or path

Virtual Machine (use when npm packages needed):

  • Slower (~5s+ startup)
  • Full Node.js or Python
  • Must export a handler function:
import * as someLib from 'some-lib';

export const handler = async () => {
  // your code here
  ai.vars.result = someLib.doSomething();
};

Common Mistakes to Avoid

  • NEVER use ai.vars[ai.config.fieldName] for input fields. inputVariable type config fields are resolved by MindStudio before the code runs and arrive as plain strings via ai.config.fieldName. Only use the ai.vars[ai.config.outputVarName] pattern for output variables where the user has named where results should land.
  • Never use URLSearchParams in Sandbox — it is not available. Build query strings manually instead:
  let query = "?token=" + apiKey;
  if (symbol) query += "&symbol=" + encodeURIComponent(symbol);
  const url = "https://api.example.com/endpoint" + query;
  • Never use Buffer, process, require, crypto, or fs in Sandbox — these are Node.js APIs not available there
  • Never use query as a body field for You.com APIs — use input
  • Never use backtick template literals to inject {{variables}} into HTML — use <script type="application/json"> instead
  • Never hardcode API keys in the Code Tab — always use ai.config.apiKey with "secret" type
  • Never use ai.vars.outputName = value when the output variable name is user-configured — use ai.vars[ai.config.outputVarName] = value
  • Don't add a config dropdown for a value the user sets via a workflow variable — read it from ai.vars instead

After Delivering the Function

Always end with a short note explaining:

  1. What each output variable contains
  2. Which config fields the user needs to fill in before running
  3. Any gotchas specific to this API (rate limits, required plan tier, field naming quirks, etc.)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.57%
按下载量换算1,793

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills