← 返回 Skills 市场
coze-workflow-api
作者
chocolatemale
· GitHub ↗
· v1.0.0
· MIT-0
252
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install coze-workflow-api
功能描述
在 OpenClaw 中调用 Coze Workflow API (stream_run)。 **使用场景:** 1. 用户需要调用 Coze workflow 执行特定任务 2. 需要提供 workflow_id、parameters、PAT Key 3. 处理流式响应结果 **触发关键词:** coze wo...
使用说明 (SKILL.md)
Coze Workflow Skill
直接在 OpenClaw 中调用 Coze Workflow API。
前置配置
设置 PAT Key 环境变量:
export COZE_PAT_KEY="your_pat_token_here"
使用方法
直接使用 curl
curl -s --location --request POST 'https://api.coze.com/v1/workflow/stream_run' \
--header "Authorization: Bearer $COZE_PAT_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"workflow_id": "your_workflow_id",
"parameters": {
"key": "value"
}
}' \
--max-time 120
保存结果到文件
curl -s --location --request POST 'https://api.coze.com/v1/workflow/stream_run' \
--header "Authorization: Bearer $COZE_PAT_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"workflow_id": "your_workflow_id",
"parameters": {
"key": "value"
}
}' \
--max-time 120 > /tmp/coze_result.txt
参数说明
| 参数 | 位置 | 说明 |
|---|---|---|
workflow_id |
data-raw | Coze Workflow ID |
parameters |
data-raw | Workflow 输入参数 (JSON 对象) |
COZE_PAT_KEY |
header | PAT Token,通过环境变量传入 |
示例
示例: 分析创意素材风险
export COZE_PAT_KEY="your_pat_token_here"
curl -s --location --request POST 'https://api.coze.com/v1/workflow/stream_run' \
--header "Authorization: Bearer $COZE_PAT_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"workflow_id": "7566546276516642834",
"parameters": {
"id": "1859150663345201",
"id_type": "creative"
}
}' \
--max-time 120
响应格式
流式响应,每行一个事件:
id: 0
event: PING
data: {...}
id: 1
event: Message
data: {"content":"...","node_type":"End",...}
id: 2
event: Done
data: {"debug_url":"..."}
关键字段:
event: Message- 包含 workflow 执行结果event: Done- 执行完成node_type: End- 结束节点
故障排查
超时 (28)
- 原因: API 响应较慢(通常 30-60 秒)
- 解决: 增加
--max-time 120
HTTP 401
- 原因: PAT Key 无效
- 解决: 检查 PAT Key 是否正确
HTTP 404
- 原因: Workflow ID 不存在
- 解决: 确认 workflow_id
连接失败
- 国内网络可能不稳定,重试即可
安全使用建议
This skill is an instruction-only helper that runs curl against api.coze.com and expects you to provide a COZE_PAT_KEY (PAT token). Before installing or using it: 1) Confirm you trust the Coze service and that the token you supply has minimal, scoped permissions; do not paste high-privilege keys. 2) Be aware networked requests send workflow inputs and parameters to Coze (so avoid sending secrets in parameters). 3) Note the registry metadata omitted the COZE_PAT_KEY declaration — ask the publisher to update the metadata for transparency. 4) Because it writes output to a local file in examples (/tmp/coze_result.txt), avoid storing sensitive outputs in world-readable locations. Overall the skill appears coherent and limited in scope, but protect your PAT and validate Coze's privacy/security posture before use.
功能分析
Type: OpenClaw Skill
Name: coze-workflow-api
Version: 1.0.0
The skill bundle provides instructions for an AI agent to interact with the legitimate Coze Workflow API (api.coze.com) using curl. It describes how to handle authentication via a Personal Access Token (PAT) and execute workflow requests. No evidence of malicious intent, data exfiltration to unauthorized endpoints, or obfuscation was found in SKILL.md or _meta.json.
能力评估
Purpose & Capability
Name and description match the instructions: the SKILL.md shows how to call Coze Workflow API (stream_run) with workflow_id, parameters, and a PAT. There is one minor metadata mismatch: the SKILL.md asks users to set COZE_PAT_KEY, but the published registry metadata lists no required env vars or primary credential.
Instruction Scope
Instructions are narrowly scoped to calling https://api.coze.com/v1/workflow/stream_run via curl, handling streaming events, and optionally redirecting output to a local file (/tmp/coze_result.txt). The skill does not instruct reading other system files, fetching unrelated credentials, or sending data to unknown endpoints.
Install Mechanism
No install spec and no code files — instruction-only skill. This minimizes on-disk footprint and makes the runtime surface limited to the curl invocations the agent performs.
Credentials
The SKILL.md requires a COZE_PAT_KEY (PAT token) which is appropriate for calling the Coze API. However, the registry metadata did not declare any required env vars or a primary credential, creating an inconsistency that should be corrected for transparency.
Persistence & Privilege
Skill is not always-enabled and does not request elevated or persistent system privileges. It does not modify other skill configurations or agent-wide settings.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install coze-workflow-api - 安装完成后,直接呼叫该 Skill 的名称或使用
/coze-workflow-api触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the Coze Workflow Skill for OpenClaw.
- Enables direct invocation of Coze Workflow API (stream_run) via curl commands.
- Requires setting a PAT Key through the COZE_PAT_KEY environment variable.
- Provides usage instructions, parameter details, sample commands, and response explanation.
- Includes troubleshooting guidance for common error scenarios.
- Removes old metadata and configuration files for a streamlined setup.
元数据
常见问题
coze-workflow-api 是什么?
在 OpenClaw 中调用 Coze Workflow API (stream_run)。 **使用场景:** 1. 用户需要调用 Coze workflow 执行特定任务 2. 需要提供 workflow_id、parameters、PAT Key 3. 处理流式响应结果 **触发关键词:** coze wo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 252 次。
如何安装 coze-workflow-api?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install coze-workflow-api」即可一键安装,无需额外配置。
coze-workflow-api 是免费的吗?
是的,coze-workflow-api 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
coze-workflow-api 支持哪些平台?
coze-workflow-api 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 coze-workflow-api?
由 chocolatemale(@chocolatemale)开发并维护,当前版本 v1.0.0。
推荐 Skills