Community研究與資料分析github.com

MoonshotAI/kimi-datasource

通用數據源助手。當使用者需要外部結構化資料,如股票、財報、技術指標、A股/港股/美股市場、全球宏觀經濟、中國企業註冊資訊、arXiv論文、Google Scholar結果或中國法律法規與司法案例時,使用此技能。

kimi-datasource 是什麼?

此技能作為一個通用數據源助手,透過 MCP 伺服器 `plugin-kimi-datasource_data` 提供對七個外部數據源的統一存取。支援的數據源包括:A股/港股/美股行情與財務 (`stock_finance_data`)、Yahoo Finance 全球金融 (`yahoo_finance`)、世界銀行宏觀經濟 (`world_bank_open_data`)、中國企業工商資訊 (`tianyancha`)、arXiv 論文預印本 (`arxiv`)、Google Scholar 學術搜尋 (`scholar`) 以及中國法律法規與司法案例 (`yuandian_law`)。工作流程為標準的兩步驟:先呼叫 `mcp__plugin-kimi-datasource_data__get_data_source_desc` 取得特定數據源的 API 文件,再呼叫 `mcp__plugin-kimi-datasource_data__call_data_source_tool` 執行對應工具。此技能要求使用者在呼叫股票相關 API 前務必先透過網路搜尋核對股票代碼,查詢企業資訊時必須使用完整公司名稱,並注意多數 API 需要指定 `file_path` 參數以寫入 CSV 結果。它支援 Cloude Code 等平台,可有效整合外部結構化資料查詢到開發流程中。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/MoonshotAI/kimi-code/tree/main/plugins/official/kimi-datasource

Installed? Explore more 研究與資料分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

kimi-datasource — 通用數據源助手

0. 呼叫方式

本 skill 使用 datasource MCP server 註冊的兩個工具,不要透過 Bash 手動執行腳本:

  • mcp__plugin-kimi-datasource_data__get_data_source_desc
  • mcp__plugin-kimi-datasource_data__call_data_source_tool

這兩個工具由 Kimi Code 託管執行,參數直接按 tool schema 傳 JSON。

工具會讀取當前 Kimi Code 環境對應的本地 OAuth 登入憑證;當設定了 KIMI_CODE_OAUTH_HOST / KIMI_CODE_BASE_URL 時,會使用對應環境的隔離憑證。如果沒有登入憑證,讓使用者先在 Kimi Code 裡執行 /login。

1. 這個 skill 提供什麼能力

本 plugin 後面掛了 7 個外部數據源。每一行的「數據源名」就是傳給 get_data_source_desc 的 name。

能力域數據源名典型問題
A股 / 港股 / 美股 行情和財務stock_finance_data「茅台現在多少錢」、「寧德時代 2024 年財報」、「騰訊股東」、「杭州的人工智慧股票」
Yahoo Finance 全球金融yahoo_finance「蘋果分析師評級」、「AAPL 選擇權鏈」、「標普 500 歷年價格」
世界銀行宏觀經濟world_bank_open_data「中國歷年 GDP」、「印度通膨率」、「各國人口成長對比」
中國企業工商資訊tianyancha「字節跳動股東」、「比亞迪司法風險」、「寧德時代專利」
arXiv 論文預印本arxiv「找 RAG 綜述」、「下載 2406.xxxxx」
Google Scholar 學術搜尋scholar「Hinton 最新論文」、「transformer 綜述高引文獻」
中國法律法規 / 司法案例yuandian_law「民法典關於居住權的規定」、「幫我查勞動契約解除的相關法條」、「找幾個不當得利的判例」

不支援的能力:通用 Web 搜尋 / 即時新聞。問到這類問題,告訴使用者當前數據源不覆蓋。

2. 標準工作流程:get_data_source_desc → call_data_source_tool

後端可用 API 經常會調整,這份 skill 故意不抄具體的 API 名和參數表。每次呼叫前你都應當現場問數據源:「你都有什麼介面?」

1. 根據使用者問題,從上表挑出一個 data_source_name
2. 執行 get_data_source_desc,讀取該數據源的 Markdown 文件
3. 仔細讀返回的 Markdown,裡面列了:
     - 該數據源整體說明(含 ticker 格式、全域約束)
     - 每個 API 的描述 / 必填參數 / 可選參數 / 預設值 / 取值範圍
4. 選最匹配的 API,按文件拼 params
5. 執行 call_data_source_tool
6. 讀返回結果,用使用者提問時使用的語言回答

例 1:使用者問「茅台最近一年走勢」

  1. 股票走勢 → stock_finance_data

  2. 呼叫 mcp__plugin-kimi-datasource_data__get_data_source_desc,參數 {"name":"stock_finance_data"}

  3. 從文件裡找到「獲取歷史價格」那個 API,看它要 ticker / start_date / end_date / file_path 等

  4. 用 web_search 核對 → 茅台 = 600519.SH

  5. 呼叫 mcp__plugin-kimi-datasource_data__call_data_source_tool,參數形如 {"data_source_name":"stock_finance_data","api_name":"<文件裡寫的 api>","params":{"ticker":"600519.SH","start_date":"...","end_date":"...","file_path":"/tmp/mao_1y.csv"}}

例 2:使用者問「找幾篇 retrieval augmented generation 的綜述」

  1. 論文搜尋 → arxiv(或 scholar,arxiv 更適合預印本,scholar 引用更全)

  2. 呼叫 mcp__plugin-kimi-datasource_data__get_data_source_desc,參數 {"name":"arxiv"}

  3. 從文件裡找到搜尋類 API,看它要 query / file_path / max_results 等

  4. 執行 call_data_source_tool

例 3:使用者問「字節跳動有哪些股東」

  1. 企業工商 → tianyancha

  2. 呼叫 mcp__plugin-kimi-datasource_data__get_data_source_desc,參數 {"name":"tianyancha"}

  3. 注意:tianyancha 的 API 是動態註冊的,文件會指引你先用搜尋類介面找到合適的 API 名,再呼叫

  4. 必須使用企業全稱(「北京字節跳動科技有限公司」),不要用簡稱。不知道全稱就先用 tianyancha 文件裡的「公司搜尋」介面查

3. 呼叫前的幾條鐵律

3.1 股票代碼必須核對,不能憑記憶猜

A 股 .SH/.SZ/.BJ,港股 .HK,美股 .US 等。使用者通常只說中文名(「茅台」、「寧德時代」、「騰訊」),不會給代碼。

調任何股票相關 API 前,先用 web_search / WebSearch 一類聯網工具確認正確代碼 + 後綴。

如果當前環境沒有任何聯網工具,讓使用者親口確認代碼,不要硬猜。錯了的話介面會靜默返回錯數據或空數據。

3.2 企業相關查詢必須用全稱

tianyancha 拒收「特斯拉」、「網易」、「騰訊」這種簡稱,必須給「北京特斯拉銷售有限公司」這種全名。不知道全名時,先調它的公司搜尋 API。

3.3 多數 API 需要 file_path

絕大部分數據源 API 把完整結果以 CSV 形式寫到 file_path。漏傳會報 Missing required parameters: file_path。不知道傳啥時,給一個 /tmp/<場景>_<時間戳>.csv 即可。

3.4 一次呼叫不要堆太多 ticker

stock_finance_data 的即時介面最多 3 個 ticker,歷史介面最多 10 個。超過會被截斷或報錯。多了就分批調。

4. 怎麼讀返回結果

call_data_source_tool 的 stdout 一般含兩段:

  1. data_preview:CSV 頭 + 前幾行(通常 1~3 行),方便你直接答簡單問題
  2. CSV 數據已寫入:/tmp/xxx.csv:完整數據落盤路徑

策略:

  • 使用者只問「XX 現在多少錢」、「中國 2023 GDP 多少」這種單值 → data_preview 一般夠,直接答
  • 使用者要畫圖、對比、算盈虧、列清單 → 用 Read 工具把 CSV 讀出來再處理
  • 混合 A+港股查詢時服務端會自動把 CSV 拆成 _a.csv / _hk.csv 兩份,原 file_path 那個文件不存在

如果介面返回失敗,提示文字一般會寫明原因(參數不對 / 不支援 / 數據空等)。把人話原因回饋給使用者,不要硬走第二次。

5. watchlist.json — 使用者自選股

${KIMI_SKILL_DIR}/watchlist.json 是使用者的自選股列表。使用者問「看一下我的自選股」時,讀這個文件,再走標準 get_data_source_desc("stock_finance_data") → call_data_source_tool 流程查即時行情;文件裡的即時介面最多 3 個 ticker 一批,多了分批調。

格式:

[
  {"code": "600519.SH", "name": "貴州茅台"},
  {"code": "0700.HK", "name": "騰訊控股", "hold_cost": 350.5, "hold_quantity": 100}
]
  • code 和 name 必填;hold_cost 和 hold_quantity 可選
  • 兩者都有時順便算盈虧:(當前價 - hold_cost) * hold_quantity
  • 使用者說「幫我加 XX 到自選股」時:先 web_search 核對代碼,再追加到 JSON 陣列

6. 注意事項

  • 回答使用者時,使用使用者提問時使用的語言。如果使用者用中文問,就用中文答;如果使用者用英文問,就用英文答;用其他語言問,就用其他語言答。
  • 不要憑記憶猜股票代碼 / 企業全稱。錯代碼會讓介面靜默返回錯數據,使用者察覺不到
  • 不要在沒讀 desc 的情況下硬傳 api_name。後端會報 API_NOT_FOUND。除非這次對話裡你已經讀過該數據源的 desc 並記得參數
  • 不要給投資建議。給完數據加一句「AI 生成,不構成投資建議」即可
  • 如果某個數據源介面返回的報錯明顯是後端 bug(參數 schema 自相矛盾、內部 Python 報錯等),彙報錯誤給使用者,不要硬試——這種 bug 我們這邊修不了,要後端服務側改

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

MoonshotAI/agent-core-dev

Use when developing in packages/agent-core-v2 (the DI × Scope agent engine) — adding or modifying a domain Service, choosing a LifecycleScope, wiring DI dependencies, splitting a domain across scopes, owning or migrating a config section, gating behavior behind an experimental flag, raising coded errors, working on the permission system, writing DI/Scope tests, porting business logic from agent-core (v1) to v2, triaging a main-branch commit against v2, or exposing a v2 domain over server-v2 while keeping the /api/v1 wire contract compatible with released clients. Self-contained guide organized by development stage (orient → design → implement → test → verify) plus align workflows for v1→v2 migration, main-branch commit triage, and server-v2 wire exposure; each file carries the rules, examples, and red lines for its step.

MoonshotAI/agent-core-review

Use ONLY for code review and test write/review guidance in `packages/agent-core-v2` (the DI × Scope agent engine). Does NOT apply to the legacy `packages/agent-core` or to any other package — for those, do not load this skill. Groups the review and testing lenses used for agent-core-v2 — `slop` (single-level-of-abstraction / layered error-handling review, invoked only on explicit request) and `test` (contract-driven per-test rules for both authoring and reviewing tests). Apply the sub-skill that matches the task; do not apply `slop` unprompted.

MoonshotAI/consolidate

Apply an approved sub-skill grouping by moving user-specified skills into a parent bundle, with timestamped backups of every modified directory.

MoonshotAI/gen-changesets

Use when generating changesets in the kimi-code repository, including package bump selection, internal package and CLI bundle handling, bump levels, major confirmation, and English changelog wording.

MoonshotAI/gen-docs

Update Kimi Code CLI user documentation after meaningful code changes that affect product behavior or user experience.

MoonshotAI/pre-changelog

Use before merging a kimi-code release PR to preview the user-facing CLI changelog in Chinese. Reads the changelog that changesets pre-generated in the release PR, then reuses sync-changelog's strip / classify / translate logic to render a Chinese preview. Writes no files.

MoonshotAI/review

Analyze the available skill set and recommend candidate groups that could be consolidated into sub-skill bundles. Read-only — proposes a plan, does not move files.

MoonshotAI/slop

Invoke only when the user explicitly asks to review code through the "single level of abstraction / layered error handling" lens — a function does only its own layer's business logic while errors are handled above or below. The agent reports detections, raw-count measurements, and move directions. Apply only when the user explicitly requests this lens.

MoonshotAI/sub-skill

Discover and reorganize the skill inventory into hierarchical sub-skill bundles. Use when the user asks to review, group, or consolidate skills into a parent bundle.

MoonshotAI/sync-changelog

Use after a release succeeds, when maintainers need to sync apps/kimi-code/CHANGELOG.md into docs/en/release-notes/changelog.md and docs/zh/release-notes/changelog.md, then open a PR on a dedicated branch.

MoonshotAI/test

Use when writing or reviewing tests, or when asked how to write a good single test. Encodes the per-test rules behind the "test the contract / responsibility, not the implementation" principle — name and structure one behavior per `it`, drive through the public surface, stub only true external boundaries, control time and config via documented knobs, and keep tests clear, isolated, and refactor-resilient. The same rules drive both authoring (write mode) and auditing existing tests (review mode).

MoonshotAI/translate-docs

Translate and sync bilingual user documentation between docs/zh/ and docs/en/ following the source-of-truth rules in docs/AGENTS.md.

MoonshotAI/write-tui

Use when writing or modifying the kimi-code terminal UI in apps/kimi-code/src/tui — components, dialogs/selectors, slash commands, themes, streaming render, or the KimiTUI controllers. Covers the architecture, where new features go, test placement, the theme system mechanics, and the dialog interaction/visual spec (DESIGN.md).

相關技能