longbridge-peer-comparison
Prompt-only skill that takes 2–5 symbols, runs the same per-symbol orchestration concurrently, and renders one normalised matrix.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
When to use
- "茅台 五粮液 哪个便宜", "AAPL vs GOOG vs MSFT"
- "NVDA AMD 哪个增速快", "科技七姐妹谁最强"
- "茅台跟 700 谁估值低" (cross-currency + cross-industry — render with explicit disclaimer)
Symbol-count rules
| Count |
Behaviour |
| 0 |
Ask: "Which symbols would you like to compare?" |
| 1 |
Reroute → longbridge-valuation (#14) or longbridge-fundamental (#15) |
| 2–5 |
Run normally |
| ≥ 6 |
Ask user to narrow to 3–5 ("matrix becomes unreadable beyond 5") |
Cross-cohort caveats
- Cross-currency (e.g.
NVDA.US + 600519.SH) → render the matrix; add an explicit disclaimer at the top of the table: "cross-currency comparison shows relative levels only; no FX conversion is applied".
- Cross-industry (e.g. tech + spirits) → render the matrix; add: "cross-industry comparison has limited meaning — valuation thresholds are not comparable".
- Cross-market (different accounting standards: IFRS / US GAAP / CN GAAP) → add: "data uses different accounting standards; treat as a rough benchmark."
CLI
Run longbridge --help to see all available subcommands, then longbridge <subcommand> --help before calling. Types of data needed per symbol (run concurrently for all symbols):
- Real-time quote (last price, change)
- Valuation indices (PE, PB, PS, dividend yield, market cap)
- Financial KPIs from the most recent report (revenue, net income, ROE) — headline figures only, not full statements
- Historical valuation data
# Always check flags first, then call — example structure:
longbridge <subcommand> NVDA.US --format json
Workflow
Resolve every symbol to <CODE>.<MARKET>. Apply the count rules above.
Concurrently per symbol, call CLI commands (see CLI section). If longbridge is not installed, fall back to MCP.
Do not pull the full IS/BS/CF — financial-report headline fields are enough for the KPIs.
Normalise (label currency on every figure; do not auto-convert FX). Render as a Markdown table — rows are dimensions, columns are symbols.
Add the observations paragraph at the bottom (data-only, no winners).
Output template
{symbol₁ vs symbol₂ vs ...} comparison — Source: Longbridge Securities
[If cross-currency / cross-industry / cross-market: disclaimer here]
| Dimension | Symbol₁ | Symbol₂ | Symbol₃ |
|---|---|---|---|
| Last (CCY) | ... | ... | ... |
| Today's change | ... | ... | ... |
| Market cap | ... | ... | ... |
| **Valuation** | | | |
| PE (TTM) | ... | ... | ... |
| PB | ... | ... | ... |
| PS | ... | ... | ... |
| Dividend yield | ... | ... | ... |
| **Financials (latest period)** | | | |
| Revenue YoY | ... | ... | ... |
| Net income YoY | ... | ... | ... |
| ROE | ... | ... | ... |
[Observations]
- Valuation: who is highest / lowest on PE / PB / PS
- Growth: who leads on revenue / net income YoY
- Dividend: highest yield
- Scale: market-cap ratios
⚠️ 以上数据仅供参考,不构成投资建议。/ 以上數據僅供參考,不構成投資建議。/ For reference only. Not investment advice.
(Translate into the user's language; keep numerics + ticker symbols verbatim.)
Output constraints
- Must be a Markdown table, dimensions × symbols.
- Must label currency on every numeric figure (CNY / USD / HKD / SGD); no auto-FX conversion.
- Must end with not-investment-advice disclaimer.
- Cross-currency / cross-industry / cross-market → must include the disclaimer at the top of the table.
Performance note
2–5 symbols × 4 tools = 8–20 MCP calls. Latency may be visible. If the user gives 5 symbols, optionally tell them "comparing 5 symbols, fetching in parallel..." before delivering.
Error handling
| Situation |
Reply |
command not found: longbridge |
Fall back to MCP; if MCP also unavailable, tell user to install longbridge-terminal. |
| Some symbols' data missing |
Render N/A in those rows; explain which symbol(s) failed |
| 1 symbol only |
Reroute to longbridge-valuation / longbridge-fundamental |
| ≥ 6 symbols |
Trim to top 5; tell user the rest are dropped |
stderr not logged in |
Tell user to run longbridge auth login. |
MCP fallback
If longbridge CLI is not installed (command not found), use MCP tools instead (per symbol):
When the CLI is unavailable, fall back to the MCP server. Discover available tools from the MCP server's tool list at runtime — do not rely on hardcoded tool names.
MCP setup: claude mcp add --transport http longbridge https://openapi.longbridge.com/mcp (quote scope).
Related skills
- Single-symbol valuation drill-down →
longbridge-valuation
- Single-symbol fundamentals drill-down →
longbridge-fundamental
- Recent news on a specific name →
longbridge-news
File layout
longbridge-peer-comparison/
└── SKILL.md # prompt-only, no scripts/
1---2name: longbridge-peer-comparison3description: Cross-symbol comparison (2–5 stocks) via Longbridge — valuation (PE / PB / PS / dividend yield), current price + change, latest financial KPIs (revenue / net income / ROE), market cap. Renders as a single matrix; flags cross-currency or cross-industry caveats. Triggers: "X 和 Y 哪个值得买", "X vs Y", "几只股票对比", "同行业谁最强", "X 跟 Y 谁更便宜", "几只哪个增速快", "科技七姐妹谁最强", "X 跟 Y 對比", "X 跟 Y 哪個便宜", "X vs Y", "compare X and Y", "peer comparison", "which is more expensive", "which has higher growth".4license: MIT5---6
7# longbridge-peer-comparison
8
9Prompt-only skill that takes 2–5 symbols, runs the same per-symbol orchestration concurrently, and renders one normalised matrix.
10
11> **Response language**: match the user's input language — Simplified Chinese / Traditional Chinese / English.
12
13## When to use
14
15- *"茅台 五粮液 哪个便宜"*, *"AAPL vs GOOG vs MSFT"*
16- *"NVDA AMD 哪个增速快"*, *"科技七姐妹谁最强"*
17- *"茅台跟 700 谁估值低"* (cross-currency + cross-industry — render with explicit disclaimer)
18
19## Symbol-count rules
20
21| Count | Behaviour |
22|---|---|
23| 0 | Ask: *"Which symbols would you like to compare?"* |
24| **1** | Reroute → `longbridge-valuation` (#14) or `longbridge-fundamental` (#15) |
25| 2–5 | Run normally |
26| ≥ 6 | Ask user to narrow to 3–5 ("matrix becomes unreadable beyond 5") |
27
28## Cross-cohort caveats
29
30- **Cross-currency** (e.g. `NVDA.US` + `600519.SH`) → render the matrix; add an explicit disclaimer at the top of the table: *"cross-currency comparison shows relative levels only; no FX conversion is applied"*.
31- **Cross-industry** (e.g. tech + spirits) → render the matrix; add: *"cross-industry comparison has limited meaning — valuation thresholds are not comparable"*.
32- **Cross-market** (different accounting standards: IFRS / US GAAP / CN GAAP) → add: *"data uses different accounting standards; treat as a rough benchmark."*
33
34## CLI
35
36Run `longbridge --help` to see all available subcommands, then `longbridge <subcommand> --help` before calling. Types of data needed per symbol (run concurrently for all symbols):
37
38- Real-time quote (last price, change)
39- Valuation indices (PE, PB, PS, dividend yield, market cap)
40- Financial KPIs from the most recent report (revenue, net income, ROE) — headline figures only, not full statements
41- Historical valuation data
42
43```bash
44# Always check flags first, then call — example structure:
45longbridge <subcommand> NVDA.US --format json
46```
47
48## Workflow
49
501. Resolve every symbol to `<CODE>.<MARKET>`. Apply the count rules above.
512. **Concurrently per symbol**, call CLI commands (see CLI section). If `longbridge` is not installed, fall back to MCP.
523. **Do not** pull the full IS/BS/CF — `financial-report` headline fields are enough for the KPIs.
53
544. Normalise (label currency on every figure; **do not** auto-convert FX). Render as a Markdown table — rows are dimensions, columns are symbols.
555. Add the **observations** paragraph at the bottom (data-only, no winners).
56
57## Output template
58
59```
60{symbol₁ vs symbol₂ vs ...} comparison — Source: Longbridge Securities
61[If cross-currency / cross-industry / cross-market: disclaimer here]
62
63| Dimension | Symbol₁ | Symbol₂ | Symbol₃ |
64|---|---|---|---|
65| Last (CCY) | ... | ... | ... |
66| Today's change | ... | ... | ... |
67| Market cap | ... | ... | ... |
68| **Valuation** | | | |
69| PE (TTM) | ... | ... | ... |
70| PB | ... | ... | ... |
71| PS | ... | ... | ... |
72| Dividend yield | ... | ... | ... |
73| **Financials (latest period)** | | | |
74| Revenue YoY | ... | ... | ... |
75| Net income YoY | ... | ... | ... |
76| ROE | ... | ... | ... |
77
78[Observations]
79- Valuation: who is highest / lowest on PE / PB / PS
80- Growth: who leads on revenue / net income YoY
81- Dividend: highest yield
82- Scale: market-cap ratios
83
84⚠️ 以上数据仅供参考,不构成投资建议。/ 以上數據僅供參考,不構成投資建議。/ For reference only. Not investment advice.
85```
86
87(Translate into the user's language; keep numerics + ticker symbols verbatim.)
88
89## Output constraints
90
91- **Must** be a Markdown table, dimensions × symbols.
92- **Must** label currency on every numeric figure (CNY / USD / HKD / SGD); no auto-FX conversion.
93- **Must** end with not-investment-advice disclaimer.
94- Cross-currency / cross-industry / cross-market → **must** include the disclaimer at the top of the table.
95
96## Performance note
97
982–5 symbols × 4 tools = 8–20 MCP calls. Latency may be visible. If the user gives 5 symbols, optionally tell them *"comparing 5 symbols, fetching in parallel..."* before delivering.
99
100## Error handling
101
102| Situation | Reply |
103|---|---|
104| `command not found: longbridge` | Fall back to MCP; if MCP also unavailable, tell user to install longbridge-terminal. |
105| Some symbols' data missing | Render N/A in those rows; explain which symbol(s) failed |
106| 1 symbol only | Reroute to `longbridge-valuation` / `longbridge-fundamental` |
107| ≥ 6 symbols | Trim to top 5; tell user the rest are dropped |
108| stderr `not logged in` | Tell user to run `longbridge auth login`. |
109
110## MCP fallback
111
112If `longbridge` CLI is not installed (`command not found`), use MCP tools instead (per symbol):
113
114When the CLI is unavailable, fall back to the MCP server. Discover available tools from the MCP server's tool list at runtime — do not rely on hardcoded tool names.
115
116MCP setup: `claude mcp add --transport http longbridge https://openapi.longbridge.com/mcp` (`quote` scope).
117
118## Related skills
119
120- Single-symbol valuation drill-down → `longbridge-valuation`
121- Single-symbol fundamentals drill-down → `longbridge-fundamental`
122- Recent news on a specific name → `longbridge-news`
123
124## File layout
125
126```
127longbridge-peer-comparison/
128└── SKILL.md # prompt-only, no scripts/
129```