stock-analysis

stock-analysis is a skill for Claude Code, Codex from guyulong/cn-agent-skills. It costs 23 tokens per session (690 once invoked), scanned A, original, MIT.

A guide for analysing Chinese mainland and Hong Kong shares using price charts and common indicators such as moving averages, MACD, RSI, KDJ, Bollinger Bands, and trading volume.

In plain words
What is it for?
Use it to create scripts and charts for technical analysis of A-share and Hong Kong stocks using sources such as AkShare or Tushare.
Why use it?
It gives a repeatable way to calculate and display these indicators instead of working from raw price history alone.

Skill for Claude CodeCodex

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

Good fit Use it to create scripts and charts for technical analysis of A-share and Hong Kong stocks using sources such as AkShare or Tushare.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guyulong/cn-agent-skills/stock-analysis
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 guyulong/cn-agent-skills --skill stock-analysis
Clone the repo
git clone --depth 1 https://github.com/guyulong/cn-agent-skills

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 stock-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/stock-analysis/github.svg)](https://agentmods.dev/skills/guyulong/cn-agent-skills/stock-analysis)
Your own site
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/stock-analysis"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/stock-analysis/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 stock-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/stock-analysis"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/stock-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 690 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.
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.00023 $0.00690
Opus 5 $0.00012 $0.00345
Sonnet 5 $0.00005 $0.00138
Haiku 4.5 $0.00002 $0.00069

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

Security

Grade A, and why

stock-analysis 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 9d 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.

skills/stock-analysis/SKILL.md · 88 lines

What it actually says

A股/港股技术分析

使用场景

生成股票技术分析脚本,支持常见技术指标计算和可视化。

支持的指标

  • K线图(蜡烛图)
  • MA(移动平均线):MA5, MA10, MA20, MA60
  • MACD(指数平滑异同移动平均线)
  • RSI(相对强弱指标)
  • KDJ(随机指标)
  • BOLL(布林带)
  • 成交量分析

数据源

A股

# 方式1:akshare(推荐,免费)
import akshare as ak
df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20240101")

# 方式2:tushare(需要token)
import tushare as ts
pro = ts.pro_api('your_token')
df = pro.daily(ts_code='000001.SZ', start_date='20240101')

港股

import akshare as ak
df = ak.stock_hk_hist(symbol="00700", period="daily", start_date="20240101")

分析模板

import akshare as ak
import pandas as pd
import matplotlib.pyplot as plt

# 设置中文显示
plt.rcParams['font.sans-serif'] = ['SimHei', 'Arial Unicode MS']
plt.rcParams['axes.unicode_minus'] = False

# 获取数据
symbol = "000001"  # 平安银行
df = ak.stock_zh_a_hist(symbol=symbol, period="daily", start_date="20240101")

# 计算MA
df['MA5'] = df['收盘'].rolling(5).mean()
df['MA10'] = df['收盘'].rolling(10).mean()
df['MA20'] = df['收盘'].rolling(20).mean()

# 计算MACD
exp1 = df['收盘'].ewm(span=12, adjust=False).mean()
exp2 = df['收盘'].ewm(span=26, adjust=False).mean()
df['MACD'] = exp1 - exp2
df['Signal'] = df['MACD'].ewm(span=9, adjust=False).mean()
df['Histogram'] = df['MACD'] - df['Signal']

# 绘图
fig, axes = plt.subplots(3, 1, figsize=(14, 10))
# ... 绘制K线、均线、MACD
plt.title(f'{symbol} 技术分析')
plt.show()

输出建议

  • 中文标签和注释
  • 标注买卖信号
  • 支持导出为图片
  • 可选输出分析报告

注意事项

  • 仅供学习研究,不构成投资建议
  • akshare 接口可能变动,需定期维护
  • 港股数据可能有延迟
  • 注意数据频率限制
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. 9d ago First seen · 88 lines · 23 tokens per session scan A ab2847b48935

Subscribe to this mod's changes

stock-analysis is a skill published in the GitHub repository guyulong/cn-agent-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 690 once invoked, about $0.0001 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-31.