← Back to Skills Marketplace
michaelliugh

Stock Realtime Brief

by Michaelliugh · GitHub ↗ · v2.2.0 · MIT-0
cross-platform ✓ Security Clean
34
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install stock-realtime-brief
Description
A股实时分析与可执行操作建议生成器。支持三种模式:(1) 持仓简报模式 — 针对用户持仓出盘前/盘中风险简报,含融资风险体检与重要公告检测;(2) 单股深度模式 — 针对一只股票出技术面 + 操作位 + 三档止损方案;(3) 多股对比模式 — 针对多只股票(自选股/同板块/比价)做横向对比与综合评分。触发短语:盘...
README (SKILL.md)

A 股实时分析与操作建议(Stock Realtime Brief)

"规则比感觉重要——把可以提前算清楚的事,写在能照着执行的清单里。"

1. 三种使用模式

1.1 模式选择决策树

用户输入 →
  ├─ 提到"持仓 / 我的票 / 盘前简报"
  │   → 模式 P:持仓模式(读 portfolio + 7 步法 + 公告检测 + 融资体检)
  │
  ├─ 只提到 1 只股票("看下 X / 分析 X")
  │   → 模式 S:单股深度模式(技术面 + 操作位 + 三档止损)
  │
  ├─ 提到 2 只及以上("X 和 Y 谁好 / 这几只票")
  │   → 模式 M:多股对比模式(横向对比 + 综合评分排序)
  │
  └─ 不确定时 → 优先问一句确认,不要默认

1.2 三种模式的核心差异

维度 模式 P(持仓) 模式 S(单股) 模式 M(多股)
数据源 portfolio + 实时 + K线 + 公告 实时 + K线 + 个股资金流 实时 + K线(精简)
输出篇幅 长(含融资体检 + 公告告警) 中(含基本面+技术面) 短(对比表为主)
止损规则 完整三档(含重仓收紧 + 利润保护位) 标准三档 不强制止损
融资体检 ✅ 必做
公告检测 ✅ HIGH/MED 自动告警
特色 全面、防漏 深、详 横向、快

1.3 何时使用 / 何时不用

场景 触发
持仓盘前/盘中简报 ✅ P
"看下 600519 / 帮我分析 X" ✅ S
"X 和 Y 哪个好 / 这几只票排序" ✅ M
"今天买什么 / 推荐股票" ❌(这不是本 skill 职责,应转给"选股 skill")
"X 公司基本面怎么样" ⚠️ 单股模式可附带基本面,但不是核心
港美股 / 期货 / ETF

2. 通用 7 步法(三种模式共用骨架)

Step 1  解析用户输入 → 识别模式 P/S/M + 提取股票代码
Step 2  拉实时行情     → 优先腾讯接口(最稳)
Step 3  拉历史 K 线     → AKShare 主源 + 腾讯日 K 备源 + 重试
Step 4  计算关键位      → MA5/10/20/30 + 近 N 日高低 + 量能 + 40日涨幅
Step 5  判断态势        → 多头排列 / 空头排列 / 震荡 / 加速涨跌
Step 6  生成操作位      → 止损位(模式 P/S)或 排序推荐(模式 M)
Step 7  模式专属动作    → P:融资体检 + 公告 / S:深度分析 / M:横向对比

3. 数据源策略(按可靠性排序)

优先级 数据源 用途 备注
1️⃣ 腾讯财经 实时行情 最稳。AKShare 主源超时也能拿到数据
2️⃣ 新浪财经批量 实时(多只) 一次拉多只,省时间
3️⃣ AKShare 主源 历史 K 线 历史接口稳定,实时接口需 timeout
4️⃣ 腾讯日 K 历史备源 AKShare 失败时降级使用

踩过的坑:AKShare 主源 82.push2.eastmoney.com 在交易日早盘经常超时(实测 50+ 分钟无响应)。默认走腾讯,不要先尝试 AKShare 实时接口。


4. 三档硬止损规则

预警线:当日跌 5% 或跌破 MA5(一般股)/ MA10(重仓股)→ 减 1/3
风控线:跌破 MA10(一般股)/ MA20(重仓股)→ 再减 1/3
清仓线:跌破成本 -25%,或融资担保比例 \x3C 150% → 全部清掉 + 还融资

4.1 仓位调整因子

  • 重仓股(占比 ≥ 25%):所有止损位上提 5%(容错收紧)
  • 融资买入股:所有止损位上提 3%,且必须写成条件单
  • 高位涨幅股(40日内涨 > 50%):用 MA10 而非 MA20 作为风控线
  • 盈利股 > 30%:额外提供"利润保护位"(现价 - 25% 利润)
  • 亏损股:用 max(MA20, 成本-15%) 作为风控线

4.2 必须设条件单

不能让用户"盘中盯价"——白天忙、情绪波动、错过最佳点。 所有硬止损位都要让用户在券商 APP 里设条件单


5. 融资风险体检(模式 P 必做)

5.1 担保比例公式

担保比例 = (持仓总市值 + 融资买入证券市值) / 融资余额

5.2 五档预警

担保比例 等级 动作
\x3C 150% 🚨🚨🚨 接近强平区!立即降仓
150-160% 🚨 强警告:尽快降杠杆
160-170% ⚠️ 警戒区:建议主动降仓
170-200% 🟡 可控区:仍需关注
> 200% 安全区

5.3 还款优先级(先还谁)

  1. 已经亏损 + 技术位最弱的票(割肉脱身)
  2. 高位震荡顶部特征明显的票(保利润)
  3. 重仓且涨幅过大的票(落袋部分)
  4. 不要先还:刚突破、技术位强势的票

6. 重要公告检测(模式 P 自动)

6.1 关键词识别

等级 触发关键词
🔴 HIGH 减持股份、减持计划、立案、被调查、证监会、警示、业绩预减、诉讼
🟡 MED 解禁、限售股、收购、重组、股东大会、定增、业绩预告、终止、处罚

6.2 时间过滤

仅保留 近 N 天(默认 14 天)的公告,避免历史利空污染。


7. 输出格式

详见 docs/methodology.mdREADME.md 中的示例。


8. 反模式(一定不要做)

❌ 错误 ✅ 正确
"建议谨慎操作" "跌破 500 减 1/2,跌破 482 清融资部分"
"情绪面不佳" "成交 4.79 亿,量比 0.62(早盘缩量)"
把所有股票按输入顺序列一遍 按"重要性 / 紧迫度"排序
模式 P 不算融资担保比例 必须算,且单独成段
用 AKShare 主源超时还硬等 立即切腾讯接口(≤15s)
给"目标价"但不给"止损价" 永远是"止损 + 仓位管理"组合
让用户盘中盯价 让用户昨晚或开盘前设好条件单
模式 M 直接说"买 A" 用"⭐ 优势更明显"+ 理由
模式 P 不查公告 必须查,公告利空可推翻技术面判断

9. 调用方式

# 模式 P:持仓
python -m stock_realtime_brief --mode portfolio --portfolio path/portfolio.json

# 模式 S:单股
python -m stock_realtime_brief --mode single --code 300757

# 模式 M:多股对比
python -m stock_realtime_brief --mode multi --codes 300757,688498,688234,600519

# 自动模式:根据输入数量自判
python -m stock_realtime_brief --auto --codes 300757,688498

Agent 调用流程

  1. 解析用户消息 → 判定模式 P/S/M
  2. 提取股票代码(中文名 / 6位代码 / 拼音)
  3. 调用 stock_realtime_brief.cli.main() 或导入对应函数
  4. 套用本 skill 的 7 步法 + 模式专属规则
  5. 按模板输出 Markdown

10. 关联 skills(待建/可选)

  • weekly-position-review — 周末复盘 + 下周剧本
  • evening-trading-log — 收盘后交易日志整理
  • realtime-position-monitor — 盘中实时风险监测
  • stock-screener — 选股 skill

11. 免责声明

本 skill 仅用于辅助分析,不构成任何投资建议。 详见 DISCLAIMER.md

Usage Guidance
Install and run this only if you are comfortable using a local Python stock-analysis tool that reads your portfolio JSON and queries public finance/search providers. Keep your portfolio file private, pin dependencies if you need reproducibility, and treat all generated trading actions as informational rather than automatic financial advice.
Capability Analysis
Type: OpenClaw Skill Name: stock-realtime-brief Version: 2.2.0 The skill bundle is a legitimate A-share stock analysis tool providing portfolio briefing, single-stock deep dives, and multi-stock comparisons. It fetches market data from public APIs (Tencent, Sina, and AKShare) and uses a search utility (gsk) to identify relevant corporate announcements. The code is well-structured, includes comprehensive unit tests, and follows standard practices for data fetching and processing without any evidence of malicious intent, data exfiltration, or unauthorized command execution.
Capability Assessment
Purpose & Capability
The stated purpose, code, and documentation align around A-share market analysis, portfolio briefings, stop-loss levels, announcements, and margin-risk checks. The notable issue is not hidden behavior but the high-impact nature of actionable trading guidance.
Instruction Scope
The skill explicitly tells the agent to produce concrete stop-loss and conditional-order instructions. This is disclosed and purpose-aligned, but users should not treat the output as automatically correct financial advice.
Install Mechanism
The registry says there is no install spec, while project files document Python package dependencies and optional CLI behavior. The dependencies are normal for the purpose but are version-ranged rather than locked.
Credentials
The code fetches public market and announcement data from Tencent, Sina, AKShare, and optionally gsk search. This is proportionate to real-time stock analysis, but stock codes/watchlists may be sent to third-party data providers.
Persistence & Privilege
No broker credentials, trading APIs, background service, or elevated privileges are shown. The skill does use a local portfolio JSON file that may contain sensitive financial information and should be kept private.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install stock-realtime-brief
  3. After installation, invoke the skill by name or use /stock-realtime-brief
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.2.0
Initial release
Metadata
Slug stock-realtime-brief
Version 2.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Stock Realtime Brief?

A股实时分析与可执行操作建议生成器。支持三种模式:(1) 持仓简报模式 — 针对用户持仓出盘前/盘中风险简报,含融资风险体检与重要公告检测;(2) 单股深度模式 — 针对一只股票出技术面 + 操作位 + 三档止损方案;(3) 多股对比模式 — 针对多只股票(自选股/同板块/比价)做横向对比与综合评分。触发短语:盘... It is an AI Agent Skill for Claude Code / OpenClaw, with 34 downloads so far.

How do I install Stock Realtime Brief?

Run "/install stock-realtime-brief" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Stock Realtime Brief free?

Yes, Stock Realtime Brief is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Stock Realtime Brief support?

Stock Realtime Brief is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Stock Realtime Brief?

It is built and maintained by Michaelliugh (@michaelliugh); the current version is v2.2.0.

💬 Comments