← 返回 Skills 市场
LongbridgeAssistant
作者
JaysonDing
· GitHub ↗
· v1.0.0
· MIT-0
93
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install longbridge-assistant
功能描述
长桥证券智能投资助手。自动监控持仓、生成投资组合可视化图表、智能止盈止损提醒。Use when: user asks about 长桥持仓、投资组合分析、止盈止损、股票监控、portfolio analysis、price alerts. Features: 实时获取49+只股票持仓、港股/美股分开可视化、价格触...
使用说明 (SKILL.md)
长桥智能投资助手
自动监控长桥证券持仓,提供智能止盈止损提醒、投资组合分析和可视化图表。
When to Use
✅ USE this skill when:
- "查看我的长桥持仓"
- "投资组合分析"
- "止盈止损提醒"
- "生成持仓图表"
- "监控股票价格"
- "portfolio analysis"
- "price alerts"
When NOT to Use
❌ DON'T use this skill when:
- 其他券商账户(如富途、老虎)
- 实时交易执行(仅监控提醒)
- 技术分析指标(K线、MACD等)
- 历史交易记录查询
Commands
查看持仓
cd ~/.qclaw/workspace/skills/longbridge-assistant
./run.sh
配置 API
./setup.sh
自定义监控
编辑 longbridge_skill.py 中的 ALERTS 字典:
ALERTS = {
'AAPL.US': [
{'price': 150.0, 'action': 'buy_more', 'msg': '苹果回调至$150,建议加仓'},
{'price': 200.0, 'action': 'sell_partial', 'msg': '苹果涨至$200,建议减仓'},
],
}
Example Output
🦞 长桥智能投资助手 v2.0.0
📊 获取持仓及市值信息...
✅ 获取成功,共 49 只持仓
💰 总市值: $1,769,599
📈 生成投资组合图表...
✅ 图表已保存: portfolio_chart.png
📋 前10大持仓:
1. 🟢 小米(1810.HK) 10700股 @ $33.20 = $355,240
2. 🟢 7226.HK 60000股 @ $3.86 = $231,600
...
🔔 价格提醒检查:
⚠️ SMCI 当前 $22.15,低于目标 $35
📊 组合分析:
总持仓: 49 只
做多: 41 只 ($1,715,764)
做空: 8 只 ($53,835)
净值: $1,661,929
💡 建议: 持仓过于分散,建议集中优质标的
Setup
1. 安装依赖
pip install longbridge matplotlib
2. 配置 API Token
创建文件 ~/.longbridge/env:
export LONGBRIDGE_APP_KEY="你的AppKey"
export LONGBRIDGE_APP_SECRET="你的AppSecret"
export LONGBRIDGE_ACCESS_TOKEN="你的AccessToken"
获取方式:https://open.longportapp.com
3. 运行
./run.sh
Features
| 功能 | 说明 |
|---|---|
| 持仓监控 | 自动获取49+只股票 |
| 可视化 | 港股/美股分开饼图 |
| 止盈止损 | 价格触发提醒 |
| 投资建议 | 持仓分析建议 |
Notes
- 需要长桥 OpenAPI 权限
- API 有调用频率限制
- 仅供参考,不构成投资建议
Version
v2.0.0 (2026-03-23)
安全使用建议
This skill is functionally coherent: it uses the Longbridge SDK to read holdings and generate charts and only needs three Longbridge credentials. Still, proceed cautiously: 1) Inspect ~/.longbridge/env before using—only store the three Longbridge tokens there and avoid adding other secrets. 2) Prefer tokens with read-only or minimal permissions if Longbridge supports scopes. 3) The monetization documentation explicitly mentions selling anonymized user data—that is not present in the code today but suggests the author may plan to collect/monetize usage data; only install if you trust the author or after confirming how user data will be handled. 4) Run the skill in an isolated environment/virtualenv and review run.sh/setup.sh to ensure they match your environment (run.sh assumes ~/.venv/longbridge). 5) If you need stronger assurance, ask the publisher for a canonical source repo (the manifest's repository URL is a placeholder) and a privacy/data-use statement, or inspect runtime network traffic to confirm no unexpected external endpoints are contacted.
功能分析
Type: OpenClaw Skill
Name: longbridge-assistant
Version: 1.0.0
The longbridge-assistant skill is a legitimate investment tool designed to monitor stock positions and generate portfolio visualizations using the Longbridge Securities OpenAPI. It handles sensitive API credentials (APP_KEY, APP_SECRET, ACCESS_TOKEN) by reading them from a local environment file (~/.longbridge/env), which is standard practice for such integrations. The Python code (longbridge_skill.py) and shell scripts (setup.sh, run.sh) perform expected tasks like installing dependencies via pip, fetching market data, and saving charts locally without any evidence of data exfiltration, obfuscation, or malicious intent.
能力评估
Purpose & Capability
Name/description require Longbridge API access and the files/scripts require the longbridge Python SDK and matplotlib. The required env vars (LONGBRIDGE_APP_KEY, LONGBRIDGE_APP_SECRET, LONGBRIDGE_ACCESS_TOKEN) and python3 binary are consistent with the stated purpose.
Instruction Scope
Runtime instructions and scripts instruct the agent to read and source ~/.longbridge/env and to run ./run.sh which exports all variables found in that file. The Python script also reads ~/.longbridge/env itself. This is expected for an API-token-based tool, but it means any variables present in that file (not only the three declared tokens) will be loaded into the process. The SKILL.md does not instruct any unrelated system access, file exfiltration, or external endpoints beyond the Longbridge homepage.
Install Mechanism
No network download/install from untrusted URLs. setup.sh installs Python packages via pip (longbridge, matplotlib) which is proportionate. There is no extract-from-arbitrary-URL or remote binary install.
Credentials
Declared env vars are appropriate for the Longbridge integration. However: (1) the skill loads ~/.longbridge/env wholesale and run.sh does export $(grep -v '^#' ~/.longbridge/env | xargs), so any additional secrets placed there would be picked up; (2) monetization.md explicitly lists '匿名化用户数据卖给机构' (selling anonymized user data) as a monetization strategy — this is not implemented in code but signals a potential future data-sharing practice. Users should treat tokens as sensitive and prefer read-only or limited-scope credentials if available.
Persistence & Privilege
The skill is not always:true, does not request system-wide config changes, and does not modify other skills. It runs as a user script and relies on a user-provided env file and (optional) virtualenv; no privileged persistence is requested.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install longbridge-assistant - 安装完成后,直接呼叫该 Skill 的名称或使用
/longbridge-assistant触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of 长桥证券智能投资助手.
- 自动监控长桥证券持仓,支持49+只股票。
- 提供港股/美股分开持仓可视化图表。
- 支持自定义价格触发提醒,实现智能止盈止损。
- 生成投资组合分析报告及投资建议。
- 需配置长桥开放平台 API key、secret 与 token。
元数据
常见问题
LongbridgeAssistant 是什么?
长桥证券智能投资助手。自动监控持仓、生成投资组合可视化图表、智能止盈止损提醒。Use when: user asks about 长桥持仓、投资组合分析、止盈止损、股票监控、portfolio analysis、price alerts. Features: 实时获取49+只股票持仓、港股/美股分开可视化、价格触... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 93 次。
如何安装 LongbridgeAssistant?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install longbridge-assistant」即可一键安装,无需额外配置。
LongbridgeAssistant 是免费的吗?
是的,LongbridgeAssistant 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
LongbridgeAssistant 支持哪些平台?
LongbridgeAssistant 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 LongbridgeAssistant?
由 JaysonDing(@p3dp)开发并维护,当前版本 v1.0.0。
推荐 Skills