Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add litaolemo/xtquant_big_convert --skill miniqmt_2_bigqmt-skillgit clone --depth 1 https://github.com/litaolemo/xtquant_big_convertWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill)<a href="https://agentmods.dev/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill"><img src="https://agentmods.dev/badge/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill"><img src="https://agentmods.dev/badge/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00144 | $0.03207 |
| Opus 5.5 | $0.00058 | $0.01283 |
| Sonnet 5.5 | $0.00029 | $0.00641 |
| Haiku 4.5 | $0.00014 | $0.00321 |
Grade A, and why
miniqmt-to-bigqmt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MiniQMT 策略 → 大QMT内置Python 转换
把外部 xtquant 策略(自带 Python 进程 + XtQuantTrader/xtdata)改写为在大QMT客户端内运行的内置策略(init/handlebar/run_time + passorder)。目标是"真正能实盘",不是语法翻译——两套体系的运行模型、账户绑定、下单返回值、数据时效都不同,必须按本流程逐项处理。
两套体系的本质差异(先建立心智模型)
| 维度 | miniQMT 外接 | 大QMT 内置 |
|---|---|---|
| 进程 | 自己的 Python 进程,pip 任装 | 客户端内嵌 Python 3.6,库受限(券商可能有白名单) |
| 编码 | UTF-8 | GBK(首行必须 #coding:gbk) |
| 入口 | if __name__ == '__main__' 自由编排 |
框架回调:init(C) → after_init(C) → handlebar(C)/定时器 |
| 线程 | 随意多线程/apscheduler | 所有策略共用一个线程,禁止阻塞(sleep/死循环/锁会卡死全部策略) |
| 账户 | 代码里 StockAccount(id, type),可多账户 |
界面选定,注入全局变量 account/accountType,一个策略实例绑一个账户 |
| 下单 | order_stock_async 返回 seq,回报回调对账 |
passorder 无返回值,靠 userOrderId(投资备注,对应 m_strRemark)追踪 |
| 查询 | query_stock_asset/orders/positions 返回无前缀字段对象 |
get_trade_detail_data 返回 m_ 前缀字段对象(m_nVolume 等) |
| 行情 | xtdata.*(连 miniQMT 行情进程) |
C.get_full_tick/C.get_market_data_ex 等(客户端行情) |
| 启停 | 自己守护、AutoLogin 重启 QMT | 随客户端启停;客户端设置里配自动登录/策略自启 |
转换工作流
复制此清单跟踪进度:
- [ ] 第1步 静态分析与可行性评估
- [ ] 第2步 选择目标结构模板
- [ ] 第3步 逐 API 映射改写
- [ ] 第4步 处理订单追踪与状态机
- [ ] 第5步 py3.6/GBK 合规校验
- [ ] 第6步 输出转换报告
- [ ] 第7步 部署与实盘验证指引
第1步 静态分析与可行性评估
用户若对内置端能力存疑(外部数据还能不能取、运行频率是否受限、能否回测、多策略会不会互相拖累等),先用 faq.md 对齐认知再开工——这些多为误解,不要让错误前提影响转换方案。
运行分析脚本,得到 API 清单、py3.6 语法违例、第三方依赖、阻塞模式等:
python scripts/analyze_strategy.py <原策略.py>
按报告对照 constraints.md 分类每个发现项:
- 可直接映射 → 第3步处理
- 需重构(apscheduler/多线程/while-sleep 主循环、回报回调对账等)→ 按模板重组
- 不可转换(多账户单进程、重型第三方库、7x24 外部守护等)→ 在转换报告中给出 constraints.md 对应的替代方案(文件桥/外接极简模式/拆分策略),不要硬转
任何一项"不可转换"都不代表整个策略失败——逐项给方案,能转的部分照常转。
第2步 选择目标结构模板
| 原策略形态 | 模板 |
|---|---|
| 定时轮询型:apscheduler / while+sleep / 定点任务(绝大多数 miniQMT 策略) | templates/template_timer.py |
行情驱动型:xtdata.subscribe_quote 回调驱动 / 单标的 K线信号 |
templates/template_bar.py |
模板已含:GBK 头、全局状态类 G(禁止把可变状态存 ContextInfo,有逐K线回滚机制)、C.set_account(account)(启用交易回调)、定时器注册、委托状态字典对账骨架、收盘自动停止逻辑。在模板骨架上填充策略逻辑,不要从零写。
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .gitignore 30 B
- api_mapping.md 14 KB
- constraints.md 11 KB
- examples.md 8.3 KB
- faq.md 5.6 KB
- LICENSE 1.0 KB
- QMT内置Python策略手册.md 170 KB
- README.md 3.9 KB
- scripts/analyze_strategy.py 14 KB runs code
- scripts/check_converted.py 9.0 KB runs code
- scripts/to_gbk.py 2.4 KB runs code
- templates/template_bar.py 2.8 KB runs code
- templates/template_timer.py 8.3 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 142 lines · 144 tokens per session scan A 9d95812d22d0
miniqmt-to-bigqmt is a skill published in the GitHub repository litaolemo/xtquant_big_convert (809 stars, last pushed 7d ago), licensed MIT. It adds 144 tokens to every session and 3,207 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
vnpy-export
Export a Vibe-Trading backtest strategy to a runnable vnpy CtaTemplate Python class — supports A-share equities, futures, and crypto via BarGenerator + ArrayManager.
yfinance
Skill "yfinance" from HKUDS/Vibe-Trading, covering yfinance, deep yahoo interfaces (references/), quick start, ticker format conversion and supported data types.
tqsdk-trading-and-data
Guidance for using TqSdk, a Python toolkit for market data, trading accounts, orders, positions, and backtesting futures or stocks.
tushare
A Python interface to Tushare, a financial-data service providing market, company, fund, futures, and other finance-related data. It shows how to authenticate and query the service into pandas tables.
yfinance
Skill "yfinance" from skloxo/TideTrading, covering yfinance, deep yahoo interfaces (references/), quick start, ticker format conversion and supported data types.
pinescript-to-python-translator
Translate TradingView PineScript strategies into vectorized Python strategies suitable for Optuna optimization and walk-forward analysis.