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 ZICXR/A-Stock-Skills --skill astock-data-sourcegit clone --depth 1 https://github.com/ZICXR/A-Stock-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/zicxr/a-stock-skills/astock-data-source)<a href="https://agentmods.dev/skills/zicxr/a-stock-skills/astock-data-source"><img src="https://agentmods.dev/badge/skills/zicxr/a-stock-skills/astock-data-source/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/zicxr/a-stock-skills/astock-data-source"><img src="https://agentmods.dev/badge/skills/zicxr/a-stock-skills/astock-data-source.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.00104 | $0.01006 |
| Opus 5 | $0.00052 | $0.00503 |
| Sonnet 5 | $0.00021 | $0.00201 |
| Haiku 4.5 | $0.00010 | $0.00101 |
Grade A, and why
astock-data-source 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 12d 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.
What it actually says
A 股多源数据源管理 Skill (v2.0)
何时使用
- 用户需要获取股票数据
- 用户需要稳定的 API 封装
- 用户在住宅网络环境下使用
- 任何需要 A 股数据的 Skill
⚠️ 重要更新 (v2.0)
修复了住宅 IP 数据源被封问题:
| 优先级 | 数据源 | 实测可用 | 备注 |
|---|---|---|---|
| 1️⃣ | ifzq gtimg (腾讯) | ✅ 90%+ | 住宅 IP 首选 |
| 2️⃣ | 新浪 hq.sinajs.cn | ✅ 80%+ | 全市场列表也用这个 |
| 3️⃣ | 东财 push2.eastmoney | ❌ 30% | 经常被封, 仅作备用 |
| 4️⃣ | akshare | ✅ 85% | 聚合源, fallback |
自动 fallback 机制:
- 每个数据源连续失败 3 次自动跳过
- 支持多源切换, 不再硬抛"所有数据源失败"
- 修复了 Windows GBK 编码问题
- 修复了 akshare 内部代理问题
🏃 快速验证 (网络环境测试)
# 测试你的网络环境
python main.py healthcheck
# 输出示例:
# === 数据源健康检查 ===
# ✅ ifzq_gtimg
# ✅ sina_hq
# ❌ eastmoney_push2 (被风控, 已自动跳过)
# ✅ sina 全市场: 5028 只
提供能力
行情
get-realtime --code X- 单股实时 (多源)get-realtime-all- 全 A 股实时 (用新浪)get-kline --code X --days N- K 线 (用 ifzq)
指数
get-index-realtime- 主要指数get-index-kline --symbol X- 指数 K 线
其他
get-stock-info --code X- 股票信息get-news --code X- 个股新闻healthcheck- 数据源健康检查
使用方式
命令行 (新规范)
# ✅ 正确: 用 --code 命名参数
python main.py get-realtime --code 601991
python main.py get-kline --code 601991 --days 60
# ✅ 正确: --list 列出方法
python main.py --list
# ❌ 旧版 (已废弃): 位置参数
python main.py get-realtime 601991
Python API
from skills.01-infra.astock-data-source.main import (
get_realtime, get_realtime_all, get_kline
)
# 单股 (自动多源 fallback)
quote = get_realtime("601991")
# 全 A 股
all_stocks = get_realtime_all()
# K 线
df = get_kline("601991", days=60)
故障速查
| 现象 | 原因 | 解决 |
|---|---|---|
ProxyError: 7890 |
代理挡住外网 | 切到 ifzq/sina |
RemoteDisconnected |
东财被封 | 等待 3 次后自动切 |
UnicodeEncodeError (Win) |
GBK 编码 | 已自动修复 |
所有数据源失败 |
网络隔离 | 运行 healthcheck 检查 |
依赖
requests>=2.28.0
akshare>=1.12.0
pandas>=1.5.0
实测状态
- 2026-06-21: 住宅 IP 验证通过, ifzq + sina 稳定可用
- 2026-05-03: 旧版在住宅 IP 100% 失败 (已修复)
What ships with it
4 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.
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.
- 12d ago First seen · 116 lines · 104 tokens per session scan A 76b5b1d52f36
astock-data-source is a skill published in the GitHub repository ZICXR/A-Stock-Skills (25 stars, last pushed 2mo ago), licensed MIT. It adds 104 tokens to every session and 1,006 once invoked, about $0.0005 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
private-company-research
A research workflow for private companies, meaning businesses whose shares are not traded on a public stock exchange. It uses several research roles to investigate the company in depth.
bottleneck-hunter
A research workflow for finding supply-chain bottlenecks—parts of global production where shortages or limited capacity may create investment opportunities.
investment-research
A broad stock-research workflow combining ideas associated with Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu. It examines the business, its quality, its risks, and its value.
industry-research
An industry-research workflow that maps how an industry works from suppliers to customers, then examines individual companies within it. The value-investing analysis looks at business quality, risks, and price.
investment-checklist
A pre-purchase checklist for value investing, which means buying shares based on a company’s business quality and estimated worth. It is based on the investing approach associated with Warren Buffett.
management-deep-dive
A research workflow for evaluating a company’s managers and leaders. It treats buying shares as partly trusting the people who run the business.