longbridge-watchlist-admin
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-watchlist-admin
longbridge-watchlist-admin
⚠️ Mutating skill: changes the user's watchlist state on Longbridge. No money is involved, but the change is persistent.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
⚠️ 修改类Skill:会更改用户在Longbridge上的自选列表状态。此操作不涉及资金,但修改结果会永久保存。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。
Two-step protocol (mandatory)
两步流程(强制要求)
Every mutation must run as two distinct turns:
- Preview — describe exactly what you are about to do (group name, symbols added / removed, whether the group will be deleted with members purged), in the user's language. Do not run the CLI yet.
- Wait for explicit confirmation containing "确认 / yes / 是的 / confirm". If the user replies anything ambiguous, ask again — do not assume consent.
- Execute — only after step 2, run the actual command.
longbridge watchlist <subcommand> ...
The Longbridge CLI'ssubcommand prints its own confirmation prompt — let it run; do not pipedeleteor pass any flag that bypasses it. Foryes/create, this skill's preview-then-confirm protocol is the SKILL-layer gate.update
所有修改操作必须分为两个独立步骤执行:
- 预览 — 用用户使用的语言准确描述即将执行的操作(包括分组名称、将添加/移除的标的、是否会删除分组并清空其内标的)。此时请勿执行CLI命令。
- 等待明确确认 — 用户回复需包含“确认/yes/是的/confirm”等明确同意的内容。若用户回复模糊,需再次询问——切勿默认用户同意。
- 执行 — 仅在完成步骤2后,执行实际的命令。
longbridge watchlist <subcommand> ...
Longbridge CLI的子命令会自带确认提示——让其正常运行即可;请勿通过管道输入delete或添加任何跳过确认的参数。对于yes/create操作,本Skill的「预览后确认」流程是Skill层面的验证关卡。update
Routing to the read skill
路由至查询类Skill
If the user gives a group name (not an id), first call (handled by ) to look up , then run mutations here.
longbridge watchlist --format jsonlongbridge-watchlistgroup_id| User says | Skill |
|---|---|
| 看 / list / show | |
| 加 / 删 / 创建 / 改名 | |
For ambiguous prompts ("整理我的自选") — ask what specific action the user wants.
如果用户提供的是分组名称(而非ID),需先调用(由 Skill处理)查询对应的,再在此执行修改操作。
longbridge watchlist --format jsonlongbridge-watchlistgroup_id| 用户指令 | 对应Skill |
|---|---|
| 看/列出/显示 | |
| 添加/删除/创建/重命名 | |
对于模糊指令(如“整理我的自选”)——询问用户具体需求。
CLI subcommands
CLI子命令
longbridge watchlistlongbridge watchlist <subcommand> --help| Action | CLI invocation (typical shape — verify with |
|---|---|
| Create a new group | |
| Add symbols to a group | |
| Remove symbols from a group | |
| Rename a group | |
| Delete a group | |
Thesubcommand has a built-in confirmation prompt (perdelete). Let it run interactively in your environment.longbridge watchlist --help
longbridge watchlistlongbridge watchlist <subcommand> --help| 操作 | CLI调用示例(典型格式——使用前请用 |
|---|---|
| 创建新分组 | |
| 向分组添加标的 | |
| 从分组移除标的 | |
| 重命名分组 | |
| 删除分组 | |
子命令自带确认提示(详见delete)。请在你的环境中让其以交互方式运行。longbridge watchlist --help
Preview templates (LLM)
预览模板(LLM)
即将{动作}:{plan 摘要}。是否确认执行?About to {action}: {plan summary}. Confirm?即將{動作}:{plan 摘要}。是否確認執行?
Examples:
- "即将创建自选股分组「科技股」。是否确认执行?"
- "About to add NVDA.US, AAPL.US to group 12345. Confirm?"
- "即將刪除分組 12345。是否確認?"
即将{动作}:{plan 摘要}。是否确认执行?About to {action}: {plan summary}. Confirm?即將{動作}:{plan 摘要}。是否確認執行?
示例:
- "即将创建自选股分组「科技股」。是否确认执行?"
- "About to add NVDA.US, AAPL.US to group 12345. Confirm?"
- "即將刪除分組 12345。是否確認?"
Output
输出
longbridge watchlist <subcommand> --format jsonlongbridge watchlist <subcommand> --format jsonError handling
错误处理
| Situation | LLM response |
|---|---|
Shell | Tell the user to install longbridge-terminal; MCP fallback can apply (see below) but only after user confirmation — never use MCP to bypass the preview / confirm protocol. |
stderr contains | Tell the user to run |
Bad | Re-run the read skill ( |
| Other stderr | Surface verbatim. Do not silently retry — if a mutating call failed, ask the user before any second attempt. |
| 场景 | LLM响应 |
|---|---|
Shell提示 | 告知用户安装longbridge-terminal;可使用MCP备选方案(见下文)但必须在用户确认后——切勿使用MCP跳过「预览+确认」流程。 |
stderr包含 | 告知用户执行 |
无效的 | 重新执行查询类Skill( |
| 其他stderr内容 | 直接原样展示。切勿静默重试——若修改调用失败,再次尝试前需询问用户。 |
OAuth scope
OAuth权限
Mutating operations require the trade scope. Without it, both CLI and MCP fail with / . Tell the user to and tick "Trade" in the browser.
unauthorizednot in authorized scopelongbridge auth logout && longbridge auth login修改操作需要trade权限。若无此权限,CLI和MCP都会返回/错误。告知用户执行并在浏览器中勾选“Trade”。
unauthorizednot in authorized scopelongbridge auth logout && longbridge auth loginMCP fallback (only after confirmation)
MCP备选方案(仅在确认后使用)
| CLI subcommand | MCP tool |
|---|---|
| |
| |
| |
Important: the preview / confirm cycle still applies when going through MCP. MCP write tools have no built-in confirmation prompt; this SKILL is responsible for the gate.
| CLI子命令 | MCP工具 |
|---|---|
| |
| |
| |
重要提示:使用MCP时仍需遵循「预览+确认」流程。MCP写入工具无内置确认提示,本Skill负责验证关卡。
File layout
文件结构
longbridge-watchlist-admin/
└── SKILL.md # prompt-only, no scripts/Prompt-only — no . Discover the latest CLI flags via .
scripts/longbridge watchlist <subcommand> --helplongbridge-watchlist-admin/
└── SKILL.md # prompt-only, no scripts/仅包含提示信息——无目录。可通过查看最新的CLI参数。
scripts/longbridge watchlist <subcommand> --help