qmt-bridge-kline-backfill

qmt-bridge-kline-backfill is a skill for Claude Code, Codex from atorber/qmt-trading-skill. It costs 78 tokens per session (1,079 once invoked), scanned A, original, MIT.

A QMT Bridge check for whether recent daily trading-value data is available for the Shanghai and Shenzhen markets. It normally uses current tick data and a local daily cache rather than downloading historical price bars.

In plain words
What is it for?
Use it to check the last few trading days, identify missing turnover records, and optionally try to fill historical gaps for the relevant indexes.
Why use it?
It catches missing market-volume data before a trading review, so conclusions are not based on incomplete recent records.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check the last few trading days, identify missing turnover records, and optionally try to fill historical gaps for the relevant indexes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill
Install

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.

Any agent
npx skills add atorber/qmt-trading-skill --skill qmt-bridge-kline-backfill
Clone the repo
git clone --depth 1 https://github.com/atorber/qmt-trading-skill

Made for: Claude Code, Codex.

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

agentmods badge for qmt-bridge-kline-backfill

README.md
[![agentmods](https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill/github.svg)](https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill)
Your own site
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill/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.

agentmods 80×15 button for qmt-bridge-kline-backfill

Your own site · 80×15
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-kline-backfill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01079
Opus 5 $0.00039 $0.00540
Sonnet 5 $0.00016 $0.00216
Haiku 4.5 $0.00008 $0.00108

Measured 11d ago against content hash 664d0e4b3cf3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

qmt-bridge-kline-backfill 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/backfill_recent_index_kline.py, scripts/index_turnover_recent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/qmt-bridge-kline-backfill/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

QMT Trading Skill · 近3日量能校验

实现状态:✅ index_turnover_recent.py · backfill_recent_index_kline.py
共享逻辑:_shared/market_turnover_util.py

目标

在执行复盘前,校验近 N 日(默认 3)两市成交额是否齐全:

  • 上证指数:000001.SH
  • 深市指数:399106.SZ(tick 缺 amount 时回退 399001.SZ

官方推荐 vs 本项目策略

迅投知识库(指数数据):

场景 官方 API 本项目复盘热路径
当日成交额 get_full_tickamount GET /api/market/full_tick
历史指数日 K download_history_data + get_market_data_ex ❌ 禁用(易 BSON 崩溃)
历史缺口 需本地已下载数据 reports/market_turnover_daily.json 每日 tick 累积

复盘/校验默认不调用 download_batchget_local_dataget_market_data_exget_market_data

可选 --try-history:先 download_batch 指数日线,再 get_market_data 子进程补历史并写入缓存(QMT 异常时慎用)。

推荐补齐近 3 日缺口(历史缺失时):

# 1. 下载指数日线(仅 3 只,勿全市场)
python -c "
from datetime import date, timedelta
import sys; sys.path.insert(0,'skills/_shared')
from common import load_env_files, make_client
import argparse
load_env_files()
c,_=make_client(argparse.Namespace(host='127.0.0.1',port=8080,api_key='test-auto',account_id=None),False)
e=date.today().strftime('%Y%m%d'); s=(date.today()-timedelta(days=12)).strftime('%Y%m%d')
print(c.download_batch(['000001.SH','399106.SZ','399001.SZ'], period='1d', start_time=s, end_time=e))
"

# 2. 读 amount 写入缓存并展示明细
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
  --host 127.0.0.1 --port 8080 --try-history

脚本

# 查看近3日上证+深证成交额明细(亿元)
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
  --host 127.0.0.1 --port 8080

# 查看近3日成交额明细;历史缺口加 --try-history
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
  --host 127.0.0.1 --port 8080

# 可选:尝试从本地 K 线补历史(慎用,优先用上一条)
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
  --try-history --host 127.0.0.1 --port 8080

# 兼容旧入口(同上逻辑)
python skills/qmt-bridge-kline-backfill/scripts/backfill_recent_index_kline.py --json

Read the full file on GitHub · 92 lines

Files

What ships with it

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

Changes

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.

  1. 11d ago First seen · 92 lines · 78 tokens per session scan A 664d0e4b3cf3

Subscribe to this mod's changes

qmt-bridge-kline-backfill is a skill published in the GitHub repository atorber/qmt-trading-skill (22 stars, last pushed 28d ago), licensed MIT. It adds 78 tokens to every session and 1,079 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens