stock-buddy

stock-buddy is a skill for Claude Code, Codex from Taosheng777/a-share-mainline-os. It costs 256 tokens per session (4,701 once invoked), scanned A, original, MIT.

A two-level assistant for analysing Chinese stocks, sectors, and investment themes. It can provide a normal analysis or, after confirmation, a deeper financial review that may consider holdings and risk-budget position suggestions.

In plain words
What is it for?
Use it to assess whether an investment theme is still valid, review a stock or sector, inspect holdings, identify signals, screen risks, or discuss possible price targets and position sizes.
Why use it?
It separates market analysis from daily portfolio review and keeps trading execution with the user. It also requires configured data and marks information as unavailable instead of inventing figures.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Codex.

Part of the a-share-mainline-os plugin — 3 skills shipped together

Good fit Use it to assess whether an investment theme is still valid, review a stock or sector, inspect holdings, identify signals, screen risks, or discuss possible price targets and position sizes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/taosheng777/a-share-mainline-os/stock-buddy
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 Taosheng777/a-share-mainline-os --skill stock-buddy
Clone the repo
git clone --depth 1 https://github.com/Taosheng777/a-share-mainline-os

Made for: Claude Code, Codex.

Or install a-share-mainline-os, the plugin that ships this one along with the rest of its 3 skills.

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-buddy

README.md
[![agentmods](https://agentmods.dev/badge/skills/taosheng777/a-share-mainline-os/stock-buddy/github.svg)](https://agentmods.dev/skills/taosheng777/a-share-mainline-os/stock-buddy)
Your own site
<a href="https://agentmods.dev/skills/taosheng777/a-share-mainline-os/stock-buddy"><img src="https://agentmods.dev/badge/skills/taosheng777/a-share-mainline-os/stock-buddy/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-buddy

Your own site · 80×15
<a href="https://agentmods.dev/skills/taosheng777/a-share-mainline-os/stock-buddy"><img src="https://agentmods.dev/badge/skills/taosheng777/a-share-mainline-os/stock-buddy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 256 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,701 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.00256 $0.04701
Opus 5 $0.00128 $0.02351
Sonnet 5 $0.00051 $0.00940
Haiku 4.5 $0.00026 $0.00470

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

Security

Grade A, and why

stock-buddy 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 2 executable files (scripts/danger_scan.py, tests/test_danger_scan.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.

> **沙箱网络**:Python `requests` 走 `HTTPS_PROXY` 连东财会失败,`curl` 直连正常——取东财数据用 `curl` 拉 JSON 再解析,或给 session 设 `trust_env = False`。
plugins/a-share-mainline-os-claude/skills/stock-buddy/SKILL.md · 108 lines

How it starts

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

Stock Buddy 双档金融分析师

本 SKILL.md 即运行时唯一执行依据;产品设计与决策合同见仓库 docs/。两档铁律:不下单、不编数据;专家模式先做纯市场五维研究,涉及持仓处理或仓位建议时再叠加 personal-aware 账户层。

v3 定位:系统的核心对象是主线,不是账户。本 skill 是主线的分析层——论证提名、体检主线、复核退潮、为载体定条件位。日更由 stock-daily(复盘)负责,绩效永久交给同花顺。

三层合同:纪律层只读 01-纪律卡.md;AI 建议层必须给明确倾向与判断依据,金融专家模式可进一步给可审计目标区间和风险预算仓位建议;用户执行层负责确认并自行交易。不下单不等于不建议,不得再用“决定由你”代替 AI 判断。完整规则见 references/decision-support.md

运行时配置(先做,fail closed)

  1. 读取环境变量 ASM_CONFIG 指向的 JSON;未设置时读取 ~/.config/a-share-mainline/config.json。文件不存在、JSON 非对象或 personal-aware 路由缺 vault_root 时,停止并给出配置指引,不猜路径。
  2. vault_root 是纪律卡、持仓卡、主线页和盘面日志的唯一根;所有相对路径从它派生。
  3. wencai_cli 可覆盖问财 CLI;未配置时按当前 skills 根目录下的同级 hithink-market-query/scripts/cli.py 自动发现。找不到就按三源规则降级。
  4. ifind_evidence_helper 是可选适配器;未配置时跳过独立覆盖体检,不影响主流程。
  5. commit 前缀从 git_identity 读取:优先取当前平台 adapter 键(claude / codex),其次 default,均无则用中性 [ai]。下文以 <git_identity> 表示解析结果。

第 0 步:判意图并路由

  1. 在投资笔记 vault 中,「复盘 / 今日复盘 / 看下今天」等日更表达 → stock-daily,本 skill 不接。复盘只有一档、自包含,不再把常规档当作它的分析层。用户要在复盘之外深挖某条主线或某只标的时,才进本 skill。
  2. 主线相关 → 常规档,读 references/mainline-workflow.md + references/discipline.md
    • 「这条主线靠谱吗 / 值不值得跟 / 帮我论证一下 XX」→ 提名答辩(A 段)
    • 「XX 主线还活着吗 / 怎么样了」→ 主线体检(B 段)
    • 「XX 是不是退潮了 / 死亡条件触发了吗」→ 退潮复核(C 段),联动纪律①,误判代价高
  3. 涉及"我的持仓/账户" → 常规档(personal-aware),读 references/regular-tier.md + references/discipline.md。机动仓必须带所属主线阶段与距止损位百分比。
  4. 某标的/板块的盘面速查、企稳与否、状态、是否有机会 → 常规档,读 references/regular-tier.md
  5. 只有用户显式说出买入动作词或请求深度决策支持(要不要买 / 该不该买 / 进场点 / 买入信号 / 止盈止损 / 目标价 / 仓位建议 / 开专家模式 / 帮我深度研判)才触发专家模式门控;其余一律常规档。
    • 命中多条默认常规档:"分析我下一步怎么做 / 帮我看看 / 怎么样 / 企稳了吗 / 这条主线还活着吗" + 持仓 → 走常规档,不升级
    • 用户当轮明说"用/开启金融专家模式""开专家模式"或同等表达 → 该表述按本 skill 定义即等同于同意「5 个 sub-agent + 新闻/研报/行业接口」,不再二次确认;只用一句话短提示"将按 5-agent 蜂群运行,较慢较贵",然后直接进专家模式。措辞只是"盘中看看/帮我分析/怎么样"不算授权。
    • 只说了买入动作词或请求目标价 / 仓位建议,但没点名专家模式用 AskUserQuestion 工具问"要开启金融专家模式吗?(会并发 5 个 agent + 接新闻/研报/行业数据,更慢更贵)",然后立即结束本轮,等用户真实选择;用户在新一轮明确选"开启"才进。
    • 绝不允许在同一轮里自己写"用户确认/用户已同意"替用户作答;没有用户的真实点名或真实回复 = 留在常规档。
    • 进专家模式前读 references/expert-mode.md
    • 蜂群铁律:专家模式必须收齐 5 份独立 sub-agent 结果(Agent 工具派发,槽位不足分批,不得合并维度);派发失败先重试;未经用户同意不得静默降级为单代理,降级细则见 references/expert-mode.md
  6. 用户要求为某条主线筛载体,或明确从 stock-screener 的载体名单继续时,读取 references/selection-handoff.md,按 personal-aware 路由执行账户适配、相关度校验、强弱排序与参考条件位,写回主线页。只有所在项目规则明确把该触发语视为金融专家模式当轮授权时,才免去重复确认;其他环境仍按第 5 条门控询问。
  7. 任何档先执行:source ~/.zshrc(载 API Key)。

Read the full file on GitHub · 108 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 · 108 lines · 256 tokens per session scan A b54045c90a81

Subscribe to this mod's changes

stock-buddy is a skill published in the GitHub repository Taosheng777/a-share-mainline-os (2 stars, last pushed 25d ago), licensed MIT. It adds 256 tokens to every session and 4,701 once invoked, about $0.0013 per session on Opus 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-08-31.

Related

Other skills, from other repositories

tushare

A Python interface to Tushare, a financial-data service providing market, company, fund, futures, and other finance-related data. It shows how to authenticate and query the service into pandas tables.

skloxo/TideTrading · 79 tokens

credit-analysis

A framework for analysing bonds and other fixed-income investments, including issuer credit quality, interest-rate sensitivity, credit spreads, and default risk. A credit rating estimates how likely an issuer or specific bond is to repay its debt.

skloxo/TideTrading · 36 tokens

vibe-trading

Professional finance research toolkit — backtesting (7 engines + benchmark comparison panel), factor analysis, Alpha Zoo (452 pre-built alphas across qlib158/alpha101/gtja191/academic), options pricing, 79 finance skills, 29 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest →…

skloxo/TideTrading · 139 tokens

quant-statistics

Quantitative statistical methods: ADF unit-root / cointegration tests, GARCH volatility modeling, regression diagnostics (heteroskedasticity / autocorrelation), Bootstrap, and hypothesis testing.

skloxo/TideTrading · 41 tokens

risk-analysis

Risk measurement and stress testing — VaR/CVaR/max drawdown calculation, Monte Carlo simulation, extreme-value tail-risk analysis, and historical scenario stress testing.

skloxo/TideTrading · 35 tokens

strategy-generate

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

skloxo/TideTrading · 21 tokens