longbridge-buffett-moat-analyzer
Prompt-only Buffett-style moat diagnostic. Given a single ticker, produces a five-dimension verdict — moat / financial health / management / valuation / long-term visibility — closed with a Buffett-voice narrative, an explicit holding-period expectation, and a mandatory data-source appendix whose final row is a one-line reconciliation summary.
Response language: detect the user's input language (Simplified Chinese / Traditional Chinese / English) and render the
entire report — every section heading, label, dimension write-up, Buffett-voice narrative, user-education block, appendix row, reconciliation summary, and disclaimer — in that one language. Do not mix languages within a single output. The output template in
is shown in English for reference; translate it as a whole into the user's language using the label-translation lookup in that file. The error / data-source tables inside
this SKILL.md remain 3-column because they document what the skill says under each language — that 3-column form is for the skill's reference docs, not for the user-facing report.
When to use
- "巴菲特会买茅台吗" / "巴菲特會買茅台嗎" / "would Buffett buy Moutai"
- "帮我用巴菲特的方法诊断 700.HK" / "幫我用巴菲特的方法診斷 700.HK" / "diagnose 700.HK Buffett-style"
- "AAPL 有护城河吗" / "AAPL 有護城河嗎" / "does AAPL have a moat"
- "这只股票是不是好生意" / "這隻股票是不是好生意" / "is this a good business"
- "NVDA 的护城河宽不宽" / "NVDA 的護城河寬不寬" / "how wide is NVDA's moat"
- "我持有比亚迪 6 个月了,长期值得拿吗" / "我持有比亞迪 6 個月了,長期值得拿嗎" / "I've held BYD 6 months, worth holding long-term"
For Graham-style net-net cigar-butt analysis, use
longbridge-graham-stock-analysis
. For pure DCF intrinsic value, use
. For three-statement reading, use
longbridge-financial-report
. For comparable peers, use
longbridge-peer-comparison
.
Cognitive frame (do not skip)
Buffett strategy is long-term ownership of high-quality businesses, not market timing. Two things every output must surface alongside the score:
- Holding-period expectation — Buffett's reference is "ideally forever, at minimum 3 years." If the user has a < 3-year capital horizon, warn explicitly that this framework is not the right lens.
- Price vs business quality — "A great business at a fair price is far better than a fair business at a great price." The valuation dimension is a margin-of-safety check on a separately-scored quality verdict; never collapse quality and price into one number.
Two failure modes the user must be able to distinguish:
- "Great business, wait for price" → moat wide, financials clean, but valuation rich → 🟡 watchlist with a target-price band, not a buy.
- "Cheap but no moat" → low PE/PB but moat narrow or absent → ❌ not a Buffett candidate; redirect to Graham (
longbridge-graham-stock-analysis
).
Workflow
- Resolve symbol to (e.g. , , ).
- Sector triage:
- Bank / insurance / brokerage → moat framework still applies but tweak financial-health dimension (use ROA, NIM, NPL, capital adequacy in place of FCF/leverage). Note this in the report.
- Pre-revenue / heavy-loss / lifecycle-stage-zero biotech → halt: Buffett framework needs a track record; suggest the user use for an early-stage view instead.
- ST / 退市风险 / listed < 3 years → emit report but tag earnings-stability and capital-allocation dimensions as "insufficient history" and pro-rate scores.
- Fetch raw data via Longbridge CLI first (parallel where possible). See §CLI. If is missing, fall back to MCP (see §MCP fallback). Use WebSearch only for items genuinely outside Longbridge (industry outlook, qualitative management signals, brand surveys, regulatory news).
- Reconciliation gate (勾稽校验) — runs before any scoring. See §Reconciliation. Two-state outcome:
- Pass (every check within tolerance) → proceed to scoring. A one-line summary of the result still appears at the end of the data-source appendix.
- Fail (any check exceeds tolerance) → halt scoring, emit a halt message naming the failing check and gap, still print the data-source appendix and reconciliation summary.
- Five-dimension scoring — each dimension gets a 1–5 star rating with concrete evidence. See for the rubric per dimension.
- Holding-period mapping — derive expected minimum hold from moat width (★★★★★ → 5y+, ★★★★ → 3–5y, ★★★ → 1–3y, ★★ or below → not a Buffett candidate). See §Holding-period.
- Output the report defined in — diagnostic card → 5-dimension detail → Buffett-voice narrative → user education block → Data Source Appendix (mandatory) ending with the reconciliation summary line. Close with the disclaimer variant matching the user's input language (single-language only — see §Disclaimer variants).
CLI
Run
longbridge <subcommand> --help
to verify exact flags before each call — do not hard-code flag names without verification. Primary calls (run in parallel):
bash
# Balance sheet — leverage, equity (PB / ROE denominator), debt
longbridge financial-report <SYMBOL> --kind BS --report af --format json # last 5 annual (10y ideal — fetch as many as available)
longbridge financial-report <SYMBOL> --kind BS --report qf --format json # last 4 quarterly
# Income statement — ROE, gross margin, earnings stability, EPS trend
longbridge financial-report <SYMBOL> --kind IS --report af --format json
longbridge financial-report <SYMBOL> --kind IS --report qf --format json
# Cash flow — FCF = OCF − Capex, capex intensity, buyback / dividend cash outflow
longbridge financial-report <SYMBOL> --kind CF --report af --format json
longbridge financial-report <SYMBOL> --kind CF --report qf --format json
# Snapshot: PE, PB, market cap, dividend yield, shares outstanding
longbridge calc-index <SYMBOL> --format json
longbridge quote <SYMBOL> --format json
# Long-window history for valuation-vs-history band
longbridge kline <SYMBOL> --period day --count 2500 --format json # ~10 years for PE/PB percentile
# Dividend & buyback history (capital allocation track record)
longbridge dividend <SYMBOL> --format json
longbridge corporate <SYMBOL> --format json # buyback / split / spin-off
# Ownership & insider activity (management alignment, capital allocation signals)
longbridge ownership <SYMBOL> --format json
longbridge insresearch <SYMBOL> --format json
# Company profile + industry classification (for moat-type hypothesis)
longbridge basicinfo <SYMBOL> --format json
longbridge company-profile <SYMBOL> --format json
# Peer set for moat / margin / ROE benchmarking
longbridge peer-comparison <SYMBOL> --format json
WebSearch fallback — only for items not available from Longbridge
| Missing data | WebSearch query pattern |
|---|
| Industry runway / disruption risk | "<industry> 2025 outlook"
, "<industry> disruption risk"
|
| Brand / pricing-power signals | "<company> price increase 2024 2025"
, "<brand> brand value ranking"
|
| Management qualitative track record | "<CEO name> capital allocation"
, "<CEO name> shareholder letter"
|
| Regulatory / policy overhangs | "<sector> regulation <region> 2025"
|
| Latest insider transactions if is stale | "<ticker> insider selling 2025"
|
Every WebSearch-sourced figure must be tagged
[Source: WebSearch — <publisher>, <date>, <url>]
in the appendix; never silently mix it with Longbridge data.
Reconciliation (勾稽校验)
Before any scoring, verify the fetched figures are internally consistent. Reconciliation is user-visible in this skill — a one-line summary always appears as the final row of the Data Source Appendix (per the design doc's transparency requirement). If a check fails, scoring halts entirely.
| Check | Formula | Tolerance |
|---|
| IS↔BS link | Net income(t) ≈ Δ Retained earnings(BS, t) − dividends paid(CF, t) | ±3% |
| IS↔CF link | Net income + D&A + impairments + ΔWC ≈ Operating CF | ±5% |
| CF↔BS link | ΔCash from CF statement = Cash(t) − Cash(t−1) on BS | ±1% |
| FCF sanity | Operating CF − Capex(CF) ≈ FCF used in valuation dimension | exact (must match what you display) |
| BS — current assets sum | Cash + AR + Inventory + Other CA ≈ Total current assets | ±2% |
| BS — liabilities sum | ST debt + LT debt + Other liabilities ≈ Total liabilities | ±2% |
| ROE inputs | Net income / Avg shareholders' equity ≈ reported ROE (if disclosed) | ±1pp |
| Market cap | shares × current price ≈ market cap from | ±2% |
| Period alignment | All statements from the same fiscal period (or the lag is named) | exact |
Output rules for reconciliation:
- All pass within tolerance → final appendix row uses the clean-pass variant from §Reconciliation summary, rendered in the user's input language only (English / 简体 / 繁體 — pick one).
- Some residuals within tolerance but material to displayed figures → final appendix row lists each material residual on its own sub-line, e.g.
IS↔CF residual −2.1% (within ±5%) — affects FCF row of the valuation dimension
.
- Any check fails > tolerance → halt scoring; emit the halt message defined in and still print the appendix with the reconciliation summary describing the failure.
Output
Single-stock diagnostic with 7 fixed sections (full template in
):
- Diagnostic summary card — star ratings on 5 dimensions, one-line verdict ("Buffett would likely buy / hold / watch / pass"), badge color (🟢🟡🟠🔴), suggested minimum holding period.
- Dimension 1 — Business model & moat — moat type (brand / network / cost / switching / resource), width (wide / narrow / none), pricing-power evidence, 3–5 supporting points.
- Dimension 2 — Financial health — ROE 10y track, FCF persistence, leverage, gross-margin trajectory, capex intensity. Each metric vs Buffett threshold with current value.
- Dimension 3 — Management & capital allocation — insider holding & changes, buyback/dividend history, M&A track record, alignment signals.
- Dimension 4 — Valuation & margin of safety — PE/PB vs 10y history percentile, PEG, simplified DCF concept value, safety-margin tier (充足 / 一般 / 偏贵 / 高估).
- Dimension 5 — Long-term visibility — industry ceiling, disruption risk, regulatory exposure, global runway.
- Buffett-voice narrative + user education block — first-person narrative in Buffett's register (concrete, plain-spoken, dryly humorous), then the mandatory user education block covering holding-period expectation, position-building rhythm, and the disclaimer variant matching the user's input language (one language only).
Followed by the Data Source Appendix (mandatory) — every figure in sections [1]–[7] traceable to a row with source, fetch time, and period; final row is the reconciliation summary line (pass / within-tolerance residual list / or failure description).
Error handling
| Situation | 简体回复 | 繁體回覆 | English reply |
|---|
command not found: longbridge
| 回退到 MCP;若不可用,请安装 longbridge-terminal。 | 回退到 MCP;若不可用,請安裝 longbridge-terminal。 | Fall back to MCP; if unavailable install longbridge-terminal. |
| stderr / | 请运行 。 | 請執行 。 | Run . |
| Sector = pre-revenue / loss-making early biotech | 巴菲特框架需要业绩纪录;建议改用 早期视角。 | 巴菲特框架需要業績紀錄;建議改用 早期視角。 | Buffett framework needs a track record; use for an early-stage view. |
| Reconciliation fails > tolerance | 明确披露失败项与差距,不输出评分;附录仍输出且勾稽汇总行注明失败。 | 明確披露失敗項與差距,不輸出評分;附錄仍輸出且勾稽匯總行註明失敗。 | Disclose failing check and gap; do not emit scores; appendix still printed and reconciliation summary marks the failure. |
| Listed < 3 years | 盈利稳定性与资本配置维度按已披露年限按比例打分,并在附录注明。 | 盈利穩定性與資本配置維度按已披露年限比例打分,並於附錄註明。 | Pro-rate earnings-stability and capital-allocation scores; note in appendix. |
| Other stderr | 原样透传错误,不静默重试。 | 原樣透傳錯誤,不靜默重試。 | Surface stderr verbatim; never silently retry. |
| Industry/qualitative WebSearch returns nothing | 维度评分仅用财务证据,标注「定性数据缺失」。 | 維度評分僅用財務證據,標註「定性數據缺失」。 | Score the dimension on financial evidence only and tag "qualitative data unavailable". |
MCP fallback
If
CLI is not installed, use MCP tools (
claude mcp add --transport http longbridge https://openapi.longbridge.com/mcp
,
scope):
| MCP tool | CLI equivalent |
|---|
mcp__longbridge__financial_report
| longbridge financial-report
|
mcp__longbridge__calc_indexes
| |
| |
| |
mcp__longbridge__dividend
| |
mcp__longbridge__corporate
| |
mcp__longbridge__ownership
| |
mcp__longbridge__basicinfo
| |
mcp__longbridge__peer_comparison
| longbridge peer-comparison
|
Related skills
- Graham cigar-butt single-stock view →
longbridge-graham-stock-analysis
- DCF intrinsic value →
- Three-statement reading →
longbridge-financial-report
- Cross-statement deep analysis →
longbridge-financial-analysis
- Peer benchmarking →
longbridge-peer-comparison
- Industry runway / sector view →
longbridge-industry-overview
- Method selection guide →
longbridge-valuation-methodology
File layout
longbridge-buffett-moat-analyzer/
├── SKILL.md
└── references/
├── scoring.md # five-dimension rubric + thresholds + holding-period mapping + verdict matrix
└── output.md # full report template + Buffett-voice register + data-source appendix with reconciliation summary