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 agentmods add skills/xbfighting/tdx2db/tdx2db-querynpx skills add xbfighting/tdx2db --skill tdx2db-querygit clone --depth 1 https://github.com/xbfighting/tdx2dbWrote 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/xbfighting/tdx2db/tdx2db-query)<a href="https://agentmods.dev/skills/xbfighting/tdx2db/tdx2db-query"><img src="https://agentmods.dev/badge/skills/xbfighting/tdx2db/tdx2db-query.svg" alt="Measured on agentmods" 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.00055 | $0.01563 |
| Opus 5 | $0.00028 | $0.00781 |
| Sonnet 5 | $0.00011 | $0.00313 |
| Haiku 4.5 | $0.00006 | $0.00156 |
Grade A, and why
tdx2db-query 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 6d 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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tdx2db 数据库查询手册
数据库由 tdx2db sync 写入(PostgreSQL / MySQL / SQLite,连接配置见项目 .env)。查询前先读 AGENTS.md 的 schema 与陷阱清单;本 skill 提供可直接套用的操作模板。
第一步永远是确认数据状态
tdx2db status --json
关注三点:daily_data.latest 是否为预期交易日;rows/codes 是否符合常识(全市场约 4000+ 只);warnings 是否为空。任何分析在数据不新鲜/不完整时都是白做。
SQL 模板
单票日线(含缠论均线族)
SELECT date, open, high, low, close, volume, amount,
ma5, ma13, ma21, ma34, ma55, ma89, ma144, ma233
FROM daily_data
WHERE code = :code6 -- 6 位纯数字,如 '600036',不带 sh/sz 前缀!
AND date BETWEEN :start AND :end
ORDER BY date;
某日全市场截面(成熟股票)
SELECT code, close, ma5, ma13, ma21, ma34, ma55, ma89, ma144, ma233
FROM daily_data
WHERE date = :d AND ma233 IS NOT NULL; -- ma233 非空 ≈ 上市满一年,天然剔除次新股
最新可用交易日
SELECT MAX(date) FROM daily_data WHERE ma5 IS NOT NULL;
分钟线(表按周期选:minute5_data / minute15_data / minute30_data / minute60_data)
SELECT datetime, open, high, low, close, volume, amount
FROM minute30_data
WHERE code = :code6 AND datetime BETWEEN :start AND :end
ORDER BY datetime;
周线/月线:无独立表,取日线后 pandas resample('W')/resample('ME') 聚合(open=first, high=max, low=min, close=last, volume/amount=sum)。
板块成分 / 个股板块归属(block_type ∈ 行业/概念/指数/地区/风格/特殊)
-- 板块 → 成分(行业为 881 研究行业,一/二/三级各一行,按名或 block_code 定位)
SELECT code FROM block_stock_relation
WHERE block_type = '行业' AND block_name = '煤炭开采';
-- 全部二级行业(≈ 通达信导出 CSV 的行业口径,板块强弱迭代用这个)
SELECT DISTINCT block_name FROM block_stock_relation
WHERE block_type = '行业' AND block_level = 2;
-- 个股 → 全部板块归属
SELECT block_type, block_code, block_name FROM block_stock_relation WHERE code = :code6;
-- 板块成分 JOIN 行情(北交所成员在行情表无数据,JOIN 自然过滤)
SELECT d.code, d.close, d.ma233
FROM block_stock_relation b JOIN daily_data d ON d.code = b.code
WHERE b.block_type = '概念' AND b.block_name = '人形机器人' AND d.date = :d;
板块表为全量快照(随 sync 更新,无历史版本);板块名以 tdxzs.cfg 官方全名为准,跨口径对齐用 block_code。
换手率 / 次新股过滤(股本与上市日期在 stock_info,万股,快照口径)
-- 换手率(%):volume(手)/ltag(万股) 单位差恰好抵消;股本变动点前的历史值失真
SELECT d.date, d.volume / s.ltag AS turnover_pct
FROM daily_data d JOIN stock_info s ON RIGHT(s.code, 6) = d.code
WHERE d.code = :code6 ORDER BY d.date DESC LIMIT 20;
-- 剔除次新股(上市不足 500 天)
SELECT RIGHT(code, 6) FROM stock_info WHERE list_date < CURRENT_DATE - 500;
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.
- 6d ago First seen · 109 lines · 55 tokens per session scan A cf71bccd3686
tdx2db-query is a skill published in the GitHub repository xbfighting/tdx2db (149 stars, last pushed 14d ago), licensed MIT. It adds 55 tokens to every session and 1,563 once invoked, about $0.0003 per session on Opus 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
ee
Working pattern for enterprise-edition features in Grida — the commercial/hosted concerns (entitlement, BYOD, billing) on top of the OSS core. Anchor for the GRIDA-EE: grep marker, (ee) route group, -hosted package suffix, and namespaced grida schema. Use when adding or touching an EE-only feature, or deciding whether…
hithink-finance-data
用于 Agent 通过 hithink-finance CLI 管理本地 DuckDB:初始化、同步、状态、校验、迁移、修复、清理、删除、只读 SQL、导出;远端实时数据转对应业务 skill。.
ee-billing
Surface workflow for billing in Grida — Stripe (subscriptions) + Metronome (AI credit ledger). The stable contracts: gridabilling. is not REST-exposed (views/RPCs only), fnbillingapply are the single mutation points, webhook receivers are GRIDA-SEC-001, BYOK is the GRIDA-SEC-003 carve-out. Use when touching…
trading-manual-writer
为"全品种操盘手册"系列撰写单个章节/小节。面向投资小白和散户,每次写一小节。输入小节标题和参考信息,输出图文并茂(含SVG插图)的Markdown文件,保存到项目markdown/目录。触发条件:用户提到"写操盘手册"、"写一节"、"写章节"、"散户操盘"、"金融工具讲解"、"写投资小白教程"、"帮我写操盘手册的XX章节",或提供了一个金融品种/操盘主题名称并希望生成教学内容。即使用户只说"帮我写黄金操盘那一章"或"可转债怎么讲给小白听",也应使用本skill。.
multi-expert-analyzer
针对通用问题进行多领域专家联合分析, 综合稿产生前必经 fact-checker 与 red-team 两道独立校验。适用场景: 用户提出跨领域或不确定领域的复杂问题, 需要从多个专家角度分别搜证并相互校验后综合成文, 例如该不该买房、该不该跳槽、是否进入某个赛道等。触发关键词: 多角度分析、专家分析、综合分析、多视角、跨领域分析、从不同角度看、深度分析。问题只属于单一明确领域时, 优先使用该领域的专门 skill, 例如纯财务用 finance-core-analysis、纯技术用 software-architect。输出 (全部 markdown 保存到当前项目 markdown/ 目录): (1) 每位专家的中间分析稿…
retail-trading-manual-writer
Write and save Chinese beginner-friendly paid manual subsections for "全品种操盘手册", a retail-investor education/subscription product covering the full 17-chapter + appendix outline from digoal's 2026-05-28 article. Use when the user provides a subsection title or asks to continue/complete the manual for 投资小白/散户…