| name | a-shares-master |
| description | Analyze A-share trades with latest trusted online data. |
| version | 2.1.0 |
| author | tinylion1024 |
| license | MIT |
| platforms | ["linux","macos"] |
| homepage | https://github.com/tinylion1024/a-share-profit-helper |
| user-invocable | true |
| tags | ["finance","stocks","a-share","trading"] |
| category | research |
| metadata | {"openclaw":{"emoji":"📈","homepage":"https://github.com/tinylion1024/a-share-profit-helper","skillKey":"a-shares-master","os":["linux","macos"],"requires":{"bins":["python3"]},"envVars":[{"name":"A_SHARE_SKILL_OFFLINE_MODE","required":false,"description":"Force fixture mode only for tests or incident fallback."},{"name":"A_SHARE_SKILL_DATA_PATH","required":false,"description":"Path to fixture JSON with market and stock data."},{"name":"A_SHARE_SKILL_LIVE_SOURCE","required":false,"description":"Current trusted upstream, default is tencent."},{"name":"A_SHARE_SKILL_WATCHLIST","required":false,"description":"Comma-separated online watchlist for live stock picking."},{"name":"A_SHARE_SKILL_TIMEOUT_SECONDS","required":false,"description":"HTTP timeout for live upstream requests."},{"name":"IWENCAI_BASE_URL","required":false,"description":"Override iwencai API base URL for semantic search."},{"name":"IWENCAI_API_KEY","required":false,"description":"Enable live iwencai semantic and structured queries."}]},"hermes":{"category":"research","tags":["finance","stocks","a-share","trading"],"related_skills":["browser","spreadsheets"],"config":{"offline_mode":"A_SHARE_SKILL_OFFLINE_MODE","sample_data_path":"A_SHARE_SKILL_DATA_PATH","live_source":"A_SHARE_SKILL_LIVE_SOURCE","watchlist":"A_SHARE_SKILL_WATCHLIST","iwencai_api_key":"IWENCAI_API_KEY"}}} |
A-Shares Master Skill
This skill uses the latest trusted online A-share data by default, then converts it into 诊股 / 选股 / 风控 / 盘前盘后复盘 / 市场周期判断 / 方法论执行手册 / 新闻 / 公告 / 资金流 / 行业轮动 / 热点强势股 / 淘股吧热点 / 淘股吧舆情 / 淘股吧个股情绪 / 淘股吧大V观点 / 概念板块 / 研报 / 龙虎榜 / 融资融券 / 大宗交易 / 股东户数 / 分红 / 解禁 / 北向资金 / 个股信息 / 批量实时行情 / K线 / 五档盘口 / 逐笔成交 / 季报快照 / F10 公司资料 / 财报三表 / 一致预期 / 估值 / 批量对比 / 主题研报批量检索 / 快速调研 / iwencai 检索 output. Local fixtures remain available only for tests or controlled fallback.
The six flagship workflows are now market-cycle, leaders, diagnose, playbook, quick-research, and theme-research. They are the preferred external entrypoints. valuation, reports, fund-flow, taoguba-*, and the rest remain available as supporting tools behind those flagship workflows. self-check also reports dependency state, credential state, capability checks, flagship workflows, and health summary.
When To Use
- The user asks whether a stock can be bought, held, reduced, or avoided.
- The user wants a pre-market view, post-market review, or a two-scenario trading plan.
- The agent needs current A-share quotes, turnover, MA20, support, and resistance from live upstreams.
- The user wants stock news, CNInfo announcements, intraday fund flow, sector rotation, THS hot stocks, concept tags, Eastmoney research reports, dragon-tiger seats, margin data, block trades, holder changes, dividend history, northbound flow, stock basics, batch quotes, K-line bars, five-level order book, tick transactions, quarterly snapshots, F10 company text, financial statements, THS consensus EPS, valuation comparison, thematic report research, or iwencai semantic search.
- The user wants Taoguba forum hotspots, market sentiment, retail mood for a stock, or curated VIP viewpoints.
- The agent must use
terminal with a single, stable entrypoint that works in both OpenClaw and Hermes-style environments.
Prerequisites
- Run inside
{baseDir} or the repository root.
- Python 3.9+ is enough.
- Network access is required for default execution because the skill fetches online quotes and K-lines.
quarterly-snapshot and f10 use optional mootdx; install it with pip install .[mootdx].
- To force fixture mode for tests or incident fallback, set
A_SHARE_SKILL_OFFLINE_MODE=true.
How To Run
Prefer the unified entrypoint:
cd {baseDir}
pip install .
a-shares-skill self-check
a-shares-skill valuation --code 300750
python3 scripts/run_skill.py self-check
python3 scripts/run_skill.py flagship
python3 scripts/run_skill.py risk --code 300750
python3 scripts/run_skill.py diagnose --code 300750 --date 2026-05-28
python3 scripts/run_skill.py pick --filters basic,tech,catalyst
python3 scripts/run_skill.py market-cycle --date 2026-05-28
python3 scripts/run_skill.py leaders --date 2026-05-28
python3 scripts/run_skill.py pre-market --date 2026-05-28
python3 scripts/run_skill.py post-market --date 2026-05-28
python3 scripts/run_skill.py plan --code 300750 --date 2026-05-28
python3 scripts/run_skill.py playbook --code 300750 --date 2026-05-28
python3 scripts/run_skill.py review-trade --code 300750 --outcome win --return-pct 8.5 --holding-days 3 --theme 储能
python3 scripts/run_skill.py weekly-review --limit 10
python3 scripts/run_skill.py memory-feedback --limit 10
python3 scripts/run_skill.py news --code 300750 --page-size 3
python3 scripts/run_skill.py telegraph --page-size 5
python3 scripts/run_skill.py global-news --page-size 5
python3 scripts/run_skill.py announcements --code 300750 --page-size 3
python3 scripts/run_skill.py fund-flow --code 300750 --period minute
python3 scripts/run_skill.py sectors --top 5
python3 scripts/run_skill.py hot-stocks --page-size 5
python3 scripts/run_skill.py taoguba-hot --page-size 5
python3 scripts/run_skill.py taoguba-sentiment --page-size 10
python3 scripts/run_skill.py taoguba-stock --code 300750 --page-size 10
python3 scripts/run_skill.py taoguba-vip --code 300750 --page-size 5
python3 scripts/run_skill.py concept-blocks --code 300750
python3 scripts/run_skill.py reports --code 300750 --page-size 3
python3 scripts/run_skill.py dragon-tiger --code 002428 --date 2026-05-28
python3 scripts/run_skill.py daily-dragon-tiger --date 2026-05-28 --min-net-buy 5000
python3 scripts/run_skill.py margin --code 300750 --page-size 3
python3 scripts/run_skill.py block-trades --code 300750 --page-size 3
python3 scripts/run_skill.py holders --code 300750 --page-size 3
python3 scripts/run_skill.py dividends --code 300750 --page-size 3
python3 scripts/run_skill.py lockup --code 002428 --date 2026-05-28 --forward-days 90
python3 scripts/run_skill.py northbound --history-days 5
python3 scripts/run_skill.py stock-info --code 300750
python3 scripts/run_skill.py quotes --codes 300750,sh000300,510300 --kind auto
python3 scripts/run_skill.py valuation --code 300750
python3 scripts/run_skill.py compare --codes 300750,002594
python3 scripts/run_skill.py theme-research --queries "人形机器人产业链深度 2026,人形机器人减速器 丝杠" --channel report --size 5 --supplement-per-stock 2
python3 scripts/run_skill.py quick-research --code 300750 --date 2026-05-29
python3 scripts/run_skill.py kline --code 300750 --frequency 4 --limit 5
python3 scripts/run_skill.py order-book --code 300750
python3 scripts/run_skill.py transactions --code 300750 --start 0 --limit 5
python3 scripts/run_skill.py quarterly-snapshot --code 300750
python3 scripts/run_skill.py f10 --code 300750 --category 最新提示
python3 scripts/run_skill.py finance --code 300750 --report-type lrb --page-size 1
python3 scripts/run_skill.py consensus-eps --code 300750
python3 scripts/run_skill.py iwencai-search --query "人形机器人 行星滚柱丝杠 2026" --channel report --size 3
For machine-readable output:
python3 scripts/run_skill.py --format json risk --code 300750
Quick Reference
terminal
Run all commands in this skill through the terminal tool or a shell-capable agent step.
scripts/run_skill.py
Single agent-friendly entrypoint.
a-shares-skill
Installed console script for non-repo usage.
python3 -m src.main
Module entrypoint that mirrors the installed console script.
src/skill.py
Unified facade used by all scripts.
src/providers/offline.py
Fixture provider kept for tests and incident fallback only.
src/providers/live.py
Trusted live provider using Tencent finance plus Eastmoney, THS, mootdx, CNInfo, and CLS endpoints.
src/core/
Analysis, rating, risk, and workflow logic.
scripts/run_tests.sh
Runs pytest when available, otherwise falls back to unittest.
Natural Language Routing
- In OpenClaw, do not ask the user to type shell commands. The user should speak in natural language and the agent should run the matching command internally.
- Treat Chinese stock short names and six-digit stock codes as equivalent inputs for stock-specific workflows. If the user says
宁德时代能买吗, 比亚迪今天怎么看, or 查一下贵州茅台的 F10, pass the short name directly and let the skill resolve it to a stock code.
- If the user asks a broad question with no command words, route by intent rather than by literal keyword matching.
- If a request mixes market view plus single-stock execution, run the market workflow first, then the stock workflow, and summarize them together.
Examples:
今天市场情绪怎么样,适合进攻还是防守?
Run market-cycle.
今天主线和龙头是谁?
Run leaders.
宁德时代能买吗?给我买卖建议。
Run diagnose, and use playbook if the user also wants entry/add/reduce/exit rules.
帮我看一下比亚迪风险大不大。
Run risk.
淘股吧今天最热在聊什么?
Run taoguba-sentiment, and use taoguba-hot if the user wants the underlying posts.
宁德时代在淘股吧的情绪怎么样,有没有大V观点?
Run taoguba-stock, and use taoguba-vip if the user wants more VIP posts.
今天有哪些值得看的票?
Run pick, optionally followed by hot-stocks or sectors when the user asks for why they are strong.
查一下宁德时代最近公告、资金流和研报。
Run announcements, fund-flow, and reports.
机器人主题最近有什么研报和标的?
Run theme-research.
帮我快速研究一下寒武纪。
Run quick-research.
帮我复盘最近交易,看看我适合什么 setup。
Run weekly-review, then memory-feedback.
Procedure
Short/Mid-Term Selection Heuristic
When the user asks 谁更有机会 / 帮我选股 / 高盈亏比 / 舒服买点 for a holding period around 2 to 10 trading days, rank candidates with this priority:
- Theme strength and catalyst clarity first
Prefer names that belong to the current main line, or directly benefit from an active expansion theme.
- Trend continuity and overhead supply second
Prefer stocks already walking in a clean uptrend, or trend mid-caps that just completed a healthy pullback and regained support.
- Volume-price structure and comfort third
Prefer pullback support, breakout retest, or 缩量整理后的放量再启动. Avoid consensus 高潮日、连续大涨后的追高 and single-day weak-to-strong names with heavy overhead supply.
- Static valuation only after the first three pass
Lower PE/PEG alone must not outrank a stronger trend leader. Cheap laggards stay on the watchlist unless they also get a fresh catalyst and a visible trend repair.
Use these labels explicitly when helpful:
趋势票
Main-line trend, suitable for pullback or confirmation entries.
性价比票
Valuation is better, but timing depends on catalyst rotation or trend repair.
修复观察票
Logic exists, but structure is still weak; do not rank it ahead of cleaner leaders.
If the user asks for a comfortable buy point, default to:
- support retest near key moving averages or prior breakout zones
- confirmation after reclaiming an important intraday or daily level
- no recommendation to chase a consensus acceleration unless the user explicitly wants breakout momentum trades
- Run
python3 scripts/run_skill.py self-check before using live scenarios.
- Prefer the flagship workflows first:
market-cycle, leaders, diagnose, playbook, quick-research, theme-research.
- If the user asks for 风控 only, call
risk.
- If the user asks for 买/卖/持建议, call
diagnose.
- If the user asks for what to buy, call
pick.
- If the user asks for市场情绪阶段、仓位节奏 or 主攻/防守判断, call
market-cycle.
- If the user asks for主线、龙头 or 题材梯队, call
leaders.
- If the user needs single-stock entry/add/reduce/exit rules, call
playbook.
- If the user needs actionable prices and position sizing, call
plan.
- If the user asks for event flow, call
news, telegraph, global-news, or announcements.
- If the user asks for资金面 or 行业轮动, call
fund-flow or sectors.
- If the user asks for强势股归因 or 题材热点, call
hot-stocks.
- If the user asks for淘股吧热点、大V观点、市场舆情 or 个股股民情绪, call
taoguba-hot, taoguba-sentiment, taoguba-stock, or taoguba-vip.
- If the user asks for个股所属概念、概念标签 or 题材归属, call
concept-blocks.
- If the user asks for卖方观点 or 机构覆盖, call
reports.
- If the user asks for席位资金、连板观察 or 全市场龙虎榜, call
dragon-tiger or daily-dragon-tiger.
- If the user asks for两融、筹码集中、大宗成交、分红回报 or 解禁预警, call
margin, holders, block-trades, dividends, or lockup.
- If the user asks for指数、ETF or 批量实时行情, call
quotes.
- If the user asks for个股估值、PEG、PE消化 or 批量估值对比, call
valuation or compare.
- If the user asks for主题研报聚合、跨主题研报批量检索 or 主题补充研报, call
theme-research.
- If the user asks for新标的快速调研, call
quick-research.
- If the user asks for交易后复盘, call
review-trade.
- If the user asks for周期复盘总结, call
weekly-review.
- If the user asks for把复盘结果转成下一阶段建议, call
memory-feedback.
- If the user asks for个股K线、五档盘口 or 逐笔成交, call
kline, order-book, or transactions.
- If the user asks for北向资金、个股基本面、季报快照、F10资料、财务报表 or 一致预期, call
northbound, stock-info, quarterly-snapshot, f10, finance, or consensus-eps.
- If the user asks for跨主题语义检索 or 结构化问财查询, call
iwencai-search or iwencai-query.
- Use
--format json when another agent or tool will parse the output.
- If live data is unavailable, fail clearly unless the caller explicitly enabled offline fallback.
Pitfalls
- Do not assume fixture output is acceptable in production; latest online data is the default contract.
- Do not call the legacy scripts first; they are thin wrappers around
run_skill.py.
- Do not hide upstream failures by silently switching to fixture data.
- Do not edit
references/ to change behavior. The executable behavior lives in src/ and scripts/.
Verification
- Run
python3 scripts/run_skill.py self-check.
- Run
python3 -m src.main --format json self-check.
- Run
sh scripts/run_tests.sh.
- If
pytest is installed, the same tests should also pass via python3 -m pytest -q tests.