im-dream: Skill for Claude Code

.claude/skills/investment-data/SKILL.md

investment-data is a skill for Claude Code from glide-the/im-dream. It costs 62 tokens per session (1,336 once invoked), scanned A, original, MIT.

A data tool for downloading and querying Chinese A-share stock and index information, including prices, trading limits, volumes, and index weights. A-share stocks are shares traded on mainland Chinese exchanges.

In plain words
What is it for?
It is for downloading current datasets, looking up stock or index history, querying daily price-limit data, and exporting batches of results.
Why use it?
It provides historical market data in several formats and can combine multiple sources for updates and checks.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: built for openclaw.

This is glide-the/im-dream's own configuration. It tells Claude Code how to work on im-dream itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything im-dream configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/query_batch.py --stocks "000001.SZ,000002.SZ" --start 2024-01-01 --end 2024-12-31 --output csv.

Reuse

Borrowing it

Nothing to install: this file belongs to glide-the/im-dream. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/glide-the/im-dream/develop/.claude/skills/investment-data/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/glide-the/im-dream

Made for: Claude Code.

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 investment-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/glide-the/im-dream/investment-data/github.svg)](https://agentmods.dev/skills/glide-the/im-dream/investment-data)
Your own site
<a href="https://agentmods.dev/skills/glide-the/im-dream/investment-data"><img src="https://agentmods.dev/badge/skills/glide-the/im-dream/investment-data/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 investment-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/glide-the/im-dream/investment-data"><img src="https://agentmods.dev/badge/skills/glide-the/im-dream/investment-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00062 $0.01336
Opus 5.5 $0.00025 $0.00534
Sonnet 5.5 $0.00012 $0.00267
Haiku 4.5 $0.00006 $0.00134

Measured 12d ago against content hash bc43d8626aee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

investment-data scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/data_client.py, scripts/download_data.py, scripts/query.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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"requires": { "bins": ["python3", "wget", "tar"] },
.claude/skills/investment-data/SKILL.md · 205 lines

How it starts

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

A 股投资数据获取 Skill

基于 investment_data 项目,提供高质量 A 股投资数据。

🎯 核心功能

  1. 数据下载 - 自动下载最新数据集
  2. 数据查询 - 查询股票历史数据
  3. 数据更新 - 每日自动更新
  4. 多格式支持 - Qlib、CSV、JSON

📊 数据类型

  • 日终价格 - 开高低收、成交量、成交额
  • 涨跌停数据 - 涨跌停价格、涨跌停状态
  • 指数数据 - 主要指数价格和权重
  • 复权数据 - 前复权、后复权价格

🚀 快速开始

1. 下载最新数据

python scripts/download_data.py --latest

2. 查询股票数据

from scripts.data_client import InvestmentData

# 初始化客户端
client = InvestmentData()

# 查询单只股票
df = client.get_stock_data("000001.SZ", start_date="2024-01-01", end_date="2024-12-31")

# 查询指数成分
weights = client.get_index_weights("000300.SH")

# 查询涨跌停
limits = client.get_limit_data("000001.SZ", date="2024-12-01")

3. 批量查询

python scripts/query_batch.py --stocks "000001.SZ,000002.SZ" --start 2024-01-01 --end 2024-12-31 --output csv

📖 详细文档

🔧 配置

环境变量

# 数据存储路径(可选)
export INVESTMENT_DATA_DIR=~/.qlib/qlib_data/cn_data

# Tushare Token(可选,用于实时更新)
export TUSHARE_TOKEN=your_token_here

配置文件

编辑 config/config.yaml:

data:
  # 数据存储路径
  data_dir: ~/.qlib/qlib_data/cn_data

  # 自动更新
  auto_update: true
  update_time: "09:00"

  # 数据源优先级
  sources:
    - final
    - ts
    - ak
    - yahoo

query:
  # 默认输出格式
  output_format: csv

  # 日期格式
  date_format: "%Y-%m-%d"

📝 使用示例

Python API

from scripts.data_client import InvestmentData

client = InvestmentData()

# 查询股票日 K 线
df = client.get_stock_daily("000001.SZ", "2024-01-01", "2024-12-31")
print(df.head())

# 查询指数数据
index_df = client.get_index_daily("000300.SH", "2024-01-01", "2024-12-31")

# 查询股票列表
stocks = client.get_stock_list(date="2024-12-31")

# 查询退市股票
delisted = client.get_delisted_stocks()

命令行

# 查询单只股票
python scripts/query.py --stock 000001.SZ --start 2024-01-01 --end 2024-12-31

# 批量查询
python scripts/query_batch.py --file stocks.txt --start 2024-01-01 --output json

# 更新数据
python scripts/update_data.py --daily

# 导出数据
python scripts/export.py --stock 000001.SZ --format excel

Read the full file on GitHub · 205 lines

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. 12d ago First seen · 205 lines · 62 tokens per session scan A bc43d8626aee

Subscribe to this mod's changes

investment-data is a skill published in the GitHub repository glide-the/im-dream (0 stars, last pushed yesterday), licensed MIT. It adds 62 tokens to every session and 1,336 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

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

twitter-reader

Read Twitter/X for financial research through opencli: the user's home timeline, tweet search, trending topics, bookmarks, a user's recent tweets, threads, articles, profiles, followers and following, and notifications. Use this skill whenever the user wants to know what people are saying on Twitter/X or fintwit about…

himself65/finance-skills · 110 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

energy-procurement

Codified expertise for electricity and gas procurement, tariff optimization, demand charge management, renewable PPA evaluation, and multi-facility energy cost management. Informed by energy procurement managers with 15+ years experience at large commercial and industrial consumers. Includes market structure analysis…

hashgraph-online/awesome-codex-plugins · 93 tokens

china-portfolio-monitoring

A monitoring framework for tracking the financial results, operating measures, strategic milestones, and risks of companies held by China-focused private-equity funds. It uses measures such as revenue growth, margins, debt, cash flow, and return on equity.

jwangkun/claude-for-financial-services-cn · 86 tokens

airdrop-hunting-guide

Guide to finding and qualifying for crypto airdrops — eligibility criteria, farming strategies, on-chain activity requirements, Sybil detection avoidance, and tracking tools. Use when helping users understand airdrops, check eligibility, or plan participation strategies.

nirholas/three.ws · 54 tokens