Community研究&データ分析github.com

MoonshotAI/kimi-datasource

ユニバーサルデータソースアシスタント。株式、財務レポート、テクニカル指標、A株/香港株/米国株市場、世界マクロ経済、中国企業登記情報、arXiv論文、Google Scholar結果、中国法律法規・裁判例など、外部構造化データが必要な際に使用します。このスキルはMCPサーバー `plugin-kimi-datasource_data` を介してツールを公開しています。

kimi-datasource とは?

このスキルは、A株/香港株/米国株の株価・財務データ、Yahoo Financeのグローバル金融データ、世界銀行のマクロ経済指標、天眼査(中国企業登記情報)、arXiv論文、Google Scholar学術検索、中国法律法規・裁判例という7つの外部データソースへのゲートウェイを提供します。Kimi Codeプラグインとして動作し、標準ワークフローは `mcp__plugin-kimi-datasource_data__get_data_source_desc` でデータソースの利用可能なAPIドキュメントを動的に取得し、次に `mcp__plugin-kimi-datasource_data__call_data_source_tool` で適切なAPIを呼び出します。各APIは静的にハードコードされるのではなく、呼び出し時にドキュメントからリアルタイムで解決されるため、バックエンドの変更にも柔軟に対応できます。主なルールとして、株価コードは必ずWeb検索で確認すること、企業検索には正式名称を使用すること(略称は不可)、多くのAPIは結果をCSVファイルに保存するために `file_path` パラメータが必要です。また、ユーザーは `watchlist.json` ファイルでポートフォリオを管理でき、スキルが自動的に時価評価と損益を計算します。注意点として、このスキルは投資アドバイスは提供しません。データを提供する際には「AI生成、投資助言ではありません」と明記します。

対応~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に質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

kimi-datasource — 汎用データソースアシスタント

0. 呼び出し方法

本スキルは datasource MCP サーバーに登録された2つのツールを使用します。Bash で手動スクリプトを実行しないでください:

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

これらのツールは Kimi Code によってホスト実行され、パラメータはツールスキーマに従って JSON で直接渡します。

ツールは現在の Kimi Code 環境に対応したローカルの OAuth ログイン認証情報を読み取ります。KIMI_CODE_OAUTH_HOST / KIMI_CODE_BASE_URL が設定されている場合は、対応する環境の分離された認証情報を使用します。ログイン認証情報がない場合は、ユーザーに Kimi Code で /login を実行するよう促してください。

1. このスキルが提供する機能

本プラグインは7つの外部データソースを接続しています。各行の「データソース名」が get_data_source_desc に渡す name です。

機能ドメインデータソース名典型的な質問
A株 / 香港株 / 米国株 相場・財務stock_finance_data「茅台の現在の株価は?」「寧徳時代の2024年度財務諸表」「テンセントの株主」「杭州のAI関連株」
Yahoo Finance グローバル金融yahoo_finance「Appleのアナリストレーティング」「AAPLのオプションチェーン」「S&P500の過去価格」
世界銀行マクロ経済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は頻繁に調整されるため、このスキルは特定の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年の値動きは?」

  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 などのネットツールを使って正しいコード + サフィックスを確認してください。

現在の環境にネットツールがない場合は、ユーザーにコードを直接確認してもらってください。推測は避けてください。間違っていると、APIは静かに間違ったデータや空データを返します。

3.2 企業関連の検索は正式名称を使用する

tianyancha は「特斯拉」「網易」「テンセント」のような略称を受け付けません。「北京特斯拉銷售有限公司」のような正式名称を指定する必要があります。正式名称が分からない場合は、まず会社検索APIを呼び出してください。

3.3 多くのAPIは file_path を必要とする

ほとんどのデータソースAPIは完全な結果をCSV形式で file_path に書き込みます。省略すると Missing required parameters: file_path エラーになります。何を指定すればよいか分からない場合は、/tmp/<シナリオ>_<タイムスタンプ>.csv としてください。

3.4 1回の呼び出しに多くのtickerを含めない

stock_finance_data のリアルタイムインターフェースは最大3 ticker、履歴インターフェースは最大10 tickerです。超えると切り捨てられるかエラーになります。多い場合は分割して呼び出してください。

4. 返された結果の読み方

call_data_source_tool の stdout には通常、2つの部分が含まれます:

  1. data_preview:CSVヘッダー + 先頭数行(通常1~3行)。簡単な質問に直接答えるのに便利です
  2. CSV データ已写入:/tmp/xxx.csv:完全なデータが書き込まれたファイルパス

戦略:

  • ユーザーが「XXの現在の価格は?」「中国の2023年のGDPは?」のような単一の値を尋ねている場合 → data_preview で十分なので、直接回答します
  • ユーザーがグラフ作成、比較、損益計算、リスト作成を希望する場合 → Read ツールでCSVを読み込んで処理します
  • A株と香港株を混合して検索した場合、サーバー側で自動的にCSVが _a.csv / _hk.csv の2つに分割され、元の file_path のファイルは存在しなくなります

APIが失敗した場合、エラーメッセージに通常その理由(パラメータ不正 / 非対応 / データなし等)が記載されています。そのメッセージをそのままユーザーに伝え、無理に再試行しないでください。

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. 注意事項

  • ユーザーへの回答は、ユーザーが質問に使用した言語で行うこと。ユーザーが日本語で質問した場合は日本語で、英語で質問した場合は英語で回答します。
  • 株価コードや企業の正式名称を記憶だけで推測しないこと。間違ったコードはAPIが静かに間違ったデータを返し、ユーザーが気づかない可能性があります
  • desc を読まずに api_name をハードコードしないこと。バックエンドは API_NOT_FOUND を返します。ただし、同じセッション内で既にそのデータソースのdescを読み、パラメータを覚えている場合は除きます
  • 投資アドバイスを提供しないこと。データを提供した後は「AI生成、投資助言ではありません」と一言添えてください
  • 特定のデータソースのAPIが返すエラーが明らかにバックエンドのバグ(パラメータスキーマの矛盾、内部Pythonエラーなど)である場合、エラーをユーザーに報告し、無理に再試行しないでください — このようなバグはこちらでは修正できず、バックエンドサービス側の変更が必要です

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).

関連スキル