Agent skill

Yida Connector Safe Actions

by openyida in openyida/openyida

从前端 API 文件或后端 Controller 代码中提取接口定义,为已有宜搭连接器生成执行动作配置;修复"测试后动作消失"问题。适用于连接器已创建、需要添加可调用的 API 操作时。

MITAuto-check passed

Install Yida Connector Safe Actions

skills CLI
$ npx skills add openyida/openyida --skill yida-connector-safe-actions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install openyida/openyida yida-connector-safe-actions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/openyida/openyida.git skills-src && mkdir -p .claude/skills && cp -r skills-src/yida-skills/skills/yida-connector-safe-actions .claude/skills/yida-connector-safe-actions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
yida-connector-safe-actions
GitHub stars
221
Token cost
~1.8k tokens
SKILL.md length
335 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

从前端 API 文件或后端 Controller 代码中提取接口定义,为已有宜搭连接器生成执行动作配置;修复"测试后动作消失"问题。适用于连接器已创建、需要添加可调用的 API 操作时。

  • Works in 7 steps: 读取接口来源 → 查看连接器状态 → 生成动作 JSON 文件 → …
  • SKILL.md covers 适用场景, 核心原则, 推荐流程 and 安全动作格式, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Yida Connector Safe Actions is an agent skill from openyida/openyida. 从前端 API 文件或后端 Controller 代码中提取接口定义,为已有宜搭连接器生成执行动作配置;修复"测试后动作消失"问题。适用于连接器已创建、需要添加可调用的 API 操作时。

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Your own personal YiDA AI assistant! The licence is MIT.

Example prompts

  • “测试后动作消失”
  • “/yida-connector-safe-actions”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. 读取接口来源
  2. 查看连接器状态
  3. 生成动作 JSON 文件
  4. 校验 JSON 编码
  5. 添加动作
  6. 验证动作存在
  7. 用 CLI 测试动作

What it can do on your machine

Read from SKILL.md and the folder at commit 4932d0b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash, json, powershell and csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Yida Connector Safe Actions loads about 1.8k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 335 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from openyida/openyida at commit 4932d0b, republished under its MIT licence (© openyida). 335 words, ~1,838 tokens.

Download SKILL.mdSave it as .claude/skills/yida-connector-safe-actions/SKILL.md (or your agent's skills folder).
name
yida-connector-safe-actions
description
从前端 API 文件或后端 Controller 代码中提取接口定义,为已有宜搭连接器生成执行动作配置;修复"测试后动作消失"问题。适用于连接器已创建、需要添加可调用的 API 操作时。

宜搭 HTTP 连接器执行动作安全生成

适用场景

当用户需要把已有系统接口接入宜搭 HTTP 连接器时使用本技能,尤其适用于:

  • 已有连接器,需要继续添加“执行动作”
  • 用户提供前端 API 文件和后端 Controller/接口定义文件
  • 从 Vue/React API wrapper、ASP.NET Controller、Spring Controller 等代码中提取接口
  • 点击宜搭连接器测试面板时报错,刷新后动作列表为空
  • openyida connector list-actions <connector-id> 返回 0 个动作,但连接器仍存在
  • 需要说明“如何正确使用 OpenYida 生成 HTTP 连接器动作”

如果只是创建连接器、配置鉴权、管理连接器账号,优先使用 yida-connector。

核心原则

  • 先读源码再生成动作,不要凭空编造接口路径、参数或 action-id。
  • 默认只生成前端 API 文件实际暴露/调用的接口,除非用户明确要求覆盖后端全部接口。
  • 对未知响应结构保持保守,先只输出根对象 Response,避免宜搭测试面板解析复杂输出结构时报错。
  • Windows PowerShell 读取中文 JSON 时必须显式使用 UTF-8。
  • 修改后必须执行“添加动作 -> 列表验证 -> CLI 测试 -> 再次列表验证”的闭环。
  • 如果一次错误配置导致动作被清空,应重建完整动作列表,而不是只追加缺失动作。
  • add-action 只追加新稳定 ID;既有动作的 Query 默认值使用显式 update-action,不得用整份新动作覆盖。
  • 动作 JSON 必须使用当前 agent 的结构化文件写入工具创建;不要用 shell heredoc、cat/echo/printf/tee 或重定向写文件。

推荐流程

1. 读取接口来源

同时读取用户提供的前端 API 文件和后端接口定义文件。

前端 API 文件用于确认“哪些接口真的要暴露给宜搭连接器”;后端文件用于确认 method、route、query/path/body 参数和默认值。

2. 查看连接器状态
bash
openyida connector detail <connector-id>
openyida connector list-actions <connector-id>

记录以下信息:

  • 连接器 ID
  • 连接器域名、协议、基础路径、鉴权方式
  • 当前已有动作列表
  • 是否已经出现动作被清空
3. 生成动作 JSON 文件

建议放在 OpenYida project 工作目录的任务子目录:

text
<projectRoot>/.cache/openyida/<项目名或任务名>/connector-actions/<业务名>-actions.json

从 workspace 根执行命令时传 project/.cache/openyida/<项目名或任务名>/connector-actions/<业务名>-actions.json;从 project 工作目录内执行时传 .cache/openyida/<项目名或任务名>/connector-actions/<业务名>-actions.json。

动作 ID 使用可重复生成的稳定格式,不使用时间戳或顺序漂移:

json
"id": "operation-getUserDtuSns"

动作调用名使用前端函数名或后端 Action 名:

json
"operationId": "getUserDtuSns"
4. 校验 JSON 编码

Windows PowerShell 必须加 -Encoding UTF8:

powershell
Get-Content -Raw -Encoding UTF8 .cache\openyida\<项目名或任务名>\connector-actions\<业务名>-actions.json | ConvertFrom-Json | Out-Null

不要使用默认 Get-Content 校验中文 JSON,默认编码可能导致误判或乱码。

5. 添加动作
bash
openyida connector add-action --operations .cache/openyida/<项目名或任务名>/connector-actions/<业务名>-actions.json --connector-id <connector-id> --confirm
6. 验证动作存在
bash
openyida connector list-actions <connector-id>
7. 用 CLI 测试动作

CLI 测试时 --action 使用 operationId,不是顺序编号 operation-1:

bash
openyida connector test --connector-id <connector-id> --action <operationId>

参数必须按动作 Schema 的位置传入;推荐使用结构化参数,避免 flat 参数误入 query/body:

bash
openyida connector test --connector-id <connector-id> --action <operationId> \
  --path-json '{"id":"42"}' \
  --query-json '{"date":"2026-08-27"}' \
  --header-json '{}' \
  --body-json '{}'

连接器配置了 securitySchemes 时,必须先从 list-connections 取得属于该连接器的账号,再传 --account-id;0 个账号、未指定账号或账号不属于目标连接器都必须停止。测试只接受 {statusLine,responseHeaders,content} canonical 响应,非 2xx 或未知 envelope 都算失败。

测试后再次查询动作列表,确认动作没有被清空:

bash
openyida connector list-actions <connector-id>
安全编辑已有 Query 默认值
bash
openyida connector update-action \
  --connector-id <connector-id> \
  --action <operationId> \
  --query-json '{"currentPage":"1"}' \
  --confirm

该命令是 query-only 的窄更新,不是通用 patch:写前必须获得完整连接器详情和完整动作集合,目标 operationId 必须唯一,Query 参数必须同时在 inputs 与 parameters 中唯一声明且值非空。平台保存是完整集合 replace-all;命令原位合并后只发送一次,并精确回读连接器非目标 fingerprint、动作数量、其他动作、method/path/header/inputs/outputs/responses 和稳定 ID。任何不完整或 unknown outcome 都停止,禁止自动重试非幂等写。

安全动作格式

无参数 GET 动作
json
{
  "id": "operation-getAccessToken",
  "operationId": "getAccessToken",
  "summary": "获取三色灯 Token",
  "description": "获取三色灯 Token",
  "url": "api/TriColorLamp/GetAccessToken",
  "method": "get",
  "inputs": [],
  "parameters": {},
  "responses": {
    "type": "object",
    "properties": {}
  },
  "outputs": [
    {
      "defaultValue": "{}",
      "desc": "响应体结构",
      "name": "Response",
      "paramType": "Object",
      "required": false
    }
  ],
  "origin": true
}
带 Query 参数的 GET 动作
json
{
  "id": "operation-getDtuSnData",
  "operationId": "getDtuSnData",
  "summary": "获取单设备三色灯数据",
  "description": "根据 dtuSn 和日期获取三色灯数据",
  "url": "api/TriColorLamp/GetDtuSnData",
  "method": "get",
  "inputs": [
    {
      "childList": [
        {
          "componentName": "TextField",
          "desc": "设备 dtuSn",
          "name": "dtuSn",
          "queryDefaultValue": {
            "paramType": "fixedValue",
            "defaultValue": ""
          },
          "required": true
        },
        {
          "componentName": "TextField",
          "desc": "查询日期,可为空",
          "name": "date",
          "queryDefaultValue": {
            "paramType": "fixedValue",
            "defaultValue": ""
          },
          "required": false
        }
      ],
      "desc": "请求参数",
      "name": "Query",
      "paramType": "Object",
      "required": false
    }
  ],
  "parameters": {
    "query": [
      {
        "name": "dtuSn",
        "type": "string",
        "required": true,
        "description": "设备 dtuSn",
        "queryDefaultValue": {
          "paramType": "fixedValue",
          "defaultValue": ""
        }
      },
      {
        "name": "date",
        "type": "string",
        "required": false,
        "description": "查询日期,可为空",
        "queryDefaultValue": {
          "paramType": "fixedValue",
          "defaultValue": ""
        }
      }
    ]
  },
  "responses": {
    "type": "object",
    "properties": {}
  },
  "outputs": [
    {
      "defaultValue": "{}",
      "desc": "响应体结构",
      "name": "Response",
      "paramType": "Object",
      "required": false
    }
  ],
  "origin": true
}

字段规则

字段推荐写法
id使用稳定的 operation-<operationId>,重复生成保持一致
operationId使用前端函数名或后端 Action 名,例如 getDtuSnData
summary中文短名称,用于宜搭界面展示
description一句话说明动作用途
url不带域名,只写连接器域名后的相对路径
method小写,例如 get、post、put
inputsGET 参数只放 Query,不要放 Body
parameters.query与 inputs[].childList[] 中的 query 参数保持一致
queryDefaultValueQuery 参数建议在 inputs 和 parameters 两处都写
outputs修复或首次生成时只保留根对象 Response

避免测试面板崩溃

以下写法容易导致宜搭连接器测试面板解析异常,应谨慎使用:

  • 未确认平台兼容时,在输出字段里展开复杂 Code、Message、Data 子字段
  • 给输入/输出叶子节点添加非必要的 label
  • GET 动作配置 Body
  • inputs 与 parameters 中的 query 参数不一致
  • 中文 JSON 未按 UTF-8 读取或保存
  • 只追加部分动作,遗漏原有 Token/Test 动作,导致重建后动作列表不完整
  • 同一批 JSON 出现重复 operationId;CLI 会 fail-closed,不会静默覆盖
  • 把 Authorization、Cookie、token、API Key 示例值写入动作;敏感 Header 默认值必须为空,由鉴权账号运行时注入

当用户反馈“点击测试后操作都不见了”,优先按修复流程处理,不要继续追加同一份风险 JSON。

ASP.NET Controller 映射规则

对于 ASP.NET Controller:

csharp
[Route("api/[controller]/[action]")]
public class TriColorLampController : ControllerBase

路径映射为:

text
api/TriColorLamp/<ActionName>

规则:

  • [HttpGet]、[HttpPost]、[HttpPut] 映射到对应小写 method
  • [FromQuery] 参数映射为 Query
  • 有默认值或可空参数,例如 string date = null,映射为 required: false
  • 无默认值的必填参数映射为 required: true

故障修复流程

当连接器动作被清空时:

  1. 执行 openyida connector detail <connector-id>,确认连接器仍存在。
  2. 执行 openyida connector list-actions <connector-id>,确认动作是否为 0。
  3. 从前端 API 文件和后端 Controller 重新生成完整动作列表。
  4. 如果原来有 Token/Test 动作,也要一起放回 JSON。
  5. 使用保守输出结构,不展开复杂响应字段。
  6. 执行 add-action --confirm 重建动作。
  7. 执行 list-actions 验证动作数量。
  8. 用 connector test --action <operationId> 测试至少一个无参数动作。
  9. 测试后再次执行 list-actions,确认动作没有再次消失。

© openyida, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in yida-skills/skills/yida-connector-safe-actions of openyida/openyida.

Open the folder on GitHubat commit 4932d0b

Compare with similar skills

Yida Connector Safe Actions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Yida Connector Safe Actions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yida Connector Safe Actions this skillopenyida/openyida221—~1.8kAutomated safety check: PassMIT
Control UIopenclaw/openclaw392k—~1.8kAutomated safety check: PassMIT
Control UI Solidopenclaw/openclaw392k—~3.9kAutomated safety check: PassMIT
Control UI E2Eopenclaw/openclaw392k—~2.9kAutomated safety check: PassMIT
API Connector Builderaffaan-m/ECC276k2 repos~666Automated safety check: PassMIT
Validate Connectorsimstudioai/sim30k—~5.7kAutomated safety check: PassApache-2.0

Similar skills

  • Control UI

    openclaw/openclaw

    Operate and troubleshoot the OpenClaw Control UI: navigate connected clients, organize sessions, build session dashboards, and handle direct or Tailscale-hosted Gateways.

    392k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Control UI Solid

    openclaw/openclaw

    Port or review OpenClaw Control UI code moving from Lit 3 and Web Awesome to Solid 2, including components, projections, lifecycle boundaries, and migration proof.

    392k GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Control UI E2E

    openclaw/openclaw

    A skill your agent uses when designing, testing, fixing, or extending the OpenClaw Control UI GUI, including UI stress-test galleries with feedback inputs, Vitest + Playwright end-to-end checks…

    392k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Build a new API connector or provider by matching the target repo's existing integration pattern exactly.

    276k GitHub starsUsed in 2 repos~666 tokens
    Backend & APIsAuto-check passed
  • Validate Connector

    simstudioai/sim

    Validate an existing knowledge base connector against its service's API docs

    30k GitHub stars~5.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Add Connector

    simstudioai/sim

    Add or update a Sim knowledge base connector for syncing documents from an external source, including auth mode, config fields, pagination, document mapping, tags, and registry wiring.

    30k GitHub stars~7.8k tokensUpdated today
    Knowledge ManagementAuto-check passed

More from openyida/openyida

All 59 skills in this repo
  • Yida Canvas Custom Page

    openyida/openyida

    宜搭自定义页面开发规范,使用 YidaCodeCanvas 组件实现现代 React18 自定义页面。用于官网、看板、工作台、列表、详情、门户壳、可视化、hooks 交互、表单入口,以及需要门户组件、数据管理视图、成员、部门或上传组件的场景;发布层自动注入 yida/utils window 桥。

    221 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Openyida Release

    openyida/openyida

    快速发布 OpenYida npm 正式版或测试版。用户说“发布正式版”“发布测试版”“发 beta”或要求按当天日期生成版本 tag 时使用;不用于宜搭应用或自定义页面发布。

    221 GitHub stars~520 tokensUpdated today
    Auto-check passed
  • Yida Design Plan

    openyida/openyida

    Plan 模式的视觉设计分支。基于需求选择视觉方向,再结合业务页面规划维护 build-plan.json 的 visualStyle,供 CLI 派生 design.md。

    221 GitHub stars~756 tokensUpdated today
    Auto-check passed
  • Prevent stale local OpenYida custom page source from overwriting live designer edits.

    221 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Codemap

    openyida/openyida

    Generate, update, or drift-check agent-facing CodeMaps as progressive code terrain indexes for projects, features, capabilities, functions, modules, or bug chains.

    221 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Sdd Riper One Light

    openyida/openyida

    面向 GPT-5.5 等强模型和熟练用户的轻量 AI Agent Harness / checkpoint-driven coding skill。默认用户已经把任务切到基本可执行的最小混沌单元;模型自行分解、探索与推进,人类通过最终目标、最小 spec、复述、checkpoint、证据验证与回写来低干扰控盘。

    221 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Questions about Yida Connector Safe Actions

What does Yida Connector Safe Actions do?

从前端 API 文件或后端 Controller 代码中提取接口定义,为已有宜搭连接器生成执行动作配置;修复"测试后动作消失"问题。适用于连接器已创建、需要添加可调用的 API 操作时。. Yida Connector Safe Actions is an agent skill from openyida/openyida.

How do I install Yida Connector Safe Actions in Claude Code?

Run `npx skills add openyida/openyida --skill yida-connector-safe-actions -a claude-code`. Or copy the skill folder (yida-skills/skills/yida-connector-safe-actions in openyida/openyida) into .claude/skills/yida-connector-safe-actions in your project. Claude Code loads it when a task matches its description.

How do I install Yida Connector Safe Actions in Codex?

Run `npx skills add openyida/openyida --skill yida-connector-safe-actions -a codex`. Or copy the skill folder (yida-skills/skills/yida-connector-safe-actions in openyida/openyida) into .agents/skills/yida-connector-safe-actions in your project. Codex loads it when a task matches its description.

Can I use Yida Connector Safe Actions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add openyida/openyida --skill yida-connector-safe-actions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yida-connector-safe-actions, .gemini/skills/yida-connector-safe-actions, .github/skills/yida-connector-safe-actions and .opencode/skills/yida-connector-safe-actions in your project.

What does Yida Connector Safe Actions need to run?

SKILL.md names no scripts, command-line tools or credentials: Yida Connector Safe Actions is instructions for the agent only.

Does Yida Connector Safe Actions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Yida Connector Safe Actions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Yida Connector Safe Actions use?

Yida Connector Safe Actions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yida Connector Safe Actions use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Yida Connector Safe Actions?

Skills that share tags, products or a category with Yida Connector Safe Actions: Control UI (openclaw/openclaw, 392k stars), Control UI Solid (openclaw/openclaw, 392k stars), Control UI E2E (openclaw/openclaw, 392k stars) and API Connector Builder (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yida Connector Safe Actions?

openyida (a GitHub organization) maintains it in openyida/openyida, which has 221 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 10, 2026.

Source: openyida/openyida on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.