longbridge-watchlist-admin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-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:
  1. 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.
  2. Wait for explicit confirmation containing "确认 / yes / 是的 / confirm". If the user replies anything ambiguous, ask again — do not assume consent.
  3. Execute — only after step 2, run the actual
    longbridge watchlist <subcommand> ...
    command.
The Longbridge CLI's
delete
subcommand prints its own confirmation prompt — let it run; do not pipe
yes
or pass any flag that bypasses it. For
create
/
update
, this skill's preview-then-confirm protocol is the SKILL-layer gate.
所有修改操作必须分为两个独立步骤执行:
  1. 预览 — 用用户使用的语言准确描述即将执行的操作(包括分组名称、将添加/移除的标的、是否会删除分组并清空其内标的)。此时请勿执行CLI命令。
  2. 等待明确确认 — 用户回复需包含“确认/yes/是的/confirm”等明确同意的内容。若用户回复模糊,需再次询问——切勿默认用户同意
  3. 执行 — 仅在完成步骤2后,执行实际的
    longbridge watchlist <subcommand> ...
    命令。
Longbridge CLI的
delete
子命令会自带确认提示——让其正常运行即可;请勿通过管道输入
yes
或添加任何跳过确认的参数。对于
create
/
update
操作,本Skill的「预览后确认」流程是Skill层面的验证关卡。

Routing to the read skill

路由至查询类Skill

If the user gives a group name (not an id), first call
longbridge watchlist --format json
(handled by
longbridge-watchlist
) to look up
group_id
, then run mutations here.
User saysSkill
看 / list / show
longbridge-watchlist
(read)
加 / 删 / 创建 / 改名
longbridge-watchlist-admin
(this skill)
For ambiguous prompts ("整理我的自选") — ask what specific action the user wants.
如果用户提供的是分组名称(而非ID),需先调用
longbridge watchlist --format json
(由
longbridge-watchlist
Skill处理)查询对应的
group_id
,再在此执行修改操作。
用户指令对应Skill
看/列出/显示
longbridge-watchlist
(查询类)
添加/删除/创建/重命名
longbridge-watchlist-admin
(本Skill)
对于模糊指令(如“整理我的自选”)——询问用户具体需求。

CLI subcommands

CLI子命令

longbridge watchlist
carries three write subcommands. Always run
longbridge watchlist <subcommand> --help
first if you are not 100% sure of the current flag spelling, defaults, or argument order
— this protects against version drift.
ActionCLI invocation (typical shape — verify with
--help
before use)
Create a new group
longbridge watchlist create "<name>" --format json
Add symbols to a group
longbridge watchlist update <group_id> --add <SYMBOL>... --format json
Remove symbols from a group
longbridge watchlist update <group_id> --remove <SYMBOL>... --format json
Rename a group
longbridge watchlist update <group_id> --name "<new>" --format json
Delete a group
longbridge watchlist delete <group_id> --format json
The
delete
subcommand has a built-in confirmation prompt (per
longbridge watchlist --help
). Let it run interactively in your environment.
longbridge watchlist
包含三个写入类子命令。若你对当前参数拼写、默认值或参数顺序不是100%确定,请先执行
longbridge watchlist <subcommand> --help
——这可以避免因版本更新导致的问题。
操作CLI调用示例(典型格式——使用前请用
--help
验证)
创建新分组
longbridge watchlist create "<name>" --format json
向分组添加标的
longbridge watchlist update <group_id> --add <SYMBOL>... --format json
从分组移除标的
longbridge watchlist update <group_id> --remove <SYMBOL>... --format json
重命名分组
longbridge watchlist update <group_id> --name "<new>" --format json
删除分组
longbridge watchlist delete <group_id> --format json
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 json
returns the resulting group object (or an updated list). On success, surface a short confirmation in the user's language and remind them to verify the change in the Longbridge app if needed.
longbridge watchlist <subcommand> --format json
会返回修改后的分组对象(或更新后的列表)。操作成功后,用用户使用的语言给出简短确认提示,并提醒用户如有需要可在Longbridge App中验证修改结果。

Error handling

错误处理

SituationLLM response
Shell
command not found: longbridge
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
not logged in
/
unauthorized
Tell the user to run
longbridge auth login
(this account requires trade scope; re-auth and tick "Trade").
Bad
group_id
Re-run the read skill (
longbridge-watchlist
) and re-check the id.
Other stderrSurface verbatim. Do not silently retry — if a mutating call failed, ask the user before any second attempt.
场景LLM响应
Shell提示
command not found: longbridge
告知用户安装longbridge-terminal;可使用MCP备选方案(见下文)但必须在用户确认后——切勿使用MCP跳过「预览+确认」流程。
stderr包含
not logged in
/
unauthorized
告知用户执行
longbridge auth login
(该账号需要交易权限;重新登录并勾选“Trade”)。
无效的
group_id
重新执行查询类Skill(
longbridge-watchlist
)并重新检查ID。
其他stderr内容直接原样展示。切勿静默重试——若修改调用失败,再次尝试前需询问用户。

OAuth scope

OAuth权限

Mutating operations require the trade scope. Without it, both CLI and MCP fail with
unauthorized
/
not in authorized scope
. Tell the user to
longbridge auth logout && longbridge auth login
and tick "Trade" in the browser.
修改操作需要trade权限。若无此权限,CLI和MCP都会返回
unauthorized
/
not in authorized scope
错误。告知用户执行
longbridge auth logout && longbridge auth login
并在浏览器中勾选“Trade”。

MCP fallback (only after confirmation)

MCP备选方案(仅在确认后使用)

CLI subcommandMCP tool
watchlist create
mcp__longbridge__create_watchlist_group
watchlist update
mcp__longbridge__update_watchlist_group
watchlist delete
mcp__longbridge__delete_watchlist_group
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工具
watchlist create
mcp__longbridge__create_watchlist_group
watchlist update
mcp__longbridge__update_watchlist_group
watchlist delete
mcp__longbridge__delete_watchlist_group
重要提示:使用MCP时仍需遵循「预览+确认」流程。MCP写入工具无内置确认提示,本Skill负责验证关卡。

File layout

文件结构

longbridge-watchlist-admin/
└── SKILL.md          # prompt-only, no scripts/
Prompt-only — no
scripts/
. Discover the latest CLI flags via
longbridge watchlist <subcommand> --help
.
longbridge-watchlist-admin/
└── SKILL.md          # prompt-only, no scripts/
仅包含提示信息——无
scripts/
目录。可通过
longbridge watchlist <subcommand> --help
查看最新的CLI参数。