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-utilsgit 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-utils)<a href="https://agentmods.dev/skills/zicxr/a-stock-skills/astock-utils"><img src="https://agentmods.dev/badge/skills/zicxr/a-stock-skills/astock-utils/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-utils"><img src="https://agentmods.dev/badge/skills/zicxr/a-stock-skills/astock-utils.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.00091 | $0.00614 |
| Opus 5 | $0.00046 | $0.00307 |
| Sonnet 5 | $0.00018 | $0.00123 |
| Haiku 4.5 | $0.00009 | $0.00061 |
Grade A, and why
astock-utils 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.
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
何时使用
- 处理股票代码格式转换
- 判断股票所属市场
- 计算技术指标
- 格式化输出
- 解析交易日
提供能力
代码处理
normalize_code(code)- 规范化代码 (统一 6 位)get_market(code)- 判断市场 (sh/sz/bj)is_cyb(code)- 是否创业板is_kcb(code)- 是否科创板is_bj(code)- 是否北交所is_st(name)- 是否 ST 股
日期工具
today_str()- 今天parse_date(s)- 解析日期last_n_trade_days(n)- 最近 N 个交易日date_str(dt)- 日期转字符串
技术指标 (输入: DataFrame, 输出: 增加列后的 DataFrame)
add_ma(df, [5,10,20,60])- 均线add_macd(df)- MACDadd_kdj(df)- KDJadd_rsi(df)- RSIadd_boll(df)- 布林带add_all_indicators(df)- 一次性添加所有
格式化
fmt_volume(v)- 成交量 (1.23亿)fmt_money(v)- 金额fmt_pct(v)- 百分比
使用方式
# 命令行
python main.py normalize-code sh600000
python main.py market 300750
python main.py is-cyb 300750
python main.py trade-days 5
Python API
from skills.01-infra.astock-utils.main import (
normalize_code, get_market, add_all_indicators,
fmt_volume, fmt_pct
)
code = normalize_code("sh600000") # "600000"
market = get_market("300750") # "sz"
df_with_indicators = add_all_indicators(df)
print(fmt_volume(123456789)) # "1.23亿"
依赖
pandas>=1.5.0
numpy>=1.22.0
akshare>=1.12.0 # 交易日历
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.
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.
- 11d ago First seen · 76 lines · 91 tokens per session scan A df492bcdee97
astock-utils is a skill published in the GitHub repository ZICXR/A-Stock-Skills (25 stars, last pushed 2mo ago), licensed MIT. It adds 91 tokens to every session and 614 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.
earnings-review
A workflow for closely reading and interpreting a company's financial reports using original source material.
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.