mirror of
https://github.com/longbridge/skills.git
synced 2026-09-14 20:37:00 +08:00
endless/task-21
12 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
da5181ecca |
docs: add longbridge-elliott-wave to README + install guide (PR #28)
- README: 120→124 skills; add elliott-wave⁶ to Technical analysis group - install.md: add pandas/numpy entry to Python libraries table; update 'Install all' command Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
b264a6fd1e |
feat: add 60 new skills (batch 2) — options, portfolio, quant, research, frameworks (#18)
## Summary Adds 60 new skills bringing the total from 50 → 110. All skills pass repo convention checks: trilingual triggers (Simplified / Traditional Chinese / English), 3-column error handling tables, `--format json` CLI examples, `--help` discovery pattern, ≤ 200 lines. ### New skills by category **Options & derivatives (4)** - `longbridge-options-volatility` — IV vs HV, vol smile/skew, IV percentile - `longbridge-options-pnl` — payoff diagrams, breakevens, Greeks sensitivity - `longbridge-options-strategy` — strategy selection matrix (bullish/bearish/neutral × IV) - `longbridge-options-advanced` — calendar/diagonal spreads, delta hedging, vol arb, skew trading **ETF & filings (2)** - `longbridge-etf-analysis` — 5-dimension ETF analysis (TE, liquidity, premium/discount) - `longbridge-sec-filings` — SEC 10-K/10-Q/8-K/Form4/Proxy extraction and analysis **Portfolio & risk (7)** - `longbridge-portfolio-diagnosis` — concentration, factor exposure, correlation risk - `longbridge-portfolio-rebalance` — drift analysis and rebalancing recommendations - `longbridge-asset-allocation` — MPT, Black-Litterman, risk parity frameworks - `longbridge-risk-analysis` — VaR, CVaR, max drawdown, Sharpe, historical scenario stress tests - `longbridge-tax-harvesting` — tax-loss harvesting with wash-sale tracking - `longbridge-financial-planning` — retirement/savings/education planning - `longbridge-risk-return` — risk-adjusted portfolio optimisation **Value & screening (3)** - `longbridge-value-screen` — PE/PB/ROE/dividend multi-factor value screener - `longbridge-dividend-screen` — high-dividend sustainability analysis - `longbridge-smallcap-growth` — small-cap / 专精特新 growth stock discovery **Research & events (8)** - `longbridge-stock-research` — comprehensive equity research snapshot - `longbridge-coverage-initiation` — 5-step first coverage report framework - `longbridge-industry-overview` — sector full-landscape report - `longbridge-morning-brief` — daily morning briefing / 晨会纪要 - `longbridge-thesis-tracker` — investment thesis tracking and validation - `longbridge-investment-ideas` — systematic idea generation (quant + thematic) - `longbridge-event-strategy` — event-driven trading framework - `longbridge-event-opportunity` — corporate event opportunity capture (M&A/buyback/index) **Quantitative strategies (7)** - `longbridge-volatility-strategy` — HV percentile mean-reversion vol strategy - `longbridge-seasonality` — month/DOW/holiday/earnings-season calendar effects - `longbridge-pairs-trading` — cointegration test, hedge ratio, Z-score signal - `longbridge-ml-strategy` — sklearn walk-forward ML prediction framework - `longbridge-performance-attribution` — Brinson attribution, factor alpha/beta - `longbridge-correlation` — rolling correlation, cointegration, half-life - `longbridge-multifactor` — cross-sectional multi-factor scoring and TopN portfolio **Frameworks & methodology (8)** - `longbridge-valuation-methodology` — DCF/DDM/SOTP/EV-EBITDA methodology guide - `longbridge-dcf` — step-by-step DCF model with Longbridge financial data - `longbridge-factor-research` — IC/IR factor effectiveness analysis - `longbridge-hedging` — beta hedge, protective put, tail-risk hedging - `longbridge-behavioral-finance` — 6 bias signals (overreaction, herding, anchoring…) - `longbridge-quant-stats` — ADF/GARCH/DW/Bootstrap statistical methods - `longbridge-regulatory-kb` — A-share/HK/US/crypto regulatory knowledge base - `longbridge-execution-model` — slippage model, VWAP/TWAP, market impact **Market data & cross-market (9)** - `longbridge-adr-premium` — ADR / H-share / A-share cross-market premium analysis - `longbridge-etf-flow` — US sector ETF fund flow and rotation signals - `longbridge-fx-carry` — FX carry trade analysis - `longbridge-index-quote` — dedicated index quote skill (SPX/HSI/CSI300/NDX…) - `longbridge-investment-proposal` — structured investment proposal generation - `longbridge-company-profile` — pitch-book company profile page - `longbridge-supply-chain` — value-chain / supply-chain analysis - `longbridge-competitive-analysis` — Porter five forces + peer benchmarking - `longbridge-company-tearsheet` — high-density one-pager snapshot **Financial data queries (7)** - `longbridge-basicinfo` — static reference data for all securities - `longbridge-business-query` — operating revenue breakdown and segment data - `longbridge-finance-query` — multi-symbol financial metrics batch query - `longbridge-insresearch` — analyst rating distribution and consensus target price - `longbridge-ownership` — shareholder structure and major holder list - `longbridge-market-scanner` — comprehensive quote + technical + capital-flow scan - `longbridge-sector-screener` — sector ranking by momentum/flow/valuation **Crypto/DeFi (2, partial)** - `longbridge-defi-yield` — DeFi yield analysis (Longbridge `.HAS` crypto + WebSearch) - `longbridge-onchain` — on-chain data analysis (Longbridge `.HAS` + external APIs) --- ## Test plan - [x] All 60 SKILL.md files validated: slug=name, description ≤ 1024 chars, ≤ 200 lines, Response language directive, trilingual triggers, 3-column error table, CLI section - [x] All 60 skills invoked via Claude Code skill system — 58/60 fully operational - [x] 2 known ⚠️: `defi-yield` and `onchain` return empty for `BTCUSD.HAS` (account has no Crypto permission — documented in SKILL.md) - [x] CLI bug fixed: `longbridge-morning-brief` — `finance-calendar` requires subcommand (`report`/`macrodata`/`dividend`) - [x] Known data quirks documented: `constituent` JSON key is `stocks`; `operating` returns data for HK only; `instratings` field structure; `option` requires subcommand 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
98466c9f98 |
feat: add 19 new skills (batch 1) — financials, technical analysis, sector & market (#17)
## Summary Adds 19 new skills bringing the total from 31 → 50. All skills follow repo conventions: trilingual triggers (Simplified / Traditional Chinese / English), 3-column error handling tables, `--format json` CLI examples, `--help` discovery pattern, ≤ 200 lines. ### New skills **Financials & earnings (5)** - `longbridge-financial-report` — raw three-statement data (IS / BS / CF), all periods - `longbridge-financial-analysis` — 三表勾稽, DuPont decomposition, accrual/earnings quality, fraud red flags - `longbridge-financial-checkup` — five-dimension financial health score (100-pt report card) - `longbridge-consensus` — analyst consensus snapshot (revenue / EPS / target price) - `longbridge-earnings-revision` — estimate revision direction, SUE, PEAD, guidance analysis **Valuation & screening (2)** - `longbridge-industry-valuation` — industry peer matrix + percentile distribution - `longbridge-factor-screen` — multi-factor fundamental screener (PE / PB / ROE / growth / yield) **Technical analysis (7)** - `longbridge-candlestick` — 15 classic K-line patterns with bullish/bearish composite score - `longbridge-technical` — MACD / RSI / KDJ / Bollinger / EMA / ADX / OBV voting signal engine - `longbridge-ichimoku` — Ichimoku Cloud five-line system with six signal checks - `longbridge-chanlun` — 缠论 (Chan Theory) bi/zhongshu/buy-sell points via czsc ¹ - `longbridge-elliott` — Elliott Wave zigzag + Fibonacci ratio validation - `longbridge-harmonic` — Gartley / Bat / Butterfly / Crab XABCD pattern recognition - `longbridge-smc` — Smart Money Concepts: BOS / ChoCH / FVG / Order Block via smartmoneyconcepts ² **Sector & market (3)** - `longbridge-sector-rotation` — point-in-time sector momentum / capital flow / valuation ranking - `longbridge-sector-monitor` — 6–12 month economic cycle positioning and sector allocation - `longbridge-market-microstructure` — order book depth, order flow toxicity, large-order direction **Events & flows (2)** - `longbridge-corporate-events` — M&A, buyback, placement, incentive, ST/delist event classification - `longbridge-northbound-flow` — Stock Connect cross-border capital flow analysis --- > ¹ `longbridge-chanlun` requires `pip install czsc` — documented in SKILL.md and docs/install.md > ² `longbridge-smc` requires `pip install smartmoneyconcepts` — falls back to manual implementation if unavailable ## Test plan - [x] All 19 SKILL.md files validated: name matches slug, description ≤ 1024 chars, ≤ 200 lines, Response language directive, trilingual triggers, 3-column error table, CLI section - [x] Core CLI commands smoke-tested against live data: `financial-report`, `consensus`, `industry-valuation`, `kline` + pandas (MACD/RSI/Bollinger/candlestick/ichimoku/elliott/harmonic/SMC), `capital`, `depth`, `news`, `corp-action`, `constituent`, `calc-index` - [x] Known limitations documented: `operating` returns data for HK only; `constituent --format json` key is `stocks`; czsc/smc require separate pip install - [x] README updated (30 → 50 skills, new skill groups table) - [x] docs/install.md updated (new Optional Python libraries section) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
c4e31990e5 |
docs: drop stale security-list param_error guidance + tighten path-selection rules
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> |
||
|
|
9f3335cc28 |
fix(skills): align CLI commands with longbridge v0.7.0 actual subcommand shapes
之前 SKILL.md 引用的 longbridge CLI 命令多处对不上真实 v0.7.0:CLI 已经
重构,很多 hyphenated 顶层命令变成了 parent + sub-subcommand 结构。
逐个修复(基于 longbridge --help 真实输出):
skills/longbridge-derivatives/SKILL.md:
- option-quote / option-chain → option quote / option chain (sub-subcommand)
- warrant-quote / warrant-list / warrant-issuers →
warrant quote / warrant <UNDERLYING> / warrant issuers
- 加 option volume(原本漏了)
skills/longbridge-kline/SKILL.md:
- kline-history → kline history(同 parent 下的 sub-subcommand)
- --adjust no_adjust / forward_adjust → none / forward(实际枚举值)
skills/longbridge-capital-flow/SKILL.md:
- capital-flow / capital-dist → capital(snapshot)/ capital --flow(time series)
原来是两个独立命令,现在是同一命令 + flag
skills/longbridge-market-temp/SKILL.md:
- trading-session / trading-days → trading session / trading days
(parent: trading)
skills/longbridge-orders/SKILL.md:
- orders → order(default lists today's)
- order <id> → order detail <id>
- executions → order executions
- 上一笔 commit 的 portfolio 反转(commit
|
||
|
|
ac73270648 |
fix(skills+docs): broken CLI commands + scope-aware npx install
实测发现 SKILL.md 和 docs 引用的 longbridge CLI 命令对不上真实 v0.7.0 preview1,以及 npx skills 默认 scope 跟用户预期不一致导致 remove 找不到。 #1 longbridge-positions/SKILL.md: - `longbridge portfolio --format json` 不存在(real CLI 报 unrecognized subcommand)。改成"call positions + fund-positions + balance and merge" - ## Subcommands / ## CLI / ## Output / ## MCP fallback / ## When to use 5 处全部纠正 #3 longbridge-market-temp/SKILL.md + longbridge-security-list/SKILL.md: - `longbridge market-temp --market HK` 错的,真实是 positional `longbridge market-temp HK`(`--help` 明示 [MARKET] 是位置参数,默认 HK,SH/SZ 别名 → CN) - 同样问题影响 `trading-days` 和 `security-list`(都是 positional) - ## Subcommands 表头加 "MARKET is positional, not a --market flag" 显式 警告 - ## Market mapping 表头改 `<MARKET>`(去掉 `--market`) - ## CLI 示例全部改 positional - security-list 同步:`securities --market HK` → `security-list HK` #4 README.md + docs/install.md(npx scope): - npx skills 默认装 project-level(<cwd>/.claude/skills/),不是 ~/.claude/skills/。**用户在另一目录跑 remove 找不到 skill 是因为这个** - README 「with npx」段所有 add 命令加 -g,补 callout 解释默认行为 - docs/install.md Path A 段加 "Pick scope intentionally" warning + 补 global / project 两种命令对照 - docs/install.md Path A uninstall 段同步补 -g 用法 + ls -g + 全删 one-shot 跟 longbridge --help 真实输出对照后只剩 1 处未修(skills/longbridge/SKILL.md 第 29 行 verbatim 来自 developers/ 原作者文件,需用户拍板是否在我们仓里改), 其它 SKILL.md 已与 0.7.0-preview1 完全对齐。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
4397b97ecc |
fix(install): correct npx skills remove syntax
实测 `npx skills remove longbridge/skills` 不工作 — 它返回: Found 1 unique installed skill(s) No matching skills found for: longbridge/skills 原因:`npx skills remove` 期望的是**已安装 skill 的 slug**(如 longbridge-quote), 不是 install 时用的 GitHub 仓路径(longbridge/skills)。 修订 docs/install.md: - Path A 段:加 `npx skills list` 先看本机装了什么,再 `npx skills remove <slug>` 逐个 / 批量删;给一行 list+grep+xargs 命令一次清全 19 个 - Path C 段:rm -rf 兜底章节加说明 — 不管原来是 npx/bun/marketplace/symlink 装的, rm 都 work,因为最终都在 ~/.claude/skills/ 下 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
bf70bab90e |
chore: drop validate-skills.py + add CLAUDE.md (repo is now Python-free)
去掉最后一只 Python 工件,加 CLAUDE.md 给 Claude Code 在 repo 内开发时直接的项目规约。
删除:
- scripts/validate-skills.py(及空 scripts/ 目录)
原因:已无 cli.py / test_cli.py 可跑,只剩 frontmatter slug/length 校验,这些
在 install 时(npx skills add / claude /plugin marketplace)会被工具链拒绝;
本地 sanity check 不必为这点价值留 ~127 行 Python。彻底"零 Python"叙事
也跟 prompt-only 模式更一致。
新增:
- CLAUDE.md(152 行)— 维护者新增 / 改 skill 时的项目规约速查:
* 仓库布局
* Slug + frontmatter 必填项
* 三语 trigger 强制(简繁分歧字必须分开写)
* Response language 指令模板
* No Python wrapper 原则 + "用 longbridge --help 验证 flag"
* CLI vs MCP 路径选择
* Error handling 表格规约
* references/ 渐进披露
* 加新 skill 9 步 checklist
* 反模式列表
修订:
- README.md "For developers":移除 validate-skills.py 行,加 CLAUDE.md 链接
- docs/install.md:Verify 段去掉 "Repo self-test" 章节(无 validator 可跑了),
保留真账户烟测和 Claude Code 端到端;FAQ slug 检查段改成手动指令;
smoke test 编号 3 → 2
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
553601477d |
refactor: drop the last 2 cli.py wrappers; all 19 skills now prompt-only
剩余两个保留 cli.py 的 skill(longbridge-quote / longbridge-watchlist-admin)也
按"不在 .py 中硬编码 cli 参数,改用 longbridge --help 自描述"原则去掉 wrapper。
删除:
- skills/longbridge-quote/scripts/{cli.py,test_cli.py}
- skills/longbridge-watchlist-admin/scripts/{cli.py,test_cli.py}
共 4 文件,-778 行
重写 SKILL.md(2 份):
- longbridge-quote:
* "## CLI" 改成直接调 `longbridge quote / static / calc-index --format json`
* 加显式提示 "If unsure of exact flag names, run `longbridge <subcommand>
--help` first"(避免 SKILL.md 跟 CLI 版本耦合)
* 多子命令合并的责任从 cli.py envelope 下沉到 LLM:Workflow 章节明示
"merge per-symbol rows by symbol into a single object"
* 删 cli.py 自定义 envelope 描述,改成描述 longbridge 原生 JSON 形态
- longbridge-watchlist-admin:
* "Two-step protocol" 重写成纯 prompt 约定:① preview ② wait for
explicit confirmation ③ execute,不再依赖 cli.py 的 --confirm gate
* "Safety gates" 段去掉 binary-lock(Python 才能强制),改成依赖
longbridge CLI 自己的 confirmation prompt(`watchlist delete` 自带)
* CLI 调用模板用 `longbridge watchlist <create|update|delete> ...`
* 加显式提示运行 `longbridge watchlist <subcommand> --help` 验证当前
flag 拼写
文档同步:
- docs/architecture.md:
* 删除"Two skills retain a Python wrapper"段,改成"all 19 skills are
now prompt-only"
* Decision flow 流程图删除 wrapper 路径
* Multilingual end-to-end flow 图改用 `longbridge quote NVDA.US
--format json` 替代 cli.py 调用
* Maintainer guidelines #5/#6 重写 — "no Python wrappers" + "command
not found is the path-switch signal"
- docs/install.md:
* 移除 Python 3.8+ 先决条件(已无 .py 脚本依赖)
* Smoke test 用 `longbridge quote/kline/watchlist --format json` 替
代 python3 scripts/cli.py 调用
* FAQ 把 binary_not_found 章节改名 "command not found: longbridge"
* 5 → 6 个 analysis tier(catalyst-radar 上次没纠正)
- scripts/validate-skills.py:docstring 更新,test_cli.py runner 代码保留作
防御(若有人重新引入 wrapper 还能跑测试)
validate 19/19 ✓。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
1a0a636ff9 |
docs: translate architecture.md + install.md to English; drop hard-coded local paths
- docs/architecture.md:全文译英,multilingual 示例(简/繁/英 trigger 演示、字段对照 表、错误回复表)保留中文 — 它们是文档演示的内容,必须保留 - docs/install.md:全文译英,所有 /Users/hogan/work/... 替换为 <path-to-the-cloned-repo> / $PWD / 相对路径;Symlink 路径段补 git clone 步骤(原假设仓库在固定本机位置) - 多语言用户提示示例(NVDA 现在多少钱 / 我的自选股 / NVDA 估值贵不贵 等)保留 — 作为 trigger 示例,简/繁/英都演示 skill 内容未动,validate 19/19 ✓。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
e8c0c91f00 |
docs: rewrite README user-facing + add npx/bun install paths
README.md 从"开发者技术参考"重写为"使用者友好": - 顶部用一句普通话讲清楚做什么(对 AI 助手补长桥能力,中/英/繁三语,19 个 skill 覆盖行情/账户/分析/通讯) - "你能问什么"章节给 6 句多语言示例(NVDA 现在多少钱 / 我的持仓 / X 估值贵不贵 / X 跟 Y 哪个增速快 / 今天有什么要关注 / 特斯拉最近怎么了) - skill 表从 4 列拆分大表 → 4 行分组(基础 / 行情 / 账户 / 分析),每行所有 skill 名做行内链接,扫一眼能看完 - 删去仓内目录树、Output policy、Mutating skills、Validate 等深度章节,把它们 压成"For developers"小节链 docs/ - 19 skill 数对齐(之前 README 还停留在 17/18) install.md 加 npx / bun 安装路径(微软 skills 同款): - 新增方式 A:npx skills add / bunx skills add(全装 / --skill 单装) - 老的"插件市场"成方式 B,"symlink"成方式 C,"其它 agent"成方式 D - 卸载章节同步加方式 A 的 npx skills remove 命令 - 数字全部对齐到 19 个 skill(之前各处 17/11 等过期数) skill 内容与三语功能不动,validate 19/19 ✓。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
526bf1a6ac |
feat: add marketplace, license, docs, validator for the merged repo
完成 longbridge-new-skills → longbridge-skills 的合并(commit 3/3): 新增: - .claude-plugin/marketplace.json — Claude Code 插件市场入口,/plugin install longbridge@longbridge-skills 一次装 17 个;pluginRoot/source 配为 ./,skills 字段 指 ./skills/ 让 Claude Code 扫子目录 - LICENSE — MIT(对齐 microsoft/skills 范式) - docs/architecture.md — 三语支持 + CLI/MCP 路由两套设计的内部说明 - docs/install.md — 三种安装方式 + 先决条件 + 验证 + FAQ;repo URL 改为 https://github.com/longbridge/skills - scripts/validate-skills.py — 扫 skills/<slug>/ 校验 frontmatter + 跑 12 个 test_cli.py - README.md — 重写为新 layout:支持单 skill symlink 与 plugin marketplace 双安装路径,链接到 docs/architecture / docs/install / docs/superpowers/(历史) - .gitignore — 扩展 Python / OS / 编辑器 / 构建产物常见忽略项 保留(audit trail): - docs/superpowers/specs/ + docs/superpowers/plans/ — 18 份历史设计稿,引用旧 中文名,仍可追溯当初的设计决定与风险评估 合并后状态: - 17 个 skill 在 skills/ 下,全部 lowercase ASCII slug - frontmatter / cli.py SKILL_NAME / scripts/test_cli.py 全部对齐英文 slug - 三语 trigger 关键词 + Response language 指令 + 三列字段对照表 - python3 scripts/validate-skills.py → 17/17 ✓ - 12 个 read-tier scripts/test_cli.py → 全绿 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |