← Back to Skills Marketplace
A股持仓监控助手
by
sunshinesdff
· GitHub ↗
· v1.0.0
· MIT-0
1464
Downloads
2
Stars
7
Active Installs
1
Versions
Install in OpenClaw
/install a-stock-portfolio-monitor
Description
A股持仓监控助手 - 每日自动持仓报告、止损止盈提醒、实时盈亏跟踪。适合个人投资者管理多只股票持仓。
README (SKILL.md)
A股持仓监控助手
功能
- ✅ 持仓实时监控 - 自动获取最新股价,计算盈亏
- ✅ 每日收盘报告 - 生成日终持仓总结
- ✅ 止损止盈提醒 - 自动检测触发条件
- ✅ 多因子选股 - 基于涨幅/量能/估值评分
使用方法
1. 配置持仓
python scripts/portfolio.py add 600803 --cost 21.76 --qty 1800 # 新奥股份
python scripts/portfolio.py add 600010 --cost 3.30 --qty 15000 # 包钢股份
python scripts/portfolio.py add 600845 --cost 23.92 --qty 3000 # 宝信软件
2. 查看持仓报告
python scripts/portfolio.py analyze
3. 运行选股
python scripts/selector.py
数据源
- 腾讯财经API(实时行情)
- 本地持仓数据存储
免责声明
本工具仅供参考,不构成投资建议。投资有风险,入市需谨慎。
Usage Guidance
这是一个本地、基于腾讯财经的持仓/选股脚本包,功能声明与网络请求基本匹配 — 但在安装前请注意并采取以下步骤:
1) 修复并审查缺失文件:portfolio.py 依赖 analyze 模块(analyze_stock 等),但仓库清单缺失 analyze.py。安装前要求作者补齐或在本地查看/提供该文件。否则 analyze 和 analyze_portfolio 功能无法工作。
2) 文档/路径不一致:README 建议编辑 data/portfolio.json,但实际脚本写入 ~/.clawdbot/skills/a-stock-analysis/portfolio.json。确认想要的数据位置并统一文档或修改代码。
3) 命令注入风险(本地风险):scripts/run_monitor.py 在把用户输入直接拼入 os.system 调用(例如 os.system(f"python portfolio.py add {code} --cost {cost} --qty {qty}" ))。如果其他用户或不受信任的输入可到达这些交互,会有命令注入危险。建议在合并前将这些调用改为 subprocess.run([...], check=True) 或对输入进行严格验证/过滤。
4) 网络访问:脚本会请求 qt.gtimg.cn 获取行情数据——如果你不希望任何外联流量,请不要运行。确认该域名是你信任的数据源。
5) 运行环境建议:先在隔离环境(容器或受限虚拟机)中运行和测试,确认缺失模块、路径和行为被修复;查看 analyze.py(若提供)以确认没有隐藏的外部端点或敏感数据上传逻辑。
6) 信誉与来源:源码来自 unknown 源,缺少主页/仓库地址。若要长期使用,要求作者提供来源仓库(例如 GitHub)并查看提交/历史以评估信誉。
如果你不自己修复或审核这些问题,则建议不要在生产机器或包含敏感信息的主目录上运行。
Capability Analysis
Type: OpenClaw Skill
Name: a-stock-portfolio-monitor
Version: 1.0.0
The skill bundle contains a significant shell injection vulnerability in 'scripts/run_monitor.py', where unsanitized user input from the 'code', 'cost', and 'qty' fields is passed directly into 'os.system()' calls. Additionally, 'scripts/portfolio.py' depends on a missing local module named 'analyze.py', which renders the primary analysis functionality broken. While these issues represent poor security practices and incomplete code, there is no explicit evidence of intentional malice, data exfiltration, or hidden backdoors.
Capability Assessment
Purpose & Capability
技能名称/描述(持仓监控、止损提醒、选股)与代码行为一致:脚本从腾讯财经(qt.gtimg.cn)抓取行情并在本地生成报告/选股结果。没有请求额外云凭据或无关外部服务,这与声明相符。
Instruction Scope
SKILL.md/README 指示运行本地脚本并编辑 data/portfolio.json,但实际代码将持仓写入 ~/.clawdbot/skills/a-stock-analysis/portfolio.json(路径不一致)。portfolio.py 还从一个名为 analyze 的模块导入 analyze_stock 等函数,但清单中没有 analyze.py —— 运行时会出错。总体上文档与代码不一致,存在可用性和隐蔽风险。
Install Mechanism
无安装规范、仅用标准库、没有远程下载或可执行安装步骤,这降低了供应链风险。
Credentials
技能不要求任何环境变量或外部凭据,所需权限仅限读写用户主目录下的技能数据文件,与功能相称。唯一的外部通信是向腾讯财经(qt.gtimg.cn)请求行情数据,这与功能声明一致。
Persistence & Privilege
技能不会要求常驻(always)或修改其他技能设置,但会在用户主目录下创建/写入 ~/.clawdbot/skills/a-stock-analysis/portfolio.json(正常的本地数据持久化)。
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install a-stock-portfolio-monitor - After installation, invoke the skill by name or use
/a-stock-portfolio-monitor - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
每日自动持仓报告,止损止盈提醒,智能选股
Metadata
Frequently Asked Questions
What is A股持仓监控助手?
A股持仓监控助手 - 每日自动持仓报告、止损止盈提醒、实时盈亏跟踪。适合个人投资者管理多只股票持仓。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1464 downloads so far.
How do I install A股持仓监控助手?
Run "/install a-stock-portfolio-monitor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is A股持仓监控助手 free?
Yes, A股持仓监控助手 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does A股持仓监控助手 support?
A股持仓监控助手 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created A股持仓监控助手?
It is built and maintained by sunshinesdff (@sunshinesdff); the current version is v1.0.0.
More Skills