Skip to content

Repository files navigation

🚀 OpenClaw 股票投资技能包(已清理个人数据)

此版本已清理所有个人数据,可安全分享


📦 包含内容

技能 层级 功能
stock-analysis Layer 1 投资档案管理 - 持仓记录、策略文档
stock-analysis-pro Layer 2 市场监控台 - 实时数据、定时推送
Stock-Analysis-Skill Layer 3 决策参谋部 - 深度分析、100分评分
iv-monitor 专项 IV异动监控 - 期权波动率分析

🚀 快速安装

方式1:一键安装(推荐)

curl -fsSL https://raw.githubusercontent.com/你的用户名/openclaw-stock-skills/main/install/install-stock-skills.sh | bash

安装后会提示配置:

  1. 飞书Webhook - 用于接收通知
  2. 持仓数据 - 修改为你的实际持仓

方式2:手动安装

# 1. 克隆仓库
git clone https://github.com/你的用户名/openclaw-stock-skills.git

# 2. 复制技能
cp -r openclaw-stock-skills/skills/* ~/.openclaw/workspace/skills/

# 3. 运行配置向导
bash ~/.openclaw/workspace/skills/stock-analysis-pro/scripts/setup-wizard.sh

⚙️ 配置说明

1. 配置飞书Webhook

编辑 ~/.openclaw/workspace/skills/stock-analysis-pro/config.json:

{
  "feishu_webhook": "https://open.feishu.cn/open-apis/bot/v2/hook/YOUR_WEBHOOK_TOKEN",
  "keyword": "🟢",
  "watchlist": ["NIO", "TSLA", "AAPL"]
}

获取Webhook步骤:

  1. 在飞书群聊中点击「设置」→「群机器人」
  2. 添加「自定义机器人」
  3. 复制Webhook地址
  4. 可选择设置关键词(如:🟢)

2. 配置持仓数据

编辑 ~/.openclaw/workspace/skills/stock-analysis-pro/shared-data/holdings.json:

{
  "portfolio": {
    "total_assets": 你的总资产,
    "available_cash": 你的现金,
    "unrealized_pnl": 0.0
  },
  "holdings": [
    {
      "symbol": "NIO",
      "name": "蔚来",
      "shares": 你的股数,
      "cost_basis": 你的成本价,
      "current_price": 当前价格,
      "market_value": 市值,
      "unrealized_pnl": 盈亏
    }
  ],
  "options": [
    {
      "type": "PUT",
      "strike": 行权价,
      "expiry": "到期日",
      "contracts": 合约数,
      "entry_price": 入场价格,
      "current_price": 当前价格,
      "unrealized_pnl": 盈亏
    }
  ]
}

如果没有期权持仓,删除 options 数组。


🎯 使用方法

快捷命令

# 加载命令(安装后运行一次)
source ~/.zshrc

# 查看帮助
invest help

# 运行持仓监控
invest monitor

# 生成周报
invest weekly-report

# 检查策略进度
invest strategy-check

# 更新策略执行
invest strategy-update covered-call execute 40 0.60

# 查看AI状态
ai

定时任务(自动运行)

任务 时间 功能
daily-review 06:00 每天 每日投资复盘
iv-monitor 09:30/14:00/21:30 IV监控
holdings-monitor 每15分钟 持仓异动提醒
weekly-report 周日 18:00 周报生成

🏗️ 架构说明

┌─────────────────────────────────────────────┐
│           Layer 3: 决策参谋部               │
│      Stock-Analysis-Skill(深度分析)       │
│          100分评分系统 + 决策看板           │
└─────────────────────────────────────────────┘
                    ↑
┌─────────────────────────────────────────────┐
│           Layer 2: 市场监控台               │
│       stock-analysis-pro(实时监控)        │
│      定时推送 + IV监控 + 异动提醒           │
└─────────────────────────────────────────────┘
                    ↑
┌─────────────────────────────────────────────┐
│           Layer 1: 投资档案库               │
│        stock-analysis(数据管理)           │
│        持仓记录 + 策略文档 + 归档           │
└─────────────────────────────────────────────┘

🔧 故障排除

技能未加载

# 重启OpenClaw
openclaw restart

定时任务未运行

# 检查状态
launchctl list | grep openclaw

# 重新加载
launchctl unload ~/Library/LaunchAgents/com.openclaw.*
launchctl load ~/Library/LaunchAgents/com.openclaw.*

飞书通知未收到

  1. 检查webhook URL是否正确
  2. 确认关键词匹配
  3. 检查网络连接

📁 文件结构

skills/
├── stock-analysis/          # Layer 1: 档案管理
│   └── SKILL.md
├── stock-analysis-pro/      # Layer 2: 市场监控
│   ├── scripts/
│   │   ├── stock-analysis-pro.sh  # 统一入口
│   │   ├── holdings-monitor.sh    # 持仓监控
│   │   ├── alert-generator.sh     # 提醒生成
│   │   ├── weekly-report.sh       # 周报生成
│   │   ├── strategy-tracker.sh    # 策略跟踪
│   │   └── setup-wizard.sh        # 配置向导
│   └── shared-data/
│       └── holdings.json          # 持仓数据(需修改)
├── Stock-Analysis-Skill/    # Layer 3: 深度分析
│   └── references/
│       └── stock_data_fetcher.py  # 数据获取
└── iv-monitor/              # IV监控
    └── scripts/
        └── iv-monitor.sh

install/
└── install-stock-skills.sh  # 一键安装脚本

🔄 更新

# 重新运行安装脚本即可更新
curl -fsSL https://raw.githubusercontent.com/你的用户名/openclaw-stock-skills/main/install/install-stock-skills.sh | bash

📝 更新日志

v1.0.0 (2026-03-05)

  • ✅ 初始版本
  • ✅ 四层架构完整实现
  • ✅ 一键安装脚本
  • ✅ 已清理个人数据

👥 贡献

原技能包由 艾老师 创建并优化。

欢迎提交Issue和PR!


📄 License

MIT License


⚠️ 免责声明: 本技能包仅供学习和研究使用,不构成投资建议。投资有风险,入市需谨慎。

About

Creating some new skills for OpenClaw+Feishu.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages