The longbridge CLI's security-list endpoint no longer hits the intermittent
param_error described in earlier docs. The behaviour now is an explicit
scope-limit message — "Only US market is supported for security-list
(Longbridge API only exposes the Overnight category)" — when invoked with
HK / CN / SG. That's a documented limitation, not a bug, so the special-case
"prefer MCP for security-list" treatment is no longer warranted.
CLAUDE.md §6 (Path selection):
- Drop "A specific subcommand has known issues (e.g. security-list
param_error)" bullet.
- Drop the "Mark exceptions in the SKILL.md explicitly:" intro line — the
remaining two exceptions (analysis tier + mutating watchlist-admin) read
cleanly without the umbrella phrase.
docs/architecture.md:
- "Four exceptions" → "Three exceptions" — drop the security-list row.
- Decision flow: drop the "Skill declares MCP-preferred?" branch.
- Error-handling table: drop the param_error/security-list row (the
generic invalid-symbol param_error guidance stays in per-skill error
tables where it's still useful).
- Maintainer guidelines: drop "MCP-preferred → add Path-selection note"
bullet (no skill needs that pattern anymore).
- Maintainer guideline §5 wording aligned with the recent prompt-only
+ scripts-allowed-when-justified convention.
docs/install.md:
- FAQ entry "param_error on security-list securities" → "Only US market
is supported for security-list" with updated guidance (route the user
to longbridge-quote for non-US per-symbol lookups).
skills/longbridge-security-list/SKILL.md:
- Description rewritten to reflect US-only scope (was ambiguously "per
market"). Triggers updated to drop "港股一共多少", "list of HK stocks"
etc. that no longer apply.
- Subcommand table: positional <MARKET> defaulting to HK is gone — the
CLI takes no market arg and only returns US overnight names.
- Drop "Path-selection note" section. The MCP fallback table no longer
marks one entry "prefer MCP".
- Error handling: replace param_error wording with the actual scope-limit
message and tell the LLM how to redirect the user.
Triggered by validation against longbridge v0.7.0+: `longbridge
security-list HK --format json` now returns the explicit scope error
above; no param_error occurs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Loosen the previously absolute "fully prompt-only / no Python wrappers"
stance to admit two opt-in subfolders with concrete justification.
CLAUDE.md:
- "What this repo is": from "All skills are prompt-only — no Python wrappers
anywhere" to "Default style: prompt-only; scripts/ and commands/ allowed
for clear runtime needs (DOCX, charts, slash commands)".
- Layout tree: list scripts/ and commands/ as optional siblings of references/.
- §5 renamed "No Python wrappers" → "CLI calls — prefer prompt-only, but
scripts/ is allowed when justified". Spell out concrete justifications
(DOCX/XLSX/PDF generation, chart helpers with bilingual fonts, runtime
safety gates) and the narrow-helper guideline (one job, takes CLI args,
no business templates baked in).
- New §5b documents commands/ as the Claude Code slash-command pattern.
- Quick checklist gains explicit steps for adding scripts/ and commands/
when justified.
- Anti-patterns: replace blanket "no wrappers" with the targeted "do not
re-wrap the longbridge CLI itself with hard-coded flags".
docs/architecture.md:
- "All 19 skills are now prompt-only" callout → "Default style: prompt-only;
scripts/ and commands/ are opt-in for runtime needs."
- "17 skills with no Python wrapper" phrasing → "prompt-only skills (the
default style — no scripts/cli.py between the LLM and longbridge)".
- Closing paragraph updated to reflect the optional-helper stance.
Triggered by PR #1 (longbridge-earnings) which legitimately needs DOCX +
matplotlib helpers; under the old phrasing those would have been blocking,
under the new phrasing they're acceptable as long as they stay narrow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After surveying longbridge-mcp's 110 tools and finding the CLI is a strict
subset, the gap is analysis: questions like "is X expensive", "compare A vs
B", "how is my portfolio doing", "what's the latest news on X" need
multi-tool orchestration the CLI can't supply.
Five new prompt-only skills (no cli.py — they orchestrate MCP tools and
chain to existing CLI skills):
- #14 估值分析: valuation + valuation_history + industry_valuation +
industry_valuation_dist + chain to 行情查询
- #15 基本面分析: financial_report (IS/BS/CF) + dividend + forecast_eps +
consensus + company + operating + corp_action
- #16 同行对比: multi-symbol parallel quote + calc_indexes +
latest_financial_report + valuation; aggregates table
- #17 投资组合分析:profit_analysis + profit_analysis_detail +
exchange_rate + chain 持仓查询; needs trade-scope token
- #18 资讯舆情: news + filings + topic + topic_detail + topic_replies
with WebSearch fallback for breaking news
Cross-cutting design constraints (encoded in each SKILL.md):
- All five output structured analysis (categorized, summarized, not raw
dumps); each must end with "不构成投资建议"
- #16 caps comparison at 5 symbols; reroutes to #14/#15 for single symbol
- #17 chains to #14/#15 instead of giving rebalance suggestions
- #18 must classify news (catalyst/regulatory/strategic/financial/opinion)
and avoid "利好/利空" original language
- Front-matter introduces requires_mcp: true to gate skill on MCP install
(`claude mcp add --transport http longbridge ...`)
Protocol updated to differentiate 读取层(#01-13, cli.py-based) from
分析层(#14-18, prompt-only, MCP-strong-dep). Catalog reorganized into
the two tiers with completion checkmarks on the 12 implemented read-tier
skills.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each SKILL.md now has a "## MCP 备选" section mapping its cli.py paths to
equivalent mcp__longbridge__<tool> calls. LLM defaults to cli.py (faster
local subprocess), falls back to MCP when binary_not_found, or routes
straight to MCP for capabilities CLI doesn't expose.
Protocol updated to make this section #9 (mandatory) and to document the
"MCP + CLI dual-path" routing rule. Mutating skills (#11/#12) keep the
dry-run + confirm flow regardless of path.
Notes:
- 实时订阅: MCP has no equivalent (stateless HTTP, no subscription
concept) — this is documented in its fallback section
- 盘口深度/all combo: MCP has no all-combo tool, falls back to LLM
composing depth + brokers + trades
- 持仓查询/订单与成交: same OAuth scope limitation applies on both paths
- 证券查找: MCP recommended over CLI when CLI returns longbridge-side
param_error
User must register MCP once with:
claude mcp add --transport http longbridge https://openapi.longbridge.com/mcp
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
All 12 unit tests + 3 real-account smoke tests + 6-prompt Claude Code
integration tests passed on 2026-04-28. Skill is live at
~/.claude/skills/longbridge-quote.
Notes the differences from the original 10-task plan: protocol
front-matter fields, envelope source/skill/skill_version, renamed
error_kind enum, new Task 11 (--index calc-index merge), --timeout
flag, 12 total unit tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After surveying iwencai SkillHub (9 official skills, sample SKILL.md/cli.py
zips snapshotted to clawdbot-skills/_iwencai-snapshot/), commit a full design
catalog covering all 30+ longbridge subcommands as 13 skills, with a shared
platform protocol so each skill spec only writes its business differential.
- skill-platform-protocol.md: directory layout, SKILL.md sections, cli.py
interface, error_kind enum (7), JSON envelope, test pattern, deployment
- skill-catalog.md: priority waves P0..P3, subcommand mapping, decisions
- 13 differential designs: quote, kline, depth, capital-flow, market-temp,
derivatives, security-list, positions, orders, watchlist (read), trading
(risk), watchlist (write), subscriptions
- skill-11 trading: 5 safety gates, default_install:false, 4 prerequisites
to resolve before plan stage
- README: family overview + trading-skill warning section
Implementation plan stays incremental — MVP plan for 行情查询 (#01) is
unchanged; other skills will get their own plans in priority-wave batches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>