agentsclimarketplace

Public

Skill uid13/skills/src/hq/public

查询股票、基金、期货、指数实时行情。支持 A 股、港股、美股、基金、期货主力合约及大盘指数。From its SKILL.md

Install
npx -y skills add uid13/skills --skill public

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

4 things to look at

  • skips confirmationTells the agent to proceed without asking first, 1 time: "若无法确定代码,请自动联网搜索该标的的准确代码,不要反问用户".
  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 2 commands, including `node <skill-dir>/scripts/dist/hq.mjs 600085 aapl 00700 AU0` and 1 more.
  • fetches URLsInstructs the agent to fetch 1 URL, including http://localhost:5168/chart-line.svg.

SKILL.md

6.3 KB, ~2.4k tokens by cl100k_base, as published. Nobody here has run it

实时行情查询技能

本技能提供全球主要市场的实时行情查询。Agent 需负责将自然语言转换为标准代码并调用脚本。

🔄 核心工作流 (Workflow)

当用户请求查询行情时,请严格遵循以下步骤:

1. 意图识别与实体提取

  • 识别用户意图是否为“查询行情”。
  • 提取标的名称(如“同仁堂”、“腾讯”、“苹果”)或直接提取代码(如“600085”)。

2. 代码转换 (关键步骤)

脚本仅接受标准代码,不接受中文名称。你必须利用自身知识库或联网搜索将名称转换为代码。

示例

  • 用户输入:“同仁堂行情”
  • 你的动作:检索知识库或联网搜索 → 确认代码为 600085 → 准备调用脚本。
  • 若无法确定代码,请自动联网搜索该标的的准确代码,不要反问用户。

代码格式要求

  • A 股/基金:6 位数字(如 600085, 510300)。
  • 港股:5 位数字(如 00700)。
  • 美股:英文代码(小写,如 aapl)。
  • 期货:品种代码 + 0(如 AU0AP0MA0)。
  • 指数:带交易所前缀(如 sh000001 上证指数,sz399001 深证成指,sz399006 创业板指)。

3. 调用工具

使用转换后的代码执行命令:

node <skill-dir>/scripts/dist/hq.mjs 600085 aapl 00700 AU0

4. 输出与渲染

  • 脚本输出 JSON 格式的行情数据(分为 stock / fund / futures / index 四类),不包含任何渲染

  • 你必须读取 JSON 数据,自行渲染为 Markdown 表格展示给用户,涨跌用 🔴涨 🟢跌 标记,表格格式见「输出格式说明」章节。

  • 表格末尾添加引导语:

    ---
    💡 回复 **行情工具** 查看外盘期货行情、期货手续费查询、指标公式
    

🌐 行情工具(独立功能)

行情工具包含三个页面,通过 Vite dev server 代理解决 CORS 问题:

  • 📈 外盘期货行情 — 伦敦金、布伦特原油、COMEX 黄金等 29 个外盘品种实时行情
  • 💰 期货手续费查询 — 郑商所/大商所/上期所/上能所/中金所 保证金和手续费
  • 📊 指标公式 — 付费指标展示

触发条件

仅当用户明确表达"行情工具"意图时触发,如回复:

  • 行情工具
  • 打开行情工具
  • 外盘期货
  • 期货手续费
  • 指标公式

语义匹配,不区分大小写。

启动步骤

  1. 检查端口 5168 是否已有服务在运行:
    • 请求 http://localhost:5168/chart-line.svg
    • 返回 200 → 跳过启动
    • 请求失败 → 执行下一步
  2. 后台启动 Vite dev server(确保技能执行结束后仍然存活):
    cd <skill-dir>
    npx -y [email protected] --config vite.config.mjs --port 5168
    
    等待约 5-8 秒
  3. 依次输出以下三个页面链接:

说明

  • vite.config.mjs 已内置在技能目录中,包含 API 代理配置

📋 代码输入规范参考

脚本内部会自动处理交易所前缀(如 sh/sz/bj/gb_/nf_),Agent 只需传入核心代码

市场代码格式示例映射逻辑 (Agent 需掌握)
A 股6 位数字600085同仁堂
港股5 位数字00700腾讯
美股英文小写aapl苹果
基金6 位数字510300沪深 300ETF
期货品种代码+0AU0黄金主力
指数交易所前缀+代码sh000001上证指数

📊 输出格式说明

JSON 数据结构

脚本输出为 JSON 数组,每组包含 type / label / data 三个字段:

[
  {
    "type": "stock",
    "label": "📈 股票行情",
    "data": [
      { "code": "600085", "name": "同仁堂", "price": "25.10", "change": "+0.50", "changePercent": "+2.03%", "high": "25.20", "low": "24.80" }
    ]
  },
  {
    "type": "fund",
    "label": "💰 基金行情",
    "data": [
      { "code": "510300", "name": "沪深300ETF", "price": "3.85", "change": "-0.02", "changePercent": "-0.51%", "high": "3.88", "low": "3.84" }
    ]
  },
  {
    "type": "futures",
    "label": "📦 期货主力行情",
    "data": [
      { "code": "AU0", "name": "黄金", "price": "480.50", "change": "+5.20", "changePercent": "+1.09%", "high": "482.00", "low": "475.00" }
    ]
  },
  {
    "type": "index",
    "label": "📊 指数行情",
    "data": [
      { "code": "SH000001", "name": "上证指数", "price": "3200.50", "change": "+15.20", "changePercent": "+0.48%", "high": "3210.00", "low": "3185.00" }
    ]
  }
]

渲染规则

读取每组 data 后,你必须按资产类别分别渲染为独立的 Markdown 表格,每类使用对应的 label 作为标题:

📈 股票行情
| 编码 | 名称 | 当前价 | 涨跌 | 涨跌幅 | 最高 | 最低 |
|------|------|--------|------|--------|------|------|
| 600085 | 同仁堂 | 25.10 | 🔴 +0.50 | 🔴 +2.03% | 25.20 | 24.80 |

💰 基金行情
| 编码 | 名称 | 当前价 | 涨跌 | 涨跌幅 | 最高 | 最低 |
|------|------|--------|------|--------|------|------|
| 510300 | 沪深300ETF | 3.85 | 🟢 -0.02 | 🟢 -0.51% | 3.88 | 3.84 |

📦 期货主力行情
| 编码 | 名称 | 当前价 | 涨跌 | 涨跌幅 | 最高 | 最低 |
|------|------|--------|------|--------|------|------|
| AU0 | 黄金 | 480.50 | 🔴 +5.20 | 🔴 +1.09% | 482.00 | 475.00 |

📊 指数行情
| 编码 | 名称 | 当前价 | 涨跌 | 涨跌幅 | 最高 | 最低 |
|------|------|--------|------|--------|------|------|
| SH000001 | 上证指数 | 3200.50 | 🔴 +15.20 | 🔴 +0.48% | 3210.00 | 3185.00 |
  • change+ 开头 → 🔴(涨)
  • change- 开头 → 🟢(跌)
  • 每组单独一个表格,不可合并到同一个表格中

表格渲染完毕后,末尾添加引导语:

---
💡 回复 **行情工具** 查看外盘期货行情、期货手续费查询、指标公式

What ships with it: 10 files

387.5 KB alongside SKILL.md, 1 of them executable

assets/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.