← Back to Skills Marketplace
hitjcl

股票实时行情分析器

cross-platform ⚠ suspicious
53
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install hitjcl-stock-analyzer
Description
A股/港股实时行情查询、基本面分析、深度报告生成与邮件发送一体化工具。触发场景:(1) 用户询问股票价格、市值、PE/PB等数据;(2) 用户要求分析某只或多只股票;(3) 用户要求生成股票分析报告;(4) 用户要求通过邮件发送股票报告。支持AkShare实时行情、聚宽基本面数据、QQ邮箱/Gmail发送。
README (SKILL.md)

Stock Analyzer - 股票深度分析工具

快速开始

1. 查询实时行情

# 使用 scripts/stock_query.py
python scripts/stock_query.py --codes 03690.HK,300413.SZ,300251.SZ

返回:股价、涨跌幅、成交量、成交额

2. 获取基本面数据

# 需要先配置聚宽账号
python scripts/jq_login.py --phone 18019786011 --password YOUR_PASSWORD
python scripts/stock_fundamentals.py --codes 300413.SZ,300251.SZ

返回:PE、PB、市值、ROE、营收增长率等

3. 生成分析报告

python scripts/generate_report.py --codes 03690.HK,300413.SZ --output report.md

4. 发送邮件

python scripts/send_email.py --to [email protected] --file report.md --auth-code YOUR_AUTH_CODE

工作流程

用户请求 → 解析股票代码 → 获取实时行情 → 获取基本面 → 深度分析 → 生成报告 → 发送邮件

步骤详解

Step 1: 解析股票代码

支持格式:

  • 港股:03690.HK00772.HK(腾讯股票代码格式)
  • A股:300413.SZ600519.SH(交易所代码格式)
  • 简写:美团芒果超媒(自动匹配代码)

Step 2: 获取实时行情

使用 AkShare 库:

  • A股:ak.stock_zh_a_spot_em()
  • 港股:ak.stock_hk_spot_em()

Step 3: 获取基本面数据

使用聚宽 JoinQuant API:

  • get_fundamentals() 获取 PE、PB、市值
  • get_valuation() 获取估值历史
  • 注意:聚宽免费版数据权限有限

Step 4: 深度分析

分析维度:

  1. 估值分析:PE/PB历史分位、同行业对比
  2. 趋势分析:近期涨跌幅、成交量变化
  3. 基本面分析:营收、利润增速、ROE
  4. 风险提示:异常波动、业绩下滑

Step 5: 生成报告

报告结构(见 references/report_template.md):

  • 标题:五大标的买入分析报告
  • 摘要:关键结论
  • 正文:逐个标的深度分析
  • 总结:操作建议

Step 6: 发送邮件

支持:

  • QQ邮箱(推荐):smtp.qq.com:465 SSL
  • Gmail:smtp.gmail.com:587 STARTTLS

QQ邮箱配置要点

  • 必须使用授权码(非密码)
  • 推荐使用 465 端口 SSL
  • Python 使用 smtplib.SMTP_SSL

常见问题

Q: 聚宽登录失败?

检查:

  1. 手机号/密码是否正确
  2. 账号是否过期(免费版1年有效期)
  3. 是否有港股数据权限

Q: 邮件发送失败?

常见错误:

  • Login denied:授权码错误或邮箱地址错误
  • Connection closed:端口选择错误,尝试 465 SSL
  • SMTPAuthenticationError:需要开启 SMTP 服务并生成授权码

Q: AkShare 获取数据失败?

可能原因:

  1. 网络问题:检查代理设置
  2. 并发限制:逐个查询而非批量
  3. 数据源维护:稍后重试

依赖安装

pip install akshare jqdatasdk pandas

文件说明

scripts/

  • stock_query.py - 实时行情查询
  • stock_fundamentals.py - 基本面数据获取
  • generate_report.py - 报告生成
  • send_email.py - 邮件发送
  • jq_login.py - 聚宽登录配置

references/

  • report_template.md - 报告模板
  • stock_codes.md - 常用股票代码对照表

使用示例

示例1:查询美团股价

用户:帮我查一下美团的股价
→ 调用 stock_query.py --codes 03690.HK
→ 返回:美团(03690.HK) HK$80.70 (-1.41%)

示例2:分析多只股票

用户:分析一下美团、芒果超媒、光线传媒
→ 调用 stock_query.py 获取行情
→ 调用 stock_fundamentals.py 获取基本面
→ 生成分析报告

示例3:发送报告到邮箱

用户:把报告发到我邮箱
→ 调用 send_email.py --to [email protected] --file report.md
→ 使用 QQ 邮箱 SMTP 发送
Usage Guidance
Key things to consider before installing/using this skill: - Incomplete package: SKILL.md references jq_login.py, stock_fundamentals.py, generate_report.py but only stock_query.py and send_email.py are included. Ask the publisher for the missing scripts or don't use it until complete. - Avoid passing secrets on the command line. The send_email and JoinQuant examples show passwords and auth codes passed as CLI args — this exposes them to shell history and process listings. Prefer environment variables or interactive prompt, and verify scripts do not log secrets. - Verify email behavior: send_email.py uses the provided --to address as the sending account (from_email = to_email). Confirm you pass your own email address and correct auth code, or adapt the script to accept distinct sender/recipient to avoid confusion. - Verify JoinQuant usage: jqdatasdk is listed but no corresponding scripts are present to inspect. Confirm how your JoinQuant credentials are stored and used before supplying them. - Network & data sources: stock_query.py uses akshare which fetches remote market data. If you proceed, review akshare calls and ensure you trust the data sources. - If you need to use this, request the missing files from the author and review them for secret handling and external endpoints. If you cannot obtain them, treat the skill as incomplete and avoid running it with real credentials.
Capability Analysis
Type: OpenClaw Skill Name: hitjcl-stock-analyzer Version: 1.0.0 The skill bundle provides legitimate stock analysis and email reporting functionality, but contains significant security vulnerabilities that could be exploited. Specifically, 'scripts/send_email.py' accepts a file path via the '--file' argument and reads/sends its content without any path sanitization or validation, which could allow an attacker to exfiltrate sensitive local files via prompt injection. Furthermore, 'SKILL.md' encourages passing sensitive credentials (SMTP auth codes and JoinQuant passwords) as plaintext command-line arguments, which risks exposing them in system process logs or shell history.
Capability Assessment
Purpose & Capability
The SKILL.md claims a full pipeline including JoinQuant login, fundamentals fetching, report generation and mailing. The repository only includes stock_query.py and send_email.py; scripts referenced in the docs (jq_login.py, stock_fundamentals.py, generate_report.py) are missing. The README also asks to install jqdatasdk but there is no code using it in the provided files. This is an incoherence: required capabilities are advertised but not present.
Instruction Scope
Runtime instructions direct the agent/user to run CLI commands that include credentials (e.g., `jq_login.py --phone ... --password YOUR_PASSWORD` and `send_email.py --auth-code ...`). Passing secrets on the command line exposes them via shell history and process lists. The send_email usage in SKILL.md assumes calling --to with the sender's account; the send_email.py implementation sets from_email = to_email (it treats the 'to' argument as the sender account), which is confusing and may cause unexpected authentication failures or mis-sent emails. The stock_query.py does only quote retrieval via akshare (no fundamentals), so following the documented workflow will fail or be incomplete.
Install Mechanism
No install spec is present (instruction-only install), which is lower risk. SKILL.md asks to pip install akshare, jqdatasdk, pandas — those are plausible dependencies for the advertised features. Because some referenced scripts are missing, the promised install+run workflow is incomplete, not evidence of malicious install behavior.
Credentials
The skill declares no required environment variables or credentials, and the included code does not read any env vars. However, the documented workflow requires user credentials (JoinQuant phone/password and email auth codes/app passwords) to be supplied via CLI arguments. Those credentials are relevant to the claimed functionality, but passing them on the command line is unsafe. There are no unrelated credentials requested.
Persistence & Privilege
The skill does not request permanent or elevated privileges. Flags show always:false and no install script that would modify agent/system configuration. The provided scripts do not attempt to persist credentials or alter other skills.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hitjcl-stock-analyzer
  3. After installation, invoke the skill by name or use /hitjcl-stock-analyzer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
首个版本:支持A股/港股实时行情查询、基本面分析、报告生成
Metadata
Slug hitjcl-stock-analyzer
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 股票实时行情分析器?

A股/港股实时行情查询、基本面分析、深度报告生成与邮件发送一体化工具。触发场景:(1) 用户询问股票价格、市值、PE/PB等数据;(2) 用户要求分析某只或多只股票;(3) 用户要求生成股票分析报告;(4) 用户要求通过邮件发送股票报告。支持AkShare实时行情、聚宽基本面数据、QQ邮箱/Gmail发送。 It is an AI Agent Skill for Claude Code / OpenClaw, with 53 downloads so far.

How do I install 股票实时行情分析器?

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

Is 股票实时行情分析器 free?

Yes, 股票实时行情分析器 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 股票实时行情分析器 support?

股票实时行情分析器 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 股票实时行情分析器?

It is built and maintained by 寒武纪智能Cambrian Intelligence (@hitjcl); the current version is v1.0.0.

💬 Comments