longbridge-constituent
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-constituent
longbridge-constituent
List the constituent stocks of an index or ETF, ranked by a chosen indicator.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
列出指数或ETF的成分股,并按选定指标排序。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。
When to use
使用场景
Trigger when the user wants the members of an index or ETF (not the index quote itself):
- "标普 500 有哪些股票", "S&P 500 constituents" →
SPX.US - "恒生指数成分股", "Hang Seng constituents" →
HSI.HK - "纳斯达克 100 涨幅榜", "IXIC components by gain" →
IXIC.US - "沪深 300 成分股", "CSI 300 members" →
000300.SH - "QQQ 持仓", "SPY holdings" → ETF symbol like ,
QQQ.USSPY.US
For the index quote (level, change, volume), use instead. For 2–5 explicit-symbol comparison, use .
longbridge-quotelongbridge-peer-comparison当用户想要获取指数或ETF的成分股(而非指数报价本身)时触发:
- "标普 500 有哪些股票", "S&P 500 constituents" →
SPX.US - "恒生指数成分股", "Hang Seng constituents" →
HSI.HK - "纳斯达克 100 涨幅榜", "IXIC components by gain" →
IXIC.US - "沪深 300 成分股", "CSI 300 members" →
000300.SH - "QQQ 持仓", "SPY holdings" → ETF代码,如,
QQQ.USSPY.US
若需获取指数报价(点位、涨跌幅、成交量),请使用;若需对2–5个明确代码进行对比,请使用。
longbridge-quotelongbridge-peer-comparisonSymbol format
代码格式
<CODE>.<MARKET>| Index | Symbol |
|---|---|
| 恒生指数 / Hang Seng | |
| 国企指数 / HSCEI | |
| 标普 500 / S&P 500 | |
| 道琼斯 / Dow Jones | |
| 纳斯达克综合 / Nasdaq | |
| 纳指 100 / Nasdaq 100 | |
| 沪深 300 / CSI 300 | |
| 上证指数 / SSE Composite | |
ETFs use their own ticker (e.g. , , ).
SPY.USQQQ.US2800.HK<CODE>.<MARKET>| 指数 | 代码 |
|---|---|
| 恒生指数 / Hang Seng | |
| 国企指数 / HSCEI | |
| 标普 500 / S&P 500 | |
| 道琼斯 / Dow Jones | |
| 纳斯达克综合 / Nasdaq | |
| 纳指 100 / Nasdaq 100 | |
| 沪深 300 / CSI 300 | |
| 上证指数 / SSE Composite | |
ETF使用自身代码(如, , )。
SPY.USQQQ.US2800.HKSubcommand
子命令
Single CLI command. Runif unsure of current flags.longbridge constituent --help
bash
longbridge constituent <SYMBOL> [--limit N] [--sort INDICATOR] [--order desc|asc] --format json| Flag | Default | Notes |
|---|---|---|
| | Number of members to return |
| | |
| | |
单一CLI命令。若不确定当前参数,请运行。longbridge constituent --help
bash
longbridge constituent <SYMBOL> [--limit N] [--sort INDICATOR] [--order desc|asc] --format json| 参数 | 默认值 | 说明 |
|---|---|---|
| | 返回的成分股数量 |
| | 排序指标: |
| | 排序方向: |
Workflow
工作流程
- Resolve the user's index/ETF name to (use the table above; if ambiguous between markets, ask).
<CODE>.<MARKET> - Pick from intent:
--sort- "涨幅榜 / gainers" →
--sort change --order desc - "跌幅榜 / losers" →
--sort change --order asc - "成交活跃 / most traded" →
--sort turnover - "主力净流入 / net inflow" →
--sort inflow - "权重股 / largest weight" →
--sort market-cap
- "涨幅榜 / gainers" →
- Pick : default 50 unless user specifies (e.g. "前 10" →
--limit).--limit 10 - Run , render the rows in a table.
longbridge constituent ... --format json
- 将用户输入的指数/ETF名称解析为格式(参考上表;若市场存在歧义,请询问用户)。
<CODE>.<MARKET> - 根据用户意图选择参数:
--sort- "涨幅榜 / gainers" →
--sort change --order desc - "跌幅榜 / losers" →
--sort change --order asc - "成交活跃 / most traded" →
--sort turnover - "主力净流入 / net inflow" →
--sort inflow - "权重股 / largest weight" →
--sort market-cap
- "涨幅榜 / gainers" →
- 选择参数:默认50,除非用户指定(如"前 10" →
--limit)。--limit 10 - 运行命令,将结果以表格形式展示。
longbridge constituent ... --format json
CLI examples
CLI示例
bash
longbridge constituent HSI.HK --format json
longbridge constituent HSI.HK --limit 20 --sort change --format json
longbridge constituent SPX.US --sort market-cap --limit 10 --format json
longbridge constituent IXIC.US --sort inflow --order desc --format json
longbridge constituent 000300.SH --sort turnover --limit 30 --format json
longbridge constituent QQQ.US --format jsonbash
longbridge constituent HSI.HK --format json
longbridge constituent HSI.HK --limit 20 --sort change --format json
longbridge constituent SPX.US --sort market-cap --limit 10 --format json
longbridge constituent IXIC.US --sort inflow --order desc --format json
longbridge constituent 000300.SH --sort turnover --limit 30 --format json
longbridge constituent QQQ.US --format jsonOutput
输出结果
JSON array, one row per constituent — fields typically include , , , , , , , plus the indicator used for sorting. Render as a 5–8 column table; preserve verbatim.
symbolnamelastchange_ratevolumeturnovermarket_capsymbolJSON数组,每个元素对应一只成分股——字段通常包括, , , , , , ,以及用于排序的指标。将结果渲染为5–8列的表格;字段保留原始格式。
symbolnamelastchange_ratevolumeturnovermarket_capsymbolError handling
错误处理
| Situation | LLM response |
|---|---|
Shell | Fall back to MCP if configured; otherwise tell the user to install longbridge-terminal. |
stderr | Confirm the index symbol — e.g. |
| Empty array | "No constituents returned — confirm the symbol is an index or ETF, not a single stock." |
| Other stderr | Surface verbatim. |
| 场景 | LLM响应内容 |
|---|---|
Shell提示 | 若已配置MCP则回退到MCP;否则告知用户安装longbridge-terminal。 |
标准错误输出 | 确认指数代码——例如使用 |
| 返回空数组 | "未返回成分股——请确认该代码对应指数或ETF,而非单只股票。" |
| 其他标准错误输出 | 直接展示原始错误信息。 |
MCP fallback
MCP回退方案
| CLI subcommand | MCP tool |
|---|---|
| |
If unsure of the exact MCP tool name, run the CLI; the binary is the canonical path.
| CLI子命令 | MCP工具 |
|---|---|
| |
若不确定具体MCP工具名称,请运行CLI命令;二进制文件为权威路径。
Related skills
相关技能
| User asks | Route to |
|---|---|
| Index level / change / volume | |
| 2–5 explicit-symbol comparison | |
| Single-stock fundamentals after picking from the list | |
| Single-stock valuation snapshot | |
| 用户提问内容 | 路由至 |
|---|---|
| 指数点位/涨跌幅/成交量 | |
| 2–5个明确代码对比 | |
| 从列表中选择单只股票后查询基本面 | |
| 单只股票估值快照 | |
File layout
文件结构
longbridge-constituent/
└── SKILL.md # prompt-only, no scripts/longbridge-constituent/
└── SKILL.md # 仅含提示词,无scripts/目录