longbridge-dca
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-dca
longbridge-dca
⚠️ EXTRA-HIGH-RISK mutating skill: a recurring-investment plan commits real money on a schedule — every active plan will automatically place buy orders against the user's brokerage account on the chosen frequency, until paused or stopped. Mistakes here cost real money. Treat creation and modification with extreme caution.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
⚠️ 极高风险的变更类技能:定期定额投资计划会按调度自动投入真实资金——每个生效的计划都会按照选定的频率自动从用户的券商账户下单买入,直到被暂停或停止。此处的操作失误会造成真实资金损失。创建和修改计划时务必极其谨慎。
响应语言:匹配用户输入的语言——简体中文/繁体中文/英文。
Extra risk note (read this before every create
/ update
)
createupdate额外风险提示(每次执行创建/更新前必读)
DCA commits real money on a recurring schedule. Read the plan back including amount / frequency / symbol / start date / end date or duration / day-of-week or day-of-month before asking for confirmation. If the user is not 100% sure of any parameter, ask before executing — never paper over uncertainty. Specifically:
- If the user did not specify the amount, ask. Do not default.
- If the user did not specify the frequency (/
daily/weekly/fortnightly), ask.monthly - If the user said "weekly" without naming a , ask.
day-of-week - If the user said "monthly" without naming a , ask.
day-of-month - If the user did not specify when to stop (or that the plan is open-ended), confirm explicitly.
- If the user gave an amount in an ambiguous currency, ask which currency (USD vs HKD vs CNY).
If anything is unclear after one round of clarification, do not proceed — escalate back to the user instead of guessing.
定投计划会按周期自动投入真实资金。在请求用户确认前,务必向用户复述计划的所有参数,包括金额/频率/标的代码/开始日期/结束日期或期限/每周定投日或每月定投日。如果用户对任何参数不是100%确定,执行前务必询问——绝不能模糊处理不确定的信息。具体来说:
- 如果用户未指定金额,请询问,不要使用默认值。
- 如果用户未指定频率(/
daily/weekly/fortnightly),请询问。monthly - 如果用户只说“每周定投”但未指定具体星期几,请询问。
- 如果用户只说“每月定投”但未指定具体日期,请询问。
- 如果用户未指定计划停止时间(或计划为无限期),请明确确认。
- 如果用户给出的金额币种模糊,请询问具体币种(美元/港元/人民币)。
经过一轮澄清后仍有不明确的信息,请勿继续操作——将问题反馈给用户,不要自行猜测。
When to use
使用场景
Trigger only on clear imperatives about recurring investment plans:
- "给 AAPL 每月 500 美元定投,每月 15 号"
- "create a weekly DCA on TSLA.US for 200 USD every Monday"
- "暂停定投 plan 12345" / "停止 700.HK 的定投"
Vague prompts ("帮我看看定投怎么样", "我应不应该定投") must be refused with a clarifying question — never trigger automated execution from advice-style prompts.
For read-only listing (, , , , , ) you may run the CLI directly without the preview/confirm gate. Mutations always need the gate.
longbridge dcalongbridge dca --status Activelongbridge dca history <PLAN_ID>longbridge dca statslongbridge dca check <SYMBOL>...longbridge dca calc-date ...仅在用户给出关于定期定额投资计划的明确指令时触发:
- “给AAPL每月定投500美元,每月15号”
- “create a weekly DCA on TSLA.US for 200 USD every Monday”
- “暂停定投计划12345” / “停止700.HK的定投”
对于模糊的请求(“帮我看看定投怎么样”、“我应不应该定投”),必须拒绝并请求用户明确需求——绝不能因咨询类请求触发自动执行操作。
对于只读类的列表操作(、、、、、),你可以直接运行CLI命令,无需经过预览/确认流程。变更类操作则必须遵循该流程。
longbridge dcalongbridge dca --status Activelongbridge dca history <PLAN_ID>longbridge dca statslongbridge dca check <SYMBOL>...longbridge dca calc-date ...Two-step protocol (mandatory)
两步式流程(强制要求)
Every mutation must run as two distinct turns:
- Preview — describe exactly what you are about to do (symbol, amount + currency, frequency, day-of-week / day-of-month, plan id for pause/resume/stop/update), in the user's language. Do not run the CLI yet. For , list every parameter on a separate line and explicitly note that this will execute real buy orders going forward.
create - Wait for explicit confirmation containing "确认 / yes / 是的 / confirm". If the user replies anything ambiguous, ask again — do not assume consent. Casual acknowledgements like "好" / "ok" / "嗯" alone are NOT confirmation for a — require an explicit "确认" / "confirm" / "是的".
create - Execute — only after step 2, run the actual command.
longbridge dca <subcommand> ...
所有变更操作必须分为两个独立步骤执行:
- 预览——用用户的语言准确描述即将执行的操作(标的代码、金额+币种、频率、每周定投日/每月定投日、暂停/恢复/停止/更新操作对应的计划ID)。此时不要运行CLI命令。对于创建计划操作,需将每个参数单独列一行,并明确提示该计划生效后会自动执行真实买入订单。
- 等待用户明确确认——用户回复需包含“确认/yes/是的/confirm”。如果用户回复模糊,请再次询问——不要默认用户同意。类似“好/ok/嗯”这类随意的回复不能作为创建计划的确认——必须要求用户给出明确的“确认/confirm/是的”。
- 执行——仅在完成步骤2后,运行实际的命令。
longbridge dca <subcommand> ...
CLI subcommands
CLI子命令
longbridge dcahistorystatscalc-datechecklongbridge dca <subcommand> --help| Action | CLI invocation (typical shape — verify with |
|---|---|
| List all plans | |
| Filter by status | |
| Filter by symbol | |
| Plan trade history (read) | |
| Stats summary (read) | |
| Calculate next trade date (read) | |
| Check symbol eligibility (read) | |
| Create monthly plan (mutating) | |
| Create weekly plan (mutating) | |
| Update an existing plan (mutating) | |
| Pause a plan (mutating) | |
| Resume a paused plan (mutating) | |
| Stop a plan permanently (mutating) | |
| Set pre-trade reminder hours | |
Other flags exist (start date, end date, daily / fortnightly frequency, etc.). The exact spelling can drift between CLI versions — always verify withbefore issuing the command, and quote the exact command back to the user in the preview.longbridge dca create --help
If the user gives a symbol but no plan id for pause/resume/stop/update, first run to look up the plan id and current status, then quote the id back in your preview before asking for confirmation.
longbridge dca --symbol <SYMBOL> --format jsonlongbridge dcahistorystatscalc-datechecklongbridge dca <subcommand> --help| 操作 | CLI调用示例(仅为典型格式——使用前请用 |
|---|---|
| 列出所有计划 | |
| 按状态筛选 | |
| 按标的代码筛选 | |
| 查看计划交易历史(只读) | |
| 查看统计摘要(只读) | |
| 计算下一次交易日期(只读) | |
| 检查标的是否支持定投(只读) | |
| 创建每月定投计划(变更) | |
| 创建每周定投计划(变更) | |
| 更新现有计划(变更) | |
| 暂停计划(变更) | |
| 恢复暂停的计划(变更) | |
| 永久停止计划(变更) | |
| 设置交易前提醒时长 | |
还存在其他参数(开始日期、结束日期、每日/每两周定投频率等)。具体的参数拼写可能随CLI版本变化——在执行命令前务必用验证,并在预览时将准确的命令复述给用户。longbridge dca create --help
如果用户给出标的代码但未提供暂停/恢复/停止/更新操作对应的计划ID,请先运行查询计划ID和当前状态,然后在预览时将ID复述给用户,再请求确认。
longbridge dca --symbol <SYMBOL> --format jsonPreview templates (LLM)
预览模板(LLM使用)
For (the highest-risk action):
create⚠️ 即将创建定投计划:
- 标的:{SYMBOL}
- 金额:{AMOUNT} {CURRENCY}
- 频率:{frequency}({day-of-week / day-of-month})
- 起始日:{start date}
- 结束:{end date 或 "无结束日,持续运行"}
此计划生效后,系统会按计划自动从你的账户下单买入。是否确认执行?(请回复"确认"/"confirm"/"是的")
⚠️ About to create a recurring investment plan:
- Symbol: {SYMBOL}
- Amount: {AMOUNT} {CURRENCY}
- Frequency: {frequency} ({day-of-week / day-of-month})
- Start date: {start date}
- End: {end date or "open-ended, runs until paused/stopped"}
Once active, the system will automatically place buy orders from your brokerage account on every scheduled date. Confirm? (Reply "confirm" / "yes" / "确认" to proceed.)
⚠️ 即將建立定投計劃:
- 標的:{SYMBOL}
- 金額:{AMOUNT} {CURRENCY}
- 頻率:{frequency}({day-of-week / day-of-month})
- 起始日:{start date}
- 結束:{end date 或 "無結束日,持續運行"}
此計劃生效後,系統會按計劃自動從你的賬戶下單買入。是否確認執行?(請回覆「確認」/「confirm」/「是的」)
For pause / resume / stop / update — list plan id + symbol + amount + frequency + new state, then ask:
- "即将暂停定投计划 12345 (AAPL.US,每月 500 USD,每月 15 号)。是否确认执行?"
- "About to permanently stop DCA plan 12345 (AAPL.US, 500 USD monthly). Confirm?"
- "即將恢復定投 12345。是否確認?"
对于创建计划操作(最高风险):
⚠️ 即将创建定投计划:
- 标的:{SYMBOL}
- 金额:{AMOUNT} {CURRENCY}
- 频率:{frequency}({每周定投日/每月定投日})
- 起始日:{start date}
- 结束:{end date 或 "无结束日,持续运行"}
此计划生效后,系统会按计划自动从你的账户下单买入。是否确认执行?(请回复"确认"/"confirm"/"是的")
⚠️ About to create a recurring investment plan:
- Symbol: {SYMBOL}
- Amount: {AMOUNT} {CURRENCY}
- Frequency: {frequency} ({day-of-week / day-of-month})
- Start date: {start date}
- End: {end date or "open-ended, runs until paused/stopped"}
Once active, the system will automatically place buy orders from your brokerage account on every scheduled date. Confirm? (Reply "confirm" / "yes" / "确认" to proceed.)
⚠️ 即將建立定投計劃:
- 標的:{SYMBOL}
- 金額:{AMOUNT} {CURRENCY}
- 頻率:{frequency}({每周定投日/每月定投日})
- 起始日:{start date}
- 結束:{end date 或 "無結束日,持續運行"}
此計劃生效後,系統會按計劃自動從你的賬戶下單買入。是否確認執行?(請回覆「確認」/「confirm」/「是的」)
对于暂停/恢复/停止/更新操作——列出计划ID+标的代码+金额+频率+新状态,然后询问:
- "即将暂停定投计划12345(AAPL.US,每月500 USD,每月15号)。是否确认执行?"
- "About to permanently stop DCA plan 12345 (AAPL.US, 500 USD monthly). Confirm?"
- "即將恢復定投12345。是否確認?"
OAuth scope
OAuth权限范围
DCA mutations require the trade scope. Without it, both CLI and MCP fail with / . Tell the user to and tick "Trade" in the browser. Read-only DCA listing also requires trade scope to view account-bound plan data.
unauthorizednot in authorized scopelongbridge auth logout && longbridge auth login定投变更操作需要trade scope权限。如果没有该权限,CLI和MCP都会返回/错误。请告知用户运行并在浏览器中勾选“Trade”选项。只读类的定投列表操作也需要trade scope权限才能查看与账户绑定的计划数据。
unauthorizednot in authorized scopelongbridge auth logout && longbridge auth loginError handling
错误处理
| Situation | LLM response |
|---|---|
Shell | Tell the user to install longbridge-terminal; MCP fallback may apply (see below) but only after user confirmation — never use MCP to bypass the preview / confirm protocol. |
stderr contains | Tell the user to run |
| Symbol not eligible for DCA | Run |
| Insufficient buying power on the scheduled date | This typically surfaces as a downstream order failure, not at create-time. Surface the message verbatim and ask the user how to proceed (top-up cash / pause / lower amount). |
Bad | Re-run |
| Other stderr | Surface verbatim. Do not silently retry — if a mutating call failed, ask the user before any second attempt. Money is involved; a silent retry could double-execute. |
| 场景 | LLM响应 |
|---|---|
Shell返回 | 告知用户安装longbridge-terminal;仅在用户确认后可使用MCP备选方案(见下文)——绝不能通过MCP绕过预览/确认流程。 |
标准错误输出包含 | 告知用户运行 |
| 标的代码不支持定投 | 运行 |
| 定投日账户购买力不足 | 这通常会表现为后续订单失败,而非创建计划时的错误。直接显示错误信息并询问用户如何处理(充值/暂停/降低定投金额)。 |
无效 | 重新运行 |
| 其他标准错误输出 | 直接显示错误信息。不要静默重试——如果变更操作失败,再次尝试前请询问用户。涉及资金操作,静默重试可能导致重复执行。 |
MCP fallback (only after confirmation)
MCP备选方案(仅在用户确认后使用)
If the CLI binary is unavailable, MCP equivalents may exist under names such as / / / . Tool names are environment-specific — discover them via rather than hard-coding.
mcp__longbridge__create_dca_planmcp__longbridge__pause_dca_planmcp__longbridge__stop_dca_planmcp__longbridge__list_dca_plansListMcpResourcesToolImportant: 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. The extra read-back-of-parameters rule applies in full to MCP calls.
如果CLI二进制文件不可用,可能存在MCP等效工具,名称类似///。工具名称因环境而异——请通过查找,不要硬编码。
mcp__longbridge__create_dca_planmcp__longbridge__pause_dca_planmcp__longbridge__stop_dca_planmcp__longbridge__list_dca_plansListMcpResourcesTool重要提示:使用MCP时仍需遵循预览/确认流程。MCP写入工具没有内置确认提示——本技能负责执行该验证环节。参数复述规则完全适用于MCP调用。
Related skills
相关技能
- — check cash balance and buying power before sizing a DCA plan.
longbridge-positions - — review existing exposure before adding a new recurring buy.
longbridge-portfolio - — review the actual fills produced by an active DCA plan.
longbridge-orders - — sanity-check current price vs. plan amount.
longbridge-quote
- ——在确定定投金额前检查账户现金余额和购买力。
longbridge-positions - ——在新增定投计划前查看现有持仓情况。
longbridge-portfolio - ——查看生效定投计划产生的实际成交订单。
longbridge-orders - ——核对当前价格与定投金额是否合理。
longbridge-quote
File layout
文件结构
longbridge-dca/
└── SKILL.md # prompt-only, no scripts/Prompt-only — no . Discover the latest CLI flags via . Because money is at stake, always run before issuing a or you have not run in this session.
scripts/longbridge dca <subcommand> --help--helpcreateupdatelongbridge-dca/
└── SKILL.md # 仅包含提示信息,无scripts/目录仅包含提示信息——无目录。通过获取最新的CLI参数。由于涉及资金操作,每次执行未在当前会话中运行过的创建或更新命令前,务必先运行。
scripts/longbridge dca <subcommand> --help--help