Yida Data Source Connectors logo

Yida Data Source Connectors

Organization
openyida
yida-data-source-connectors

基于 JSX 组件 自定义页面设计器 dataSourceMap 专用技能。仅用于维护已存在的 Page dataSource.online / this.dataSourceMap.<name>.load() 形态。`YidaCodeCanvas` 组件没有 dataSourceMap;使用 `YidaCodeCanvas` 组件实现的自定义页面数据接入必须改用 yida-canvas-data-binding / HTTP 数据桥。

Overview

Publisheropenyida
Repositoryopenyida
Skill nameyida-data-source-connectors
Stars
228
Forks
50
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by openyida on GitHub. Read the source before you install it.

Installation

Install the Yida Data Source Connectors AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openyida/openyida/tree/main/yida-skills/skills/yida-data-source-connectors
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openyida/openyida.git /tmp/openyida
mkdir -p .claude/skills
cp -r /tmp/openyida/yida-skills/skills/yida-data-source-connectors .claude/skills/yida-data-source-connectors
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Yida Data Source Connectors in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Yida Data Source Connectors on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Yida Data Source Connectors is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

宜搭设计器 dataSourceMap 连接器数据源规范

核心定位

本技能只服务已存在的历史平台 JSX 组件页面中的设计器 Page dataSource.online 配置:

text
设计器 Page dataSource.online
  → this.dataSourceMap.<name>.load()
  → 连接器 / REMOTE 数据源

它不是 YidaCodeCanvas 组件页面通用数据接入技能。YidaCodeCanvas 组件没有平台 JSX 组件页面实例 this,也没有 dataSourceMap;遇到 .canvas.jsx、YidaCodeCanvas、YidaComp、React hooks 或新建自定义页面看板时,立即改用:

text
use_skill("yida-canvas-data-binding", "为使用 YidaCodeCanvas 组件实现的页面接入连接器或同源 API 数据")

需要 YidaCodeCanvas 组件运行时规范时,按 yida-canvas-custom-page 的自定义页面规范处理。

路由边界

信号路由
.oyd.jsx、.oyb.jsx、renderJsx、平台 Jsx 组件页面、已有 this.dataSourceMap本技能
用户明确要求“设计器左侧数据源可见”本技能
维护已有 dataSource.online / YIDACONNECTOR Schema本技能
YidaCodeCanvas、.canvas.jsx、YidaComp、hooksyida-canvas-data-binding
新建看板/工作台/列表/详情需要连接器数据不使用本技能
需要创建/管理连接器或 Action 本身yida-connector

不要为了使用本技能而把 YidaCodeCanvas 组件页面改写成平台 JSX 组件页面。

平台 JSX 组件核心规则

搜索与筛选参数

已有数据源调用普通表单 searchFormDatas 时,按查询条件指南构造条件数组,searchFieldJson 传 JSON.stringify(conditions)。单日期用 is / is_not;区间用真实字段 ID 加 .start / .end 按 DateField 查询。条件按 AND 组合,筛选变化时回到第 1 页,读取服务端 totalCount。

多选未选择、子表无行及区间任一端已填,用同步维护的计数字段筛选。openyida sample yida-data-management empty-query 提供构造器;条件和分页参数按已有数据源定义传给 .load()。连接器沿用 Action 的 Headers、Query、Body 契约。Canvas 由 yida-canvas-data-binding 接入。

历史平台 JSX 组件页面调用连接器或远程 API 时,先在设计器 Page 根节点 dataSource.online 注册数据源,再通过:

javascript
this.dataSourceMap.<数据源名>.load()

禁止在平台 JSX 组件页面用 fetch、XMLHttpRequest、/query/newconnector/testConnector.json、ConnectorFactory.testConnector 或手写外部 URL 绕过设计器数据源。

官方示例回读时可能把数据源归一为:

text
REMOTE
  + /query/publicService/invokeService.json
  + serviceInfo.connectorInfo

这是平台可接受的只读形态;源码仍以可审计的连接器配置为准,不写死 _csrf_token。

平台 JSX 组件实施流程

1. 确认连接器与 Action

bash
openyida connector detail <connector-id>
openyida connector list-actions <connector-id>

2. 规划数据源名称

使用业务语义小驼峰,例如:

  • getDeviceList
  • getDeviceState
  • submitDeviceCommand

每个远程能力使用独立数据源;查询、详情、保存、删除不要混成一个万能 Action。

3. 注册 dataSource.online

连接器数据源需要:

  • dpType: "YIDACONNECTOR"
  • protocal: "REMOTE"
  • requestHandler.value: "this.utils.legaoBuiltin.dataSourceHandler"
  • options.connector 指向连接器名
  • options.connectorAction.value 使用 Action operationId
  • options.params.inputs 包含 Headers、Query、Body
  • options.shouldFetch: false,页面按需触发
  • options.didFetch 归一返回 content
  • options.onError 暴露数据源/Action 名并恢复 loading

4. 页面只调用已注册数据源

javascript
export function loadConnectorDataSource(dataSourceName, headers, query, body) {
  var dataSource = this.dataSourceMap && this.dataSourceMap[dataSourceName];
  if (!dataSource || typeof dataSource.load !== 'function') {
    return Promise.reject(new Error('页面数据源不存在:' + dataSourceName));
  }
  return dataSource.load({
    inputs: JSON.stringify({
      Headers: headers || {},
      Query: query || {},
      Body: body || {}
    })
  });
}

5. 恢复状态

  • 请求失败、取消或超时后必须 loading: false。
  • 页面显示具体错误或 toast,不能只写 console。
  • 超时和重试必须有限,不能永久停在“加载中”。
  • mutation 操作避免重复提交;按钮有 submitting/disabled 状态。

YidaCodeCanvas 数据接入边界

YidaCodeCanvas 组件源码中不得复制上面的 this.dataSourceMap 代码。使用 YidaCodeCanvas 组件实现的页面数据接入使用:

  • dataBinding.mode=connector + 同源代理 endpoint。
  • 或 dataBinding.mode=url/form/report + DataBridge。
  • fetch(..., { credentials: 'include' })。
  • CSRF、AbortController、返回体解包、totalCount 保护、silent refresh。
  • Cookie、密钥、签名留在平台连接器或后端服务侧。

详细规则由 yida-canvas-data-binding 决定。本技能只负责判断当前需求是否属于历史 dataSourceMap 维护,不为 YidaCodeCanvas 组件页面发明伪 dataSourceMap。

发布与回读验证

bash
openyida check-page <src>
openyida compile <src>
openyida publish <src> <appType> <formUuid> --health-check
openyida get-schema <appType> <formUuid>

这些是历史平台 JSX 组件页面验证步骤。使用 YidaCodeCanvas 组件实现的页面验证必须使用 compileCanvasLocal、.canvas.jsx 发布和 YidaCodeCanvas/runtimeCode 回读,不要复用这里的 check-page 默认。

平台 JSX 组件回读检查:

  • 设计器左侧“数据源”能看到连接器数据源。
  • dataSource.online 存在显式连接器数据源,或被平台归一为 REMOTE + publicService/invokeService + serviceInfo.connectorInfo。
  • actions.module.source 没有 ConnectorFactory.testConnector、newconnector/testConnector 或外部 API 直连。
  • 运行时代码使用 this.dataSourceMap.<name>.load()。

反模式

平台 JSX 组件反模式

javascript
fetch('https://api.example.com/data');
new XMLHttpRequest();
postYidaForm('/query/newconnector/testConnector.json?_api=ConnectorFactory.testConnector', payload);

YidaCodeCanvas 反模式

javascript
// YidaCodeCanvas 组件中不存在 this 页面实例
this.dataSourceMap.getDeviceList.load();

也禁止看到连接器需求就自动选择本技能;先判断页面运行时。

验收清单

  • 已确认目标是历史平台 JSX 组件页面,而不是 YidaCodeCanvas 组件页面。
  • Page Schema 包含可审计的数据源配置。
  • 平台 JSX 组件页面代码只通过 this.dataSourceMap 调用。
  • loading / error / timeout / retry 可恢复。
  • check-page、compile、发布回读属于历史平台 JSX 组件页面维护范围且通过。
  • 如果目标是 YidaCodeCanvas 组件页面,已转 yida-canvas-data-binding,本技能没有生成平台 JSX 组件页面代码。

子表内嵌明细只返回 50 行时,应使用 openyida data query subform 按 formInstId + tableFieldId 分页查询,不为此新建连接器数据源。

Frequently asked questions

What does the Yida Data Source Connectors AI skill do?

基于 JSX 组件 自定义页面设计器 dataSourceMap 专用技能。仅用于维护已存在的 Page dataSource.online / this.dataSourceMap.<name>.load() 形态。`YidaCodeCanvas` 组件没有 dataSourceMap;使用 `YidaCodeCanvas` 组件实现的自定义页面数据接入必须改用 yida-canvas-data-binding / HTTP 数据桥。

Why use Yida Data Source Connectors on TypingMind?

Because you install it once and use it with any model. Yida Data Source Connectors is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Yida Data Source Connectors in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openyida/openyida/tree/main/yida-skills/skills/yida-data-source-connectors. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Yida Data Source Connectors?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Yida Data Source Connectors?

As many as you like. As long as a model supports skills, you can use Yida Data Source Connectors with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Yida Data Source Connectors AI skill free?

Yes. It is published on GitHub by openyida under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇