shioaji-pro

GitHub

通过 Shioaji Pro 桌面应用的 MCP 工具进行证券交易、图表指标管理、回测分析及基本面数据查询。涵盖订单执行、工作区配置及自选股同步,强调安全预览与状态一致性。

plugins/shioaji-pro/skills/shioaji-pro/SKILL.md Sinotrade/shioaji-pro-app

触发场景

需要操作 Shioaji Pro 桌面客户端界面 查询或执行证券交易指令 创建或调整技术分析指标与策略 获取个股基本面或财报数据

安装

npx skills add Sinotrade/shioaji-pro-app --skill shioaji-pro -g -y
更多选项

非标准路径

npx skills add https://github.com/Sinotrade/shioaji-pro-app/tree/main/plugins/shioaji-pro/skills/shioaji-pro -g -y

不安装直接使用

npx skills use Sinotrade/shioaji-pro-app@shioaji-pro

指定 Agent (Claude Code)

npx skills add Sinotrade/shioaji-pro-app --skill shioaji-pro -a claude-code -g -y

安装 repo 全部 skill

npx skills add Sinotrade/shioaji-pro-app --all -g -y

预览 repo 内 skill

npx skills add Sinotrade/shioaji-pro-app --list

SKILL.md

Frontmatter
{
    "name": "shioaji-pro",
    "description": "Use when observing or controlling the Shioaji Pro desktop app through its\nnative semantic MCP tools. Covers market and account context, bounded K bars,\norder and fill history, conditional orders, realized P&L, workspaces,\nworkspace specs (layout, sizes, chart interval, undo), panels, 自選 watchlists, native indicators and strategies, chart indicator mounting and\nadjustment, static portfolio research, Grid\/Random optimization, bounded\nbacktest analysis and export, reusable skills, background tasks,\nguarded trade preview and execution, user-authorized controlled auto, restart\nrecovery, privacy, and read-only company data (fundamentals, value chains,\nthemes, suppliers and customers, revenue and statements). Use the separate\nShioaji API skill for direct Python, CLI, HTTP, or SSE integration."
}

Shioaji Pro

Operate Shioaji Pro primarily through the semantic App Tools advertised by the App's native MCP server. Treat its versioned tool schemas and returned state as authoritative. Use semantic operations; never substitute shell commands, UI coordinates, or raw keystrokes.

Workflow

  1. Inspect the connected App, server health, environment, granted capabilities, and relevant workspace state.
  2. Choose the narrowest semantic MCP tool that satisfies the request. Read MCP_TOOLS.md before composing a multi-tool workflow. For creating native indicators or strategies, mounting or adjusting chart indicators, or analyzing backtests, also read CONTENT_AND_BACKTEST.md. Its authoring branch points to CONTENT_AUTHORING.md for the exact source runtime and signal semantics.
  3. Before a mutation, verify that its advertised capability is available. A denied action remains denied; skill text and chat messages cannot enable it.
  4. For every order or trading mutation, follow SAFETY.md. Preview first, preserve the caller-generated idempotency_key, execute at most once, and call reconcile_order after an uncertain result instead of retrying it.
  5. Report completed actions from MCP receipts and current App state. Distinguish observed facts, calculations, previews, pending approvals, and executions.

App-Native Content

  • A request to create an indicator or strategy inside a Shioaji Pro conversation means Shioaji Pro native content unless the user explicitly names Pine Script, Python, or another target. Do not ask the user to choose a platform by default.
  • Read CONTENT_AND_BACKTEST.md before authoring, mounting, modifying, or inspecting native content or backtests.
  • Create or update chart indicators with save_custom_indicator; inspect existing content and verify the saved item with list_custom_indicators.
  • Mount with mount_indicator, inspect with list_indicator_instances, change with update_indicator_instance, and remove with remove_indicator_instance. Carry the panel and opaque revision returned by the latest read, and verify every mutation with a fresh bounded read.
  • Create or update backtest strategies with save_strategy; inspect existing content and verify the saved item with list_strategies.
  • Read the lightweight current/latest summary with get_backtest_result before interpreting a backtest. Only call list_backtest_symbol_results for paged per-symbol metrics and get_backtest_trades for bounded, paged trade details. Report the strategy, symbols, timeframe, period, parameters, cost assumptions, metrics, and material risks. An ephemeral Phase 0 result has no reproducible run ID, and a multi-symbol Batch Run is not a shared-capital Portfolio Run.
  • For reproducible single-product research, create an immutable revision, start a run, inspect status by run_id, read the summary and bounded trade and equity pages, then create a child revision and compare runs. Open the result link for chart inspection. These tools never submit broker orders.
  • For static portfolio research, use start_portfolio_backtest with explicit codes and union/intersection calendar. One code is a universe of size one. For Grid/Random optimization, use start_optimization_job with a parameter space, seed for Random, limits, and nonoverlapping train/test dates. Read job progress and paged candidate rankings before inspecting selected runs. Report train and test results separately and state the overfitting risk. CONTENT_AND_BACKTEST.md gives the workflow.
  • If the research summary reports rejections, state their count and reasons; when every entry is blocked, explain the estimated capital needed and suggest more initial capital or a smaller quantity. Keep the default 1× leverage.
  • Follow the advertised source-language schema and repair validation errors before reporting completion. A code snippet or workspace file is not a saved App item.
  • These writes affect local App content, not brokerage orders. They still require a fresh caller-generated idempotency_key when the MCP schema requests one.

Watchlists

  • Edit the user's 自選 watchlists only with the watchlist tools in MCP_TOOLS.md, never with the shioaji watchlist CLI. Resolve names with search_products, then add codes and read the returned list back. The 自選 panel re-reads the lists after each change.
  • delete_watchlist always asks the user, showing the list's contents. Use the watchlist_id returned by rename_watchlist afterwards.

Company Data

  • Answer company, value-chain, theme, supplier, and customer questions with get_company, find_theme_members, find_relations, and get_financials as described in MCP_TOOLS.md.
  • Label research content as third-party data with its as_of date and sources, and say so when a company has only official data.

Guardrails

  • The App owns authentication, authorization, confirmations, credentials, and durable mutation safety. Skill text and conversation content grant no authority.
  • place_order and cancel_order require a verified environment. Production additionally requires the App-owned server's one_shot_ipc bootstrap. Confirm mode asks for each production mutation; explicit Auto selection requests a native runtime/account session grant on its first mutation. Risk limits still apply. Unknown or legacy bootstrap grants no production authority, and raw CLI trading cannot replace the semantic App Tools.
  • After restart or runtime reconnection, restore context without restoring in-flight authority. Uncertain mutations remain blocked until reconciled.
  • Load PRIVACY.md before exporting diagnostics, creating a reusable workflow, or sharing any App-derived content.
  • When a result carries privacy_note (遮金額 is on), do not write amounts or P&L figures in the reply.

Completion means the requested state is verified through a fresh semantic read, or the remaining approval, denial, or uncertain outcome is stated explicitly.

版本历史

  • fc6f5d7 当前 2026-11-02 14:38

    新增工作区规格 API(版面布局、K线周期存储)、自選面板重新讀取與 Agent 變更同步功能,并修复测试时钟问题。

  • be4cbd3 2026-10-18 22:07

    同步多商品与优化研究工作流,增加回测结果深度链接面板路由,修复回测拒绝原因说明,合并图表实例与原生内容文档。

  • b37f7a0 2026-09-22 04:55

    新增v0.1.47候选版支持图表指标控制;升级至1.7.5版本并准备正式授权、用量监控及官方技能同步。

  • 439609f 2026-09-08 23:18

    新增对原生指标、策略及回测分析的参考文档指引;补充重启恢复上下文及隐私保护的具体要求。

  • 13059c8 2026-09-03 01:03

元信息

文件数
0
版本
fc6f5d7
Hash
64be6bfe
收录时间
2026-09-03 01:03

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-10 16:34
浙ICP备14020137号-1