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 pseudo-longinus/quant-buddy-skills --skill quant-buddy-skillgit clone --depth 1 https://github.com/pseudo-longinus/quant-buddy-skillsWrote 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/pseudo-longinus/quant-buddy-skills/quant-buddy-skill)<a href="https://agentmods.dev/skills/pseudo-longinus/quant-buddy-skills/quant-buddy-skill"><img src="https://agentmods.dev/badge/skills/pseudo-longinus/quant-buddy-skills/quant-buddy-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/pseudo-longinus/quant-buddy-skills/quant-buddy-skill"><img src="https://agentmods.dev/badge/skills/pseudo-longinus/quant-buddy-skills/quant-buddy-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00397 | $0.19343 |
| Opus 5 | $0.00198 | $0.09671 |
| Sonnet 5 | $0.00079 | $0.03869 |
| Haiku 4.5 | $0.00040 | $0.01934 |
Grade C, and why
quant-buddy-skill scanned grade C with 2 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 2d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$TMPDIR" Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **许可例外(csv 解析)**:当 `fast_query` 返回 `mode:"csv"` + `csv_url`(数据点 > 500 的正常交付)时,调用 `python scripts/fetch_fastquery_csv.py "<csv_url>"` 下载并解析该 csv 属于**许可路径**——这是消费工具返回的 OSS 产物(平台无等价原生解析工具),不算"包装原生工具"。但仍禁止用裸 `curl` / 自写临时脚 How it starts
The opening of the file, as written. The whole thing — 670 lines — stays where its author put it; the contents beside it link to each section on GitHub.
观照量化投研
首屏优先:先读本文件前部的「平台工具参数速查」「硬规则」和「场景路由」。简单行情、窗口序列、最近报告期、固定区间收益、K 线图等高频任务命中 Fast Path 时,无需继续整本通读。
平台工具参数速查(高频踩坑,先看这一段)
下表是 LLM 最容易写错的三个 schema。任何调用前先核对,不要凭"看起来合理"猜参数名。
| 工具 | ✅ 正确参数 | ❌ 模型常见错误(已被 call.py 自动归一化或拦截,但仍应避免) |
|---|---|---|
confirmDataMulti |
{"data_desc": "市盈率 TTM,股息率"} — 逗号分隔字符串 |
{"queries": [...]} / {"query": "..."} / {"names": [...]} |
runMultiFormulaBatchStream 公式中引用 session 中间变量 |
必须用双引号包裹:排序値 = "A股股息率〔估値数据〕" * "条件合并" |
裸变量名相乘:"A股股息率…" * 条件合并 ← 平台直接报错 |
readData |
{"ids": ["69fe…<24位hex>"], "mode": "last_column_full"} — 必须是 runMultiFormulaBatchStream 返回的 data_id 字段(hex) |
传中文变量名 {"ids": ["Top10股息"]} / 用错参数名 {"index_title": "..."} / {"variable_names": [...]} / 传 expression_id 而非 data_id(两者相邻易混,传错会返回 "error": "IndexInfo {id}") |
口径转换(confirmDataMulti 查询词):用户写 PE(TTM) / 归母净利润 等英文或缩写时,查询词应使用中文规范名(如 市盈率 TTM / 归母净利润),而不是把用户原文照抄进 data_desc。详细规则见 workflows/global-rules.md#指标口径精确匹配。
硬规则(违反必失败)
-
工具名与 unknown-tool 红线(最高优先级):
- 公式执行唯一可调用工具名:
runMultiFormulaBatchStream。 - 禁止调用或重试旧名/错名:
runMultiFormulaBatch/runMultiFormula/run_multi_formula。 - 任何工具返回
未知工具/Unknown tool/tool not found后,同名工具 0 次重试,也不得尝试名称变体。 - 若 workflow 已声明唯一正确原生工具,只允许切换到该工具 1 次;仍失败则立即输出受控失败答复。
- 若上一步结果已足够回答用户问题,必须直接收敛回答,禁止继续升级工具链。
- 公式执行唯一可调用工具名:
-
认证后验与 session 初始化:
- 不要在普通查数题第一步读取
config.json,也不要检查.session.json、output/.session*.json或任何本地 session 文件。 - 只要本轮准备调用平台原生工具,先直接调用原生
newSession;不得用 Bash / Glob / Read / ls 做 session 存在性探测。 - quant-buddy-view 上游继承例外:若当前任务由 quant-buddy-view 编排,且上游已经通过
trace_context.py begin创建 task_id,不得再生成第二个 task_id。优先由 QBV 的scripts/qbs_bridge.py调用本技能;bridge 会传{"task_mode":"inherit","task_id":"<上游 task_id>","task_source":"quant-buddy-view","user_query":"<用户原始问题>"}并用QBS_SESSION_KEY=<task_id>隔离并发 session。此例外只用于跨 Skill 会话绑定。 - 继承 task_id 时必须使用显式
task_mode=inherit,不要通过qbv_等字符串前缀猜测来源。继承 session 会锁定 task_id;后续参数若传入不同值,必须按TASK_ID_CONTEXT_MISMATCH停止,不能静默拆链。 - quant-buddy-skill 独立使用时保持原行为:不传
task_mode/task_id,由newSession自动生成新的 UUID 并上报 session begin。 - 工具实际返回
api_key 为空/code: 1/ 401/402 时才进入认证引导并停止当前查数任务。 - 同一对话追问可复用当前 session;新问题必须新建 session。
- 所有业务 HTTP/SSE 请求统一携带
x-skill-name: quant-buddy-skill与当前x-task-id,用于跨 Skill Trace 聚合;quant-buddy-view 上游任务不得切换 task_id。
- 不要在普通查数题第一步读取
-
原生工具优先,禁止脚本包装:
- 平台已有原生工具时,必须直接调用原生工具:
fast_query、fast_query_minute、confirmDataMulti、selectByComposition、runMultiFormulaBatchStream、resumeJob、readData、renderKLine、renderChart等。 - 禁止用 Bash / shell / Python /
scripts/call.py/run_skill_script包装已有原生平台工具。唯一编排例外是 quant-buddy-view 的qbs_bridge.py,它只负责继承 task_id 和隔离 session,不改写业务参数或结果。 - 只有平台明确不存在等价原生工具,且 workflow 明确允许脚本兜底时,才可使用本地脚本。
- 许可例外(csv 解析):当
fast_query返回mode:"csv"+csv_url(数据点 > 500 的正常交付)时,调用python scripts/fetch_fastquery_csv.py "<csv_url>"下载并解析该 csv 属于许可路径——这是消费工具返回的 OSS 产物(平台无等价原生解析工具),不算"包装原生工具"。但仍禁止用裸curl/ 自写临时脚本替代该脚本。 - 涉及资产时仍需先用
grep presets/assets_db/{类型}.yaml搜索本地资产库,禁止整文件读取;命中多条先澄清,未命中再交给服务端兜底解析。 - 英文代码无市场后缀时必须先 grep 对应资产库确认 ticker 格式。
- 平台已有原生工具时,必须直接调用原生工具:
-
工具失败熔断:同类错误不得重复
- 同一工具、同一参数结构、同一错误类型出现第 1 次后,只能按 workflow 声明的备用路径切换;无备用路径则受控失败。
- 禁止无新信息地重复调用失败工具;禁止尝试名称变体;禁止读更多文档代替执行;禁止用 shell/Python 包装绕过失败工具。
runMultiFormulaBatchStream/resumeJob只有最终completed且全部结果成功时才返回validation_receipt_file;failed、部分失败、deferred均不生成收据。QBV 编排必须以该收据作为进度完成证据。长结果可传output_mode:"summary":completed 保留data_id/expression_id/status;deferred 额外完整保留status/task_id/trace_id/job_id/stream_url/_deferred。deferred 缺task_id/trace_id时返回DEFERRED_CONTINUATION_MISSING,禁止重提原批次。
-
任何 workflow 失败退出时必须输出受控失败答复:禁止以空白或纯过程日志结束对话。失败答复必须包含:
- ①用户的原始问题(一句话复述)
- ②失败卡在哪一步(工具名 + 错误摘要)
- ③给用户的一句话说明("当前无法获取…,原因:…")
- 可选④:用户可采取的下一步(如"稍后重试"或"换用完整链路")
-
先读 workflow 再操作:按下方「场景路由」表加载对应 workflow,不要自行猜测参数格式。
-
配置/认证错误立即停止,不得在普通查数流程中转为认证收集:
- 工具返回 API Key 缺失错误(含
api_key 为空消息 /code: 1):立即停止查数,输出新用户引导消息(格式见「前置条件」章节模板),禁止继续执行查数;等待用户粘贴 Key 后再执行配置向导。 - 其他工具报错(网络、服务端错误等):直接报告"内部工具异常",不做认证相关引导。
- 工具返回 API Key 缺失错误(含
-
最终答案首句必须是数据结论:回答用户时,第一句话必须直接给出数据结论(如资产名+数值、表格、或"符合条件的共N只"),绝对禁止以"已成功获取""数据已获取""根据返回结果""让我来"等过程性陈述开头。违反此规则 = 必须删除过程话术后重新输出。
- 禁止原样粘贴工具 JSON:工具返回
code:0/success:true后,最终答复必须把data.results等业务字段转写成人类可读结论(一句话、短表格或名单)。除非用户明确要求"给我原始 JSON / 调试输出",否则不得把完整工具响应原样发给用户。 - 隐藏运行态字段:最终答案默认忽略
code、success、task_id、_quota、skill_latest_version、skill_update_available、skill_update_enforced、skill_self_update、auto_upgrade*、version_check等运行态/升级字段;这些字段只供 Agent 判断流程,不是给普通用户看的答案内容。 - 版本心跳不打断业务回答:若业务
data已成功返回,即使响应体带版本心跳,也必须先回答用户问题;只有工具明确返回业务失败或SKILL_VERSION_MISMATCH时才进入自愈/排错流程。
- 禁止原样粘贴工具 JSON:工具返回
-
用户条件冻结,不得改写:执行前必须逐字核对用户原始条件,以下改写行为均属违规(一旦发现必须回退并重新确认):
- 百分比↔小数互转(如"股息率>3%"禁止改写为
>0.03) - 相对时间改为年份区间(如"过去10年"禁止改写为"2015-2025")
- 资产宇宙替换(如"普通股票"禁止改写为"万得全A成分股"或"非ST股")
- 事件口径扩大(如"年报/半年报"禁止扩大为全部业绩披露类型)
- 卡片附加条件继承:命中知识卡片后,若卡片含用户未明确提出的"首次/非ST/封板/流动性门槛"等附加条件,必须先删除再执行,禁止默默继承进最终答案
- 百分比↔小数互转(如"股息率>3%"禁止改写为
-
任务含糊时先反问,禁止猜测开干:若用户的指令有 2 种以上合理解读(如"批量确认X"不清楚是确认指数本身还是全部成分股、"分析一下Y"不清楚要哪个维度),第一步必须向用户提问澄清,不得凭推测选择一种解读自行执行。反问应简洁列出各种可能(例:"您的意思是 ① … 还是 ② …?"),等用户确认后再继续。唯一例外:用户语义明确无歧义(如"给我贵州茅台今日收盘价"),无需反问。
What ships with it
60 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.
- CHANGELOG.md 111 KB
- config.json 145 B
- presets/assets_db/future.yaml 12 KB
- presets/assets_db/index.yaml 32 KB
- presets/assets_db/stock_a.yaml 244 KB
- presets/assets_db/stock_hk.yaml 129 KB
- presets/assets_db/stock_us.yaml 40 KB
- presets/cases_index.yaml 26 KB
- presets/data_catalog.yaml 16 KB
- presets/dimensions.yaml 165 KB
- presets/functions.yaml 14 KB
- presets/index_info_catalog/fmp_fa.yaml 134 KB
- presets/index_info_catalog/fmp.yaml 524 B
- presets/index_info_catalog/guanzhao_lhb.yaml 6.6 KB
- presets/index_info_catalog/guanzhao.yaml 14 KB
- presets/index_info_catalog/join_quant_fa.yaml 113 KB
- presets/index_info_catalog/manifest.yaml 1.5 KB
- presets/index_info_catalog/README.md 2.0 KB
- presets/index_info_catalog/rice_quant_fa.yaml 635 B
- presets/sectors.yaml 41 KB
- presets/themes.yaml 17 KB
- recipes/download-data.md 2.8 KB
- recipes/event-study-formulas.md 7.0 KB
- recipes/formula-package.md 5.7 KB
- recipes/ic-factor-templates.md 3.1 KB
- recipes/industry-aggregation.md 11 KB
- recipes/ma-crossover-backtest.md 3.8 KB
- recipes/render-chart.md 5.3 KB
- recipes/tool-call-checklist.md 5.2 KB
- recipes/topn-gainers.md 1.7 KB
- recipes/upload-custom-data.md 3.1 KB
- recipes/value-pe-strategy.md 3.4 KB
- references/environment.md 2.2 KB
- references/ru-billing.md 1.7 KB
- references/scripts-audit.md 4.8 KB
- references/troubleshooting.md 12 KB
- scripts/call.py 96 KB runs code
- scripts/companion_manager.py 29 KB runs code
- scripts/event_study_local.py 9.3 KB runs code
- scripts/executor.py 60 KB runs code
- scripts/fetch_fastquery_csv.py 13 KB runs code
- scripts/formula_package.py 19 KB runs code
- scripts/live_page_routing.py 61 KB runs code
- scripts/qbv_computation_capsule.py 37 KB runs code
- scripts/quant_api.py 48 KB runs code
- scripts/self_update.py 23 KB runs code
- scripts/task_context.py 13 KB runs code
- scripts/validation_receipt.py 17 KB runs code
- tools/confirm_data_multi.md 4.0 KB
- tools/dimension_indicators.md 14 KB
- tools/download_data.md 2.7 KB
- tools/fast_query_minute.md 3.1 KB
- tools/fast_query.md 13 KB
- tools/formula_package.md 7.3 KB
- tools/get_card_formulas.md 3.1 KB
- tools/read_data.md 7.6 KB
- tools/refresh_snapshot_time.md 1.5 KB
- tools/render_chart.md 7.3 KB
- tools/render_kline.md 5.7 KB
- tools/resume_job.md 3.4 KB
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.
- 2d ago Changed 95e4c591c6d7
- 5d ago Changed ef385e4ed468
- 6d ago Changed · +1 lines · +4 tokens per session 20d6c72a0e1e
- 10d ago First seen · 669 lines · 393 tokens per session scan C 15d373bc9b98
quant-buddy-skill is a skill published in the GitHub repository pseudo-longinus/quant-buddy-skills (111 stars, last pushed 3d ago), licensed MIT. It adds 397 tokens to every session and 19,343 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
stock-trading-analyst
Use when the user needs an A-share stock watchlist, short-term theme rotation review, or trading-plan risk audit based on user-provided market data. Produces evidence-based sector analysis, signal confidence, risk warnings, and a non-advisory action checklist for retail investors, research assistants, and trading…
alpha-evaluate
A multi-step workflow for testing an investment factor, meaning a measurable stock signal, against market data. It examines predictive relationship, grouped returns, risk-adjusted results, consistency, and robustness.
alpha-backtest
A strategy backtesting workflow that tests factor-based stock portfolios on historical data. Backtesting means simulating how a strategy would have performed in the past.
alpha-mine
An automated process for proposing and testing stock-market formulas, called factors, that combine price or trading data with mathematical operations. It screens the candidates using measures such as IC, which compares a factor with later returns.
alpha-autopilot
An automated research loop for investment factors, which are measurable signals used to select or compare stocks. It finds candidates, tests them, records successful ones, monitors active factors, and retires those that weaken.
alpha-signal
A daily trading-signal generator that reads active investment factors, scores current market data, and produces a target portfolio. Factors are measurable rules used to rank investments.