longbridge-alert

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-alert

longbridge-alert

⚠️ Mutating skill: changes the user's price-alert state on Longbridge. No money is involved, but the change is persistent and will affect future push notifications.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
⚠️ 变更类Skill:会修改用户在Longbridge上的价格提醒状态。此操作不涉及资金,但变更会永久保存并影响未来的推送通知。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。

When to use

使用场景

Trigger only on clear imperatives to manage price alerts:
  • "提醒我 NVDA.US 涨到 200" / "在 200 美元提醒我"
  • "删除提醒 486469" / "關掉那個提醒"
  • "set an alert when TSLA hits 250"
Vague prompts ("整理一下我的提醒", "看看我的提醒怎么样") must be refused with a clarifying question — ask which symbol, which direction, which price, which alert id — never guess.
For read-only listing of existing alerts, you may run
longbridge alert --format json
directly without the preview/confirm gate (listing changes nothing). Mutations always need the gate.
仅在用户给出明确指令以管理价格提醒时触发:
  • "提醒我 NVDA.US 涨到 200" / "在 200 美元提醒我"
  • "删除提醒 486469" / "關掉那個提醒"
  • "set an alert when TSLA hits 250"
对于模糊指令(如*"整理一下我的提醒""看看我的提醒怎么样"*),必须拒绝并请求明确信息——询问标的代码、触发方向、目标价格、提醒ID,绝不猜测。
对于只读查看现有提醒的操作,可直接运行
longbridge alert --format json
,无需经过预览/确认流程(查看操作不会修改任何内容)。所有变更操作必须遵循该流程。

Two-step protocol (mandatory)

两步式强制流程

Every mutation must run as two distinct turns:
  1. Preview — describe exactly what you are about to do (symbol, target price, direction
    rise
    /
    fall
    , alert id for delete/enable/disable), 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 alert <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
add
/
enable
/
disable
, this skill's preview-then-confirm protocol is the SKILL-layer gate.
所有变更操作必须分为两个独立步骤执行:
  1. 预览——用用户的语言准确描述即将执行的操作(标的代码、目标价格、触发方向
    rise
    /
    fall
    、删除/启用/禁用操作对应的提醒ID)。此时不要运行CLI命令。
  2. 等待明确确认——用户回复需包含“确认 / yes / 是的 / confirm”。若用户回复模糊,需再次询问,绝不默认用户同意
  3. 执行——仅在完成步骤2后,运行实际的
    longbridge alert <subcommand> ...
    命令。
Longbridge CLI的
delete
子命令会自带确认提示——让其正常运行;不要通过管道输入
yes
或添加任何跳过确认的参数。对于
add
/
enable
/
disable
操作,本Skill的预览-确认流程是Skill层面的验证关卡。

CLI subcommands

CLI子命令

longbridge alert
carries one read mode (no subcommand) and four write subcommands. Always run
longbridge alert <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)
List all alerts
longbridge alert --format json
List alerts for one symbol
longbridge alert <SYMBOL> --format json
Add a price alert
longbridge alert add <SYMBOL> --price <PRICE> --direction <rise|fall> --format json
Delete an alert by id
longbridge alert delete <ALERT_ID> --format json
Enable an alert
longbridge alert enable <ALERT_ID> --format json
Disable an alert
longbridge alert disable <ALERT_ID> --format json
The
delete
subcommand has a built-in confirmation prompt. Let it run interactively in your environment.
If the user gives a symbol but no alert id for delete/enable/disable, first run
longbridge alert <SYMBOL> --format json
to look up the id, then quote the id back in your preview before asking for confirmation.
longbridge alert
包含一种只读模式(无子命令)和四种写入子命令。若你对当前参数拼写、默认值或参数顺序不是100%确定,请先运行
longbridge alert <subcommand> --help
——这可避免版本差异导致的问题。
操作CLI调用示例(典型格式——使用前需用
--help
验证)
查看所有提醒
longbridge alert --format json
查看单个标的的提醒
longbridge alert <SYMBOL> --format json
添加价格提醒
longbridge alert add <SYMBOL> --price <PRICE> --direction <rise|fall> --format json
通过ID删除提醒
longbridge alert delete <ALERT_ID> --format json
启用提醒
longbridge alert enable <ALERT_ID> --format json
禁用提醒
longbridge alert disable <ALERT_ID> --format json
delete
子命令自带确认提示,请在你的环境中让其交互式运行。
若用户给出标的代码但未提供删除/启用/禁用操作对应的提醒ID,需先运行
longbridge alert <SYMBOL> --format json
查询ID,然后在预览信息中引用该ID,再请求用户确认。

Preview templates (LLM)

预览模板(LLM)

即将{动作}:{plan 摘要}。是否确认执行?
About to {action}: {plan summary}. Confirm?
即將{動作}:{plan 摘要}。是否確認執行?
Examples:
  • "即将设置 NVDA.US 在 200 美元时提醒,价格上穿触发。是否确认执行?"
  • "About to add a price alert on TSLA.US at 250 USD, triggered when price falls below. Confirm?"
  • "即將刪除提醒 486469(NVDA.US @ 200,上穿)。是否確認執行?"
  • "即将停用提醒 486469。是否确认?"
If the user did not specify a direction (rise vs fall), ask — do not default. If the user did not specify a price, ask. Never invent values.
即将{动作}:{计划摘要}。是否确认执行?
About to {action}: {plan summary}. Confirm?
即將{動作}:{plan 摘要}。是否確認執行?
示例:
  • "即将设置 NVDA.US 在 200 美元时提醒,价格上穿触发。是否确认执行?"
  • "About to add a price alert on TSLA.US at 250 USD, triggered when price falls below. Confirm?"
  • "即將刪除提醒 486469(NVDA.US @ 200,上穿)。是否確認執行?"
  • "即将停用提醒 486469。是否确认?"
若用户未指定触发方向(上涨/下跌),请询问用户——不要默认设置。若用户未指定价格,也请询问。绝不要自行编造数值。

OAuth scope

OAuth权限范围

Price alerts are tied to the user's Longbridge account but do not place trades, so the basic login scope is sufficient —
longbridge auth login
without trade scope works. If the call returns
unauthorized
, tell the user to re-run
longbridge auth login
and complete the OAuth flow.
价格提醒与用户的Longbridge账号绑定,但不会执行交易操作,因此基础登录权限范围已足够——无需交易权限的
longbridge auth login
即可生效。若调用返回
unauthorized
,请告知用户重新运行
longbridge auth login
并完成OAuth流程。

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
.
Bad
<ALERT_ID>
(not found)
Re-run the list command (
longbridge alert --format json
) and re-check the id.
direction
flag rejected
Run
longbridge alert add --help
to confirm the current accepted values (typically
rise
/
fall
); surface the help excerpt to the user.
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 fallback(见下文)——绝不要通过MCP跳过预览/确认流程。
标准错误输出包含
not logged in
/
unauthorized
告知用户运行
longbridge auth login
无效
<ALERT_ID>
(未找到)
重新运行查看命令(
longbridge alert --format json
)并核对ID。
direction
参数被拒绝
运行
longbridge alert add --help
确认当前接受的参数值(通常为
rise
/
fall
);将帮助内容片段展示给用户。
其他标准错误输出直接展示原始内容。不要静默重试——若变更操作失败,再次尝试前需询问用户。

MCP fallback (only after confirmation)

MCP fallback(仅在确认后使用)

If the CLI binary is unavailable, an MCP equivalent may be wired up under names such as
mcp__longbridge__create_price_alert
/
mcp__longbridge__delete_price_alert
/
mcp__longbridge__list_price_alerts
. Tool names are environment-specific — discover them via
ListMcpResourcesTool
rather than hard-coding.
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__longbridge__create_price_alert
/
mcp__longbridge__delete_price_alert
/
mcp__longbridge__list_price_alerts
。工具名称因环境而异——请通过
ListMcpResourcesTool
自动发现,不要硬编码。
重要提示:使用MCP时仍需遵循预览/确认流程。MCP写入工具无内置确认提示,本Skill需负责验证关卡。

Related skills

相关Skill

  • longbridge-quote
    — look up the current price of a symbol before suggesting an alert level.
  • longbridge-watchlist
    /
    longbridge-watchlist-admin
    — manage the favourites list (alerts and watchlists are independent).
  • longbridge-subscriptions
    — diagnose real-time stream health (separate from alert push notifications).
  • longbridge-quote
    ——设置提醒前查询标的当前价格。
  • longbridge-watchlist
    /
    longbridge-watchlist-admin
    ——管理收藏列表(提醒与收藏列表相互独立)。
  • longbridge-subscriptions
    ——诊断实时数据流健康状态(与提醒推送通知相互独立)。

File layout

文件结构

longbridge-alert/
└── SKILL.md          # prompt-only, no scripts/
Prompt-only — no
scripts/
. Discover the latest CLI flags via
longbridge alert <subcommand> --help
.
longbridge-alert/
└── SKILL.md          # 仅含提示词,无scripts/目录
仅含提示词——无
scripts/
目录。通过
longbridge alert <subcommand> --help
获取最新CLI参数。