Skip to content
Back to search

openmobius-skill

Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave. Use for trading concepts; capability-discovery questions about available analysis lenses, Schools, models, modes, or data sources; attached charts; pasted OHLCV; chart annotation; or asset-plus-timeframe requests across crypto, stocks, commodities (gold/silver), or forex. Defaults unselected market analysis to strict ICT/SMC, honors explicit School/source selectors, and fails closed when no native analyzer exists. Phase 1 comparison is Q&A-only; fetch fresh Mobius Quant API data only after the capability gate.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mobiusquant--openmobius-skill/badge.svg)](/listings/mobiusquant--openmobius-skill)

HTML

<a href="/listings/mobiusquant--openmobius-skill"><img src="/api/listings/mobiusquant--openmobius-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

OPENMOBIUS_SRC="$(mktemp -d "${TMPDIR:-/tmp}/openmobius-src.XXXXXX")"
git clone https://github.com/MobiusQuant/OpenMobius-skill.git "$OPENMOBIUS_SRC"
cd "$OPENMOBIUS_SRC"
python3 install.py --platform claude-code     # or codex / agy / openclaw / hermes / cursor
# On Linux/macOS, `all` installs all six local-path hosts. WorkBuddy, Grok Bot, and Muse use compact ZIP packages.

cd "${TMPDIR:-/tmp}"
rm -rf -- "$OPENMOBIUS_SRC"                    # ✓ exact mktemp directory only

On Windows, clone into a writable directory and run `py -3 install.py --platform claude-code` (or use `.\install.ps1`).

The installer copies source files into `~/.claude/skills/openmobius-skill/` (or your chosen platform's skills dir), then in that directory:

1. Creates `.venv/` and installs dependencies 2. Downloads Playwright chromium (~280 MB, into your OS's user-global cache) 3. Downloads the pinned `nomic-embed-text-v1.5` weights (~547 MB / 522 MiB, into your HuggingFace cache) 4. Loads bundled canonical vectors and the verified release seed for independent School/evidence vectors, then builds and verifies all three collections. Only locally changed or missing documents are embedded and cached. 5. Generates the platform-specific `SKILL.md` 6. Runs a health check

Each installer-managed local copy is **self-contained**: it owns its own `.venv` and `_index`. The clone is just a one-shot source bundle.

**First run**: dependency/model downloads plus seed-accelerated index build · **Subsequent runs**: unchanged records use the release seed or local embedding cache

After install, try capability discovery plus the default, scoped, and composed routes directly:

# Default: strict ICT/SMC
"What is Liquidity Sweep?"
"How is ETH 4h looking?"

# Discover the installed capabilities (no market-data request)
"What analysis models can I use?"

# Select an exact School or source
"Explain 中枢 using ChanLun only"
"Explain Order Block using Wuyuan's SMC material only"

# Compose or compare
"Compare ICT and ChanLun definitions of market structure"
"Use SMC as primary and Wuyuan as a reference to analyze BTC 1h"

Other Schools can scope knowledge Q&A when attributable material exists. Current-market analysis additionally requires a native analyzer; unsupported routes stop before market-data or chart work. Capability-discovery questions read the installed registry dynamically and report native market profiles, Q&A-only lenses, knowledge categories, and the available composition modes as separate concepts; they do not fetch market data or describe a category as an analysis model.

> **Prerequisites**: Python 3.10+. See [INSTALL.md](./INSTALL.md) for details.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 499 lines
  1. ---
  2. name: openmobius-skill
  3. description: Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave. Use for trading concepts; capability-discovery questions about available analysis lenses, Schools, models, modes, or data sources; attached charts; pasted OHLCV; chart annotation; or asset-plus-timeframe requests across crypto, stocks, commodities (gold/silver), or forex. Defaults unselected market analysis to strict ICT/SMC, honors explicit School/source selectors, and fails closed when no native analyzer exists. Phase 1 comparison is Q&A-only; fetch fresh Mobius Quant API data only after the capability gate.
  4. ---
  5. # OpenMobius-skill — Multi-School Trading Knowledge Skill
  6. A unified skill for four interaction intents with a curated multi-school knowledge base (726 concept cards + 1282 case cards) distilled from 300+ trading videos and live lessons across 12 curated source collections.
  7. **Core principle**: every trading-analysis claim must be grounded in (a)
  8. visible chart evidence or (b) a retrieved knowledge-base rule. Capability
  9. claims must be grounded in the installed inventory and declared profile
  10. contract. **No fabrication** — when uncertain, state so explicitly.
  11. ## Freshness mandate — NEVER answer market questions from memory
  12. Any user message that mentions an asset + timeframe — **even without
  13. the word "现在" / "now"** — REQUIRES a fresh `kb_klines.py indicators`
  14. or `kb_klines.py chart` call **in the current turn**. Examples:
  15. - "BTC 1h 怎么样" — yes, call API now
  16. - "ETH 现在怎么样" — yes
  17. - "茅台日线分析下" — yes
  18. - "金子 4 小时" — yes
  19. - "BTC 还在跌吗" — yes, even though no timeframe given (default to user's
  20. implied tf or ask), the freshness rule still applies
  21. This live-fetch mandate applies to current-market requests. If the user
  22. explicitly asks to analyze OHLCV they supplied, preserve that snapshot instead
  23. of replacing it with live data; use the parsed-data provenance footer from
  24. `workflows/klines.md` and state that its freshness is not independently
  25. verified.
  26. **Control-plane exception**: a question about which analysis model/School/mode
  27. the installed skill supports, or whether a named School *can* analyze a market,
  28. is capability discovery rather than a request to analyze that market. Route it
  29. to the Q&A capability-discovery branch before applying asset/timeframe rules;
  30. do not fetch market data even when the question names an asset or timeframe.
  31. **Capability-gate exception**: first resolve the requested market-analysis
  32. route. If its required native analyzer/filter is unsupported, stop before any
  33. network call or artifact generation, report the capability gap, and do not add
  34. a fabricated freshness footer. The freshness requirements below apply only
  35. after a market route passes that gate.
  36. **Hard rules**:
  37. 1. **DO NOT** cite prices, levels, swing pivots, BOS/CHoCH events, or
  38. structure from your training data ("BTC was around 60K-100K" → forbidden).
  39. 2. **DO NOT** reuse price data from earlier turns in the same conversation
  40. if more than 60 seconds have passed — refetch.
  41. 3. **DO NOT** invent timestamps, "data as of" labels, or "real-time"
  42. claims that are not literally in the API response's `freshness` block or
  43. the user-supplied dataset.
  44. 4. For API-backed current-market analysis, the only source of truth is a
  45. `freshness` block returned by an API call made in this turn. If you have not
  46. yet called the API in this turn, you must say:
  47. `"我需要先拉一下最新数据"` and call the API before answering.
  48. **Every market-analysis reply that proceeds past the capability gate MUST use
  49. the matching footer**: API-backed analysis uses the freshness footer; analysis
  50. of user-pasted OHLCV uses the parsed-data provenance footer (see
  51. `workflows/klines.md` Step 5). A reply without the applicable footer is
  52. incomplete.
  53. If the API response's `freshness.is_stale == true` (latest bar older
  54. than 2 × interval), explicitly tell the user the market may be closed
  55. or the API may be delayed — do not silently report stale data as live.
  56. ---
  57. ## Data source disclosure (canonical answer)
  58. When the user asks about data origin — any of: "数据从哪来 / 数据源 /
  59. data source / where is this data from / 你用什么数据 / 是实时吗 /
  60. real-time? / 怎么取的数据" — respond with the canonical disclosure
  61. below. **Substitute the live values** from the most recent API call's
  62. `freshness` block + any visible `exchange`/`market`/`symbol` fields.
  63. ### Canonical answer template (bilingual)
  64. ```
  65. **Data source / 数据来源**: Mobius Quant API (api.mobiusquant.ai)
  66. Current request / 本次请求:
  67. - exchange = `<exchange from response>`
  68. - market = `<market from response>` (spot / perp / futures / cn / hk / us / forex)
  69. - symbol = `<symbol from response>`
  70. - fetched_at (UTC) = `<freshness.fetched_at>`
  71. - last_bar_open (UTC) = `<freshness.last_bar_open_time_utc>`
  72. - last_bar_age_seconds = `<freshness.last_bar_age_seconds>` (is_stale=<is_stale>)
  73. **About upstream sources / 关于上游来源**: Mobius Quant exposes OHLCV,
  74. technical indicators, and SMC structural signals as an aggregator. Which
  75. underlying exchanges or data vendors it connects to upstream, and
  76. whether direct-feed vs aggregated — **this skill cannot verify**. See
  77. https://www.mobiusquant.ai/ for details.
  78. ```
  79. ### Hard rules — what you must NOT say about the data source
  80. - **DO NOT** name specific upstream vendors unless the exact string
  81. appears in the API response's `exchange` field. Allowed values are
  82. what `symbols_search` / `klines` / `indicators` literally return
  83. (e.g. `binance`, `bybit`, `okx`, `gate`, `coinbase`, `hyperliquid`,
  84. `composite` for crypto; `stock` for `cn`/`hk`/`us`; `commodity` for
  85. `XAUUSD`/`XAUF`/`XAGF`; `forex` for FX spot).
  86. - **DO NOT** name web data providers (新浪财经 / Yahoo Finance /
  87. TradingView / 东方财富 / 同花顺 / Bloomberg / etc.) — you cannot
  88. verify any of these.
  89. - **DO NOT** describe the upstream pipeline ("Mobius pulls from Binance
  90. via WebSocket" / "tick-level feed" / "delayed 15 min") — you cannot
  91. verify any such claim.
  92. - **DO NOT** make freshness claims beyond what `freshness.is_stale`
  93. reports. Use the literal `last_bar_age_seconds` number.
  94. ### What you CAN say
  95. - The API endpoint (`api.mobiusquant.ai`)
  96. - The exact JSON fields returned (`exchange` / `market` / `symbol` /
  97. `count` / `current_price` / `freshness.*`)
  98. - That the SMC structural indicator is computed server-side by Mobius
  99. - A pointer to `https://www.mobiusquant.ai/` for upstream details
  100. ---
  101. ## Host-neutral runtime and artifact paths
  102. Resolve these placeholders for the current host before running a workflow.
  103. They are documentation tokens, not literal paths or shell variables:
  104. - `<SKILL_ROOT>` — the directory containing the loaded `SKILL.md`. Run all
  105. commands with this directory as the working directory so relative `scripts/`
  106. paths resolve without depending on the user's current directory.
  107. - `<PYTHON>` — the Python executable selected for this installed skill. Resolve
  108. it from the platform/installer-managed runtime; Windows and POSIX executable
  109. paths differ, and a managed host may expose its own runner. Do not assume
  110. `python` or `python3` is available on `PATH`.
  111. - `<TEMP_DIR>` — a writable, task-specific temporary directory created through
  112. the current host's temporary-directory facility. Do not assume a particular
  113. POSIX or Windows system path exists.
  114. - `<USER_OUTPUT_DIR>` — a writable directory selected by the user or exposed by
  115. the host for durable artifacts that must be returned. Do not use a repository
  116. checkout or developer-machine path as the implicit output location.
  117. - `<INPUT_IMAGE>` — the host-resolved path to the user's attached chart.
  118. Never execute the angle-bracket placeholders literally. Quote each resolved
  119. path according to the current command runner when it contains spaces. Command
  120. blocks use logical argument lists and avoid shell-only pipes, heredocs, and
  121. continuation syntax. Create JSON/text inputs with the host's file-writing tool
  122. or a JSON serializer, then pass the resulting file path to the script.
  123. For WorkBuddy packaging compatibility, a command line that begins with
  124. `kb_retrieve.py` is launcher-neutral shorthand only. Before execution it
  125. **must** be expanded to `<PYTHON> scripts/kb_retrieve.py`; never assume
  126. `kb_retrieve.py` is on `PATH`.
  127. ## Always retrieve from the knowledge base first
  128. The knowledge base contains rule-based identification criteria and documented pitfalls that generic training data lacks. Resolve the route and confirm its capabilities, then **retrieve within that route before synthesizing** — don't answer trading questions from memory alone and don't widen a selected school/source boundary silently.
  129. The semantic-card retrieval mandate applies to trading-knowledge answers, not
  130. to control-plane capability discovery. Capability discovery inspects the
  131. installed School inventory and declared profile contract without running a
  132. normal query/top-K search; follow the special case in `workflows/qna.md`.
  133. ## Analysis profile orchestration
  134. First detect capability-discovery questions about the installed skill's
  135. available models/profiles, lenses, Schools, modes, supported intents, or a
  136. named School's market-analysis support. They remain `intent=qna`, but take
  137. priority over the default `strict` ICT/SMC route and any asset/timeframe or
  138. chart routing. Read both `workflows/qna.md` and
  139. `workflows/analysis_profiles.md`, inspect the installed inventory with
  140. `kb_retrieve.py --layer school --list-schools --format json` (expanded through
  141. the launcher-neutral rule above),
  142. then answer immediately from that inventory and the declared profile contract.
  143. This is an intentionally bounded, single-agent control-plane operation: do not
  144. delegate to a subagent/background task, recursively invoke this skill, run Git,
  145. scan source code/cards/manifests, or verify analyzer implementations. Do not
  146. construct or inherit an analytical School route for this branch, and stop after
  147. the capability response.
  148. For all normal analysis and knowledge requests, resolve a route before
  149. retrieval, indicator calls, analysis, or drawing:
  150. `route = {intent, mode, primary_lens, secondary_lenses, schools, sources, capabilities}`
  151. - `intent` must be exactly one of `qna`, `analyze`, `annotate`, or `klines`.
  152. Do not emit aliases such as `kline_analysis`.
  153. - `capabilities` must always be an object, never a list or string. Use the
  154. canonical fields and values defined in `workflows/analysis_profiles.md`.
  155. - For the plain default route, set `exact_primary_school_filter=true`,
  156. `source_filter=not_requested`, `intent_supported=true`, and `reason=null`;
  157. set `native_market_analyzer=not_required` for Q&A or `supported` for a market
  158. intent. This default does not require loading the profile reference.
  159. - `lens` (also called a profile) is an analytical methodology such as
  160. `ict_smc` or `chanlun`; `source` is a corpus/teacher collection such as
  161. `Teach-Wuyuan`. A source does not automatically select a lens.
  162. - With **no explicit lens, school, source, or composition selector**, use
  163. `mode=strict`, `primary_lens=ict_smc`, and `schools=[ICT, SMC]`; retrieve
  164. with `--layer school --schools ICT SMC`.
  165. - A single explicit selector is strict by default. In Phase 1, `compare` is
  166. supported for Q&A only; market-analysis, chart, and annotation comparisons
  167. fail closed before network or artifact work. `augment` gives one primary lens
  168. authority over bias and trade levels while secondary lenses only confirm,
  169. challenge, or add risk context.
  170. - School-scoped grounding uses `school_knowledge_v2`, which omits
  171. cross-School fused rules that cannot be attributed. Any requested source
  172. uses `source_evidence_v2` with `--layer evidence --sources ...`; combine it
  173. with `--schools ...` for an exact intersection. Never use the fused
  174. canonical layer to claim strict School/source isolation.
  175. - School/evidence queries use hard-filtered hybrid retrieval by default
  176. (BM25 + semantic RRF over independently embedded scoped documents). Keep
  177. `--search-mode auto` unless diagnosing retrieval; exact terms/aliases stay
  178. first and the hard School/source boundary is never widened.
  179. - **Never silently fall back** from an explicit lens/source to `ict_smc` or to
  180. an unfiltered search. Check `capabilities` before doing work and report an
  181. unsupported or empty route plainly.
  182. - ChanLun knowledge Q&A is supported, but this skill currently has no native
  183. ChanLun market-structure analyzer or overlay. Never present SMC indicator
  184. output as ChanLun analysis.
  185. Read [workflows/analysis_profiles.md](workflows/analysis_profiles.md) whenever
  186. the user names a lens/school/source, requests comparison or augmentation,
  187. excludes a profile, or the selected capability is uncertain. Plain default
  188. `ict_smc` requests can proceed directly to the intent workflow below.
  189. ## Market-analysis output format is mandatory
  190. The Analyze and Kline workflows end in a synthesis step with mandatory `##`
  191. section headings. Those headings must appear verbatim and in the specified
  192. order. Q&A and Annotate use the output structures defined in their own workflow
  193. documents. A capability-gap response that stops before analysis is also exempt
  194. from the market-analysis template and freshness footer.
  195. ## Scenario Router
  196. Pick the right sub-workflow based on the user's input. Each workflow has detailed steps in its own document:
  197. | User input | Workflow | Document to read |
  198. |---|---|---|
  199. | Installed-skill capability question ("当前有哪些分析模型", "which Schools are available", "缠论能分析 BTC 1h 吗") — even with an asset/timeframe or chart reference | **Q&A capability discovery** | `workflows/qna.md` + `workflows/analysis_profiles.md` |
  200. | Concept question, **no chart, no data, no asset name** ("什么是 FVG", "how to identify OB", "止损放哪里") | **Q&A** | `workflows/qna.md` |
  201. | **Chart attached** + any question about it ("分析", "看一下", "走势", "where to enter", "what's happening") | **Analyze** (auto-fetches real OHLCV + annotation) | `workflows/analyze.md` |
  202. | User explicitly asks to **draw/annotate** an image, OR follows up after analysis with "把这个标在图上" | **Annotate** | `workflows/annotate.md` |
  203. | User pastes **OHLCV data** OR mentions **asset + timeframe by name** without chart ("BTC 1h 怎么样" / pastes CSV / "茅台日线") | **Kline analysis** (auto-generates a fresh chart PNG) | `workflows/klines.md` |
  204. > **Chart output is part of the standard reply** for the **Analyze** and
  205. > **Kline analysis** workflows — render a PNG and include its path in the
  206. > output. Skip the chart step ONLY when the user explicitly opts out
  207. > ("只要文字" / "skip chart" / "no image" / "不用画图"). For
  208. > user-pasted OHLCV, follow the Path B exception in `workflows/klines.md` and
  209. > never fetch a different live series merely to satisfy chart output.
  210. **How to route**:
  211. 1. Detect capability discovery first; if matched, follow its Q&A control-plane
  212. special case and stop without applying an analytical route
  213. 2. Otherwise resolve the route above; load `analysis_profiles.md` when its
  214. trigger applies
  215. 3. Identify the user's intent in the scenario table
  216. 4. Use the `Read` tool to load the relevant workflow document (relative to this SKILL.md: `workflows/<name>.md`)
  217. 5. Follow that workflow while preserving the route's lens/source boundaries
  218. > **Important — Analyze workflow now auto-fetches data**: If a chart is attached AND the asset/timeframe is identifiable from the chart, `analyze.md` will fetch real OHLCV from Mobius API to **complement visual analysis with precise prices**. This is on by default; user can opt out by saying "只看图不拉数据" / "skip data fetch".
  219. > **Note**: The **Analyze** workflow already auto-generates an annotated image as its final step. You do NOT need to separately invoke Annotate after Analyze unless the user wants to re-render with different parameters (different colors, new bbox, JSON-only output, etc.).
  220. ## Two chart generation paths
  221. When the user wants a visual chart, choose the right tool:
  222. | Situation | Tool | Output |
  223. |---|---|---|
  224. | User uploaded their own chart image; wants markup ON that image | `scripts/kb_draw_annotation.py` (PIL) | Annotated copy of original image |
  225. | No chart image, OR user wants a clean new chart | `scripts/kb_klines.py chart` + `render` | Fresh TradingView-grade chart: K-lines + structural overlays (FVG/OB rectangles, sweep lines, swing markers, trade-setup lines) |
  226. For path #2, the typical pipeline is:
  227. ```text
  228. # 1. Pull K-lines + auto-filled SMC structural overlay for an ict_smc route
  229. <PYTHON> scripts/kb_klines.py chart --query "BTC" --interval 1h --limit 200 --output <TEMP_DIR>/chart.json
  230. # 2. Optionally create a separate trade-setup JSON containing only entry/SL/
  231. # target hlines; do not duplicate the structural items already auto-filled.
  232. # 3. Render PNG (add --trade-setup <TEMP_DIR>/setup.json only when one exists)
  233. <PYTHON> scripts/kb_klines.py render --input <TEMP_DIR>/chart.json --output <USER_OUTPUT_DIR>/chart.png --theme dark --width 1400 --height 900
  234. ```
  235. ## Indicator fetching
  236. ### Default `ict_smc` profile: SMC structural indicator
  237. For a market-analysis branch whose lens is `ict_smc`, fetch the **SMC
  238. structural indicator** first. A request with no explicit selector creates this
  239. default branch. Do not fetch or use SMC as structural evidence for a strict
  240. non-`ict_smc` branch; in `augment`, keep its evidence within the labelled
  241. secondary role assigned to that branch.
  242. ```text
  243. <PYTHON> scripts/kb_klines.py indicators --query "BTC" --interval 1h --limit 200 --format compact
  244. ```
  245. No `--inds` flag means SMC by default. The response covers, in one call:
  246. - **Per-bar state**: swing/internal trend bias, active swing & internal
  247. pivots, trailing extremes (running max/min since last pivot), the SMC
  248. indicator's internal volatility baseline (`smc_atr200`)
  249. - **`objects` sidecar**: structural events with full geometry, ready to
  250. drop straight into chart overlays
  251. - `swing_pivots` (HH/HL/LH/LL), `swing_structures` & `internal_structures`
  252. (BOS / CHoCH events with `pivot_time` + `confirm_time` + `bias`)
  253. - `equal_highs` / `equal_lows` (liquidity-pool levels)
  254. - `order_blocks_swing` / `order_blocks_internal` (each with
  255. `top`/`bottom`/`anchor_time`/`bias`/`status: active|mitigated`)
  256. - `fair_value_gaps` (same field shape as OBs)
  257. - `trailing_extremes`: `{top, top_label, bottom, bottom_label}` where
  258. the labels are one of `Strong High` / `Strong Low` / `Weak High` /
  259. `Weak Low`
  260. - `premium_zone` / `equilibrium_zone` / `discount_zone`
  261. (`{top, bottom}` price bands at the swing range's top/middle/bottom)
  262. - `alerts_last_bar`: dictionary of booleans flagging events that fired
  263. on the most recent candle (e.g. `swing_bullish_choch`, `equal_highs`,
  264. `bullish_fair_value_gap`)
  265. ### SMC field semantics (use these to structure your analysis)
  266. Order of consultation for the 5-section output:
  267. 1. **Trend bias**: compare `smc_swing_trend` vs `smc_internal_trend`.
  268. Same sign = strong trend; opposite sign = potential reversal or range.
  269. 2. **Most recent structural event** (look at last entry of
  270. `swing_structures` / `internal_structures`): is it `kind: BOS`
  271. (trend continuation) or `kind: CHoCH` (trend reversal)? **CHoCH has
  272. higher priority** than BOS as a forward signal.
  273. 3. **Trailing extremes labels**: `Strong High` + `Weak Low` together =
  274. confirmed bearish structure (the high holds, the low is breakable);
  275. `Strong Low` + `Weak High` = confirmed bullish. A break of a `Strong`
  276. pivot is the structural confirmation of a reversal.
  277. 4. **Active Order Blocks**: filter `objects.order_blocks_*` by
  278. `status: active`. Bull OBs below price = support candidates. Bear OBs
  279. above price = resistance candidates. Closer to current price = more
  280. relevant.
  281. 5. **Active Fair Value Gaps** (same filter): three-bar imbalance regions
  282. that price tends to revisit / fill.
  283. 6. **Equal highs / equal lows**: stops-cluster liquidity that Smart
  284. Money tends to sweep before reversing.
  285. 7. **Premium / equilibrium / discount placement**: which zone is the
  286. current price in? Bull-favored entries are in `discount`; short-
  287. favored entries are in `premium`; `equilibrium` is wait-and-see.
  288. ### Caveats (always disclose when an SMC branch is used)
  289. - Swing pivots are confirmed only `swing_size` bars after they form
  290. (typically ~50 bars); recent pivots may still adjust.
  291. - Order Blocks are reverse-engineered from later price action; a freshly
  292. formed OB may be revised by subsequent bars.
  293. - FVG thresholds fire more frequently in low-volatility regimes — treat
  294. low-vol FVG counts with caution.
  295. - All events are structural signals, not entry triggers. They complement
  296. but do not replace risk management.
  297. ### Cross-referencing the ICT/SMC knowledge base
  298. Each SMC field maps directly to a KB concept card. After identifying the
  299. structural pattern, retrieve the corresponding card for rule citations:
  300. | SMC field / event | KB concept |
  301. |---|---|
  302. | `swing_structures` with `kind: BOS` | `break_of_structure` |
  303. | `swing_structures` with `kind: CHoCH` | `change_of_character` |
  304. | `order_blocks_*` | `order_block` |
  305. | `fair_value_gaps` | `fair_value_gap` |
  306. | `equal_highs` / `equal_lows` | `equal_highs` / `equal_lows` |
  307. | `premium_zone` / `discount_zone` / `equilibrium_zone` | `premium_and_discount`, `equilibrium` |
  308. | `trailing_extremes` with Strong/Weak labels | `strong_and_weak_highs_and_lows`, `protected_high_low` |
  309. | `smc_atr200`, `smc_volatility`, `high_vol_bar` | `displacement` |
  310. ### When the user explicitly names a specific indicator
  311. If — and **only if** — the user's message contains a specific indicator
  312. name (whatever the abbreviation), pass that name through as `--inds`:
  313. ```text
  314. <PYTHON> scripts/kb_klines.py indicators --query "BTC" --interval 1h --inds "<exact-name-user-said>" --format compact
  315. ```
  316. For multi-param indicators use the compact form `name:p1:p2` (e.g. one
  317. positional param after the name); the server interprets the rest.
  318. **Strict rules**:
  319. 1. **Do not pre-emptively fetch any indicator the user did not name.**
  320. Do not "complement the SMC reading" with another indicator on your
  321. own initiative.
  322. 2. **Do not suggest specific indicator names to the user.** If the user
  323. did not ask for an indicator, do not mention any. Within an `ict_smc`
  324. branch, the SMC indicator is sufficient as the structural ground truth;
  325. it is not a substitute for another lens's native analyzer.
  326. 3. **Text-only**: indicator output is reported in prose / tables; chart
  327. rendering stays structure-only (FVG/OB/Sweep overlays from the SMC
  328. `objects` sidecar). Do not draw oscillator-style sub-panels.
  329. ## Chart authoring (LLM responsibility is small)
  330. For an `ict_smc` branch, `kb_klines.py chart` auto-fills
  331. `panels[0].items` with the SMC indicator's structural overlay (BOS/CHoCH
  332. markers, trailing-extreme labels, active
  333. Order Blocks, active Fair Value Gaps, equal H/L, internal OBs, and mitigated
  334. history). Premium/equilibrium/discount bands are optional and require
  335. `--include-zones`. You do **not** author
  336. rectangles, markers, or structural hlines.
  337. **The only items the LLM ever writes** are trade-setup hlines (entry /
  338. SL / target), passed at render time via `--trade-setup PATH`:
  339. ```json
  340. {"items": [
  341. {"type": "hline", "value": 78500, "label": "Short 78500",
  342. "style": {"role": "entry_short", "width": 2}},
  343. {"type": "hline", "value": 80000, "label": "SL 80000",
  344. "style": {"role": "stop_loss", "dash": "dashed", "width": 2}},
  345. {"type": "hline", "value": 77000, "label": "T1 77000",
  346. "style": {"role": "target", "width": 2}}
  347. ]}
  348. ```
  349. **Label rule**: ≤ 12 characters including the price. Put rationale
  350. (`"entry at FVG mid"`, `"SL above 4h OB"`) in the prose reply, not in
  351. the chart label.
  352. **Trade-setup `style.role` values**: `entry_long`, `entry_short`,
  353. `stop_loss`, `target`.
  354. Skip the trade-setup file when you have no specific trade levels to draw
  355. — the SMC structural overlay alone is a valid market chart.
  356. ## Shared Rules (apply to all workflows)
  357. 1. **No fabrication** — every price level cited must be visible on the chart or computed from a retrieved rule applied to a visible price.
  358. 2. **Cite the knowledge base** — every confirmed pattern must reference a retrieved card. Format: `"Rule N of <concept>: '<rule text>' — visible at <evidence>"`.
  359. 3. **Language rules**:
  360. - Prose language matches user's input: Chinese question → Chinese prose; English → English prose
  361. - Technical terms stay in English regardless of prose language: FVG, Order Block, Breaker, CISD, OTE, Liquidity Sweep, Killzone, IFVG, MSS, BOS, CHoCH, Displacement, etc. Do NOT translate to "公允价值缺口" — keep "Fair Value Gap" or "FVG"
  362. - Numbers/prices/percentages: keep original form
  363. 4. **State uncertainty explicitly** — prefer `null` or "uncertain — <reason>" over speculation.
  364. 5. **Multiple retrievals are OK** — for complex charts or multi-concept questions, run `kb_retrieve.py` more than once with different keyword combinations.
  365. 6. **Probability tiers (5 levels, semantic only)** — use exactly these names; do NOT expose internal percentages to users:
  366. | Tier | 中文 | Meaning |
  367. |---|---|---|
  368. | `very_high` | 很高 | Dominant scenario; strong rule-based confirmation |
  369. | `high` | 较高 | Primary plausible scenario; most rules confirm |
  370. | `medium` | 中等 | Plausible but partial rule confirmation |
  371. | `low` | 较低 | Edge case; speculative |
  372. | `very_low` | 很低 | Tail risk; mentioned for completeness only |
  373. 7. **Non-trading content** — if the image or question is not about trading, say so and stop.
  374. ## Tools
  375. Use the host-neutral placeholders defined above. OpenClaw can resolve
  376. `<SKILL_ROOT>` from `{baseDir}` and Hermes from `${HERMES_SKILL_DIR}`; on
  377. Antigravity (`agy`), Claude Code, Codex, Cursor, Grok Bot, Muse, and WorkBuddy
  378. resolve it from the loaded `SKILL.md`. Do not execute an undefined
  379. `${SKILL_DIR}` variable or assume that a virtual environment is on `PATH`.
  380. | Tool | Purpose |
  381. |---|---|
  382. | `scripts/kb_retrieve.py "<query>" --layer school --schools ICT SMC --top-k 5` | Default/School-scoped retrieval from attributable School projections |
  383. | `scripts/kb_retrieve.py "<query>" --layer evidence --sources <SOURCE>` | Exact source-evidence retrieval; optionally combine with `--schools` and `--type` |
  384. | `scripts/kb_klines.py resolve "<name>"` | Natural name → canonical asset spec |
  385. | `scripts/kb_klines.py fetch --query "<name>" --interval <tf> --with-htf` | Pull real OHLCV (+ HTF) from Mobius API |
  386. | `scripts/kb_klines.py parse --input <file>` | Parse pasted CSV/JSON/Markdown → standard OHLCV |
  387. | `scripts/kb_klines.py analyze --input <ohlcv.json>` | Extract features (swing/FVG/OB/sweep/displacement/structure). Add `--format json` to get structured features + `suggested_overlay_items` |
  388. | `scripts/kb_klines.py chart --query <name> --interval <tf>` | Pull K-lines and auto-fill the SMC structural overlay for an `ict_smc` route; use `--no-auto-overlay` for an empty overlay |
  389. | `scripts/kb_klines.py render --input <panels.json> --output <png>` | Render panels JSON → PNG via Playwright + lightweight-charts (TradingView-grade chart) |
  390. | `scripts/kb_klines.py indicators --query <name> --interval <tf>` | Default: fetch the SMC structural indicator (BOS/CHoCH, Order Blocks, FVGs, equal H/L, premium/discount zones, trailing pivot labels). Pass `--inds <exact-name>` only when the user explicitly named a specific indicator. Text output only, NOT rendered on chart. |
  391. | `scripts/kb_draw_annotation.py --json <path>` | Render annotation JSON onto chart (PIL, for **user-uploaded** images) |
  392. | `scripts/kb_phase_b_to_c.py --input <analysis.json> --image <png> --output <annotated.png>` | Convert analysis JSON → annotated image (one shot) |
  393. | `scripts/build_knowledge_v2.py` | Audit/export deterministic School projections and exact-source evidence |
  394. | `scripts/build_index.py` | Build canonical + independently embedded v2 collections; unchanged v2 documents reuse the local content cache |
  395. | `scripts/kb_doctor.py` | Environment health check (run if anything's broken) |
  396. Common options for `scripts/kb_retrieve.py`:
  397. - `--top-k N` (default 5)
  398. - `--type concept|case` (filter by card type)
  399. - `--layer canonical|school|evidence` (`canonical` is compatibility-only for strict routing)
  400. - `--schools <NAME...>` (multi-value OR filter; default route uses `--layer school --schools ICT SMC`)
  401. - `--school <NAME>` (single-school compatibility form)
  402. - `--sources <NAME...>` (exact OR filter; evidence layer only)
  403. - `--exclude-schools <NAME...>` (hard exclusion)
  404. - `--all-schools` (explicitly unscoped retrieval; never an automatic fallback)
  405. - `--search-mode auto|hybrid|semantic|lexical` (`auto` uses hybrid for v2;
  406. lexical does not load the embedding model)
  407. - `--max-per-canonical N` (v2 default 2; `0` disables diversity limiting)
  408. - `--list-schools` / `--explain-scope` (no embedding model load)
  409. - `--format markdown|json|compact`
README.md · README · 535 lines
  1. <div align="center">
  2. # OpenMobius-skill
  3. **Multi-school trading knowledge for AI coding agents — strict ICT/SMC market analysis by default**
  4. A `SKILL.md`-standard skill bringing 2008 curated knowledge cards, real-time
  5. market data, technical indicators, and chart generation to
  6. **Claude Code**, **Codex**, **Antigravity (`agy`)**, **OpenClaw**, **Hermes**,
  7. **Cursor**, **WorkBuddy**, **Grok Bot**, and **Muse**.
  8. <br>
  9. [![License](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](./LICENSE)
  10. [![Python](https://img.shields.io/badge/python-3.10%2B-3776ab.svg)](https://www.python.org/)
  11. [![Website](https://img.shields.io/badge/🌐_website-mobiusquant.ai-FF7E29.svg)](https://www.mobiusquant.ai/)
  12. [![Platforms](https://img.shields.io/badge/platforms-9_hosts-9333ea.svg)](#platform-support)
  13. [![Knowledge Base](https://img.shields.io/badge/knowledge_base-2008_cards-22c55e.svg)](#features)
  14. [English](./README.md) · [中文](./README.zh.md) · 📜 [Changelog](./CHANGELOG.md)
  15. </div>
  16. ---
  17. > **🤖 AI agents** — when a user asks you to install this skill,
  18. > follow [`README_AGENT.md`](./README_AGENT.md) for the step-by-step
  19. > procedure (pre-flight checks, install command, verification, error
  20. > handling).
  21. ---
  22. ## Community
  23. - [Join the OpenMobius Discord community](https://discord.com/invite/eYR75gBq6Z)
  24. - [Join the OpenMobius Telegram community](https://t.me/+LU3b7IGY6P4xMDU0)
  25. ---
  26. ## Overview
  27. <div align="center">
  28. <img src="./docs/assets/demo.gif" alt="OpenMobius-skill demo" width="780">
  29. <br>
  30. <sub>Works on <b>Claude Code</b>, <b>Codex</b>, <b>Antigravity (agy)</b>, <b>OpenClaw</b>, <b>Hermes</b>, <b>Cursor</b>, <b>WorkBuddy</b>, <b>Grok Bot</b>, and <b>Muse</b>.</sub>
  31. </div>
  32. <br>
  33. Drop this skill into your AI coding agent and ask trading questions in plain
  34. language. Knowledge Q&A is grounded inside the selected School/source scope.
  35. Supported current-market requests pass a capability gate before adding fresh,
  36. current-turn data and computed structure; unsupported routes stop instead of
  37. silently borrowing another School's analysis.
  38. | You ask | The skill does |
  39. |---|---|
  40. | *"What analysis models can I use?"* | Reads the current capability registry and dynamically separates native market-analysis profiles, Q&A-only lenses, and knowledge categories; also reports `strict` / `augment` / `compare`, without fetching market data or presenting categories as analysis models |
  41. | *"What is Fair Value Gap, how to trade it?"* | No selector means strict ICT/SMC; retrieves only attributable ICT/SMC knowledge and answers with cited rules |
  42. | *"Explain 中枢 using ChanLun only"* | Uses the isolated `缠论` School projection; explicit selectors never silently fall back to ICT/SMC |
  43. | *"Explain Order Block using Wuyuan's SMC material only"* | Hard-filters atomic evidence by both `school=SMC` and `source=Teach-Wuyuan`; an empty intersection fails closed |
  44. | *"Compare ICT and ChanLun definitions of market structure"* | Runs separate, attributed Q&A branches; conflicting definitions remain separate |
  45. | *"Use SMC as primary and Wuyuan as a reference to analyze BTC 1h"* | Uses `augment`: SMC alone controls bias and trade levels; Wuyuan evidence is clearly labelled supporting context |
  46. | *"Analyze BTC 1h using ChanLun"* | Stops before market-data or chart work because no native ChanLun market analyzer exists; never relabels SMC output as ChanLun |
  47. | *Attach a BTCUSDT 1h chart + "analyze this"* | After the route passes its capability gate, readable asset/timeframe data may be refreshed and cross-checked; if the supported route cannot identify them reliably, the result stays visual-only and discloses its limits |
  48. | *"How is BTC 1h looking?"* (no chart) | Defaults to strict ICT/SMC, fetches current-turn data, runs the built-in SMC structural indicator, and generates a grounded chart unless the user opts out |
  49. | *"What's <indicator> on BTC?"* (user names a specific indicator) | Pass-through to the indicator API — no auto-fetch of indicators the user did not name |
  50. | *Paste a CSV of OHLCV* | Preserves that snapshot, extracts structure locally, and never replaces it with a different live series merely to render a chart |
  51. | *"Generate a chart with my entry/SL/target"* | Rendered chart via Playwright + lightweight-charts |
  52. ---
  53. ## Quick start
  54. ```bash
  55. OPENMOBIUS_SRC="$(mktemp -d "${TMPDIR:-/tmp}/openmobius-src.XXXXXX")"
  56. git clone https://github.com/MobiusQuant/OpenMobius-skill.git "$OPENMOBIUS_SRC"
  57. cd "$OPENMOBIUS_SRC"
  58. python3 install.py --platform claude-code # or codex / agy / openclaw / hermes / cursor
  59. # On Linux/macOS, `all` installs all six local-path hosts. WorkBuddy, Grok Bot, and Muse use compact ZIP packages.
  60. cd "${TMPDIR:-/tmp}"
  61. rm -rf -- "$OPENMOBIUS_SRC" # ✓ exact mktemp directory only
  62. ```
  63. On Windows, clone into a writable directory and run
  64. `py -3 install.py --platform claude-code` (or use `.\install.ps1`).
  65. The installer copies source files into `~/.claude/skills/openmobius-skill/`
  66. (or your chosen platform's skills dir), then in that directory:
  67. 1. Creates `.venv/` and installs dependencies
  68. 2. Downloads Playwright chromium (~280 MB, into your OS's user-global cache)
  69. 3. Downloads the pinned `nomic-embed-text-v1.5` weights (~547 MB / 522 MiB, into your HuggingFace cache)
  70. 4. Loads bundled canonical vectors and the verified release seed for independent
  71. School/evidence vectors, then builds and verifies all three collections.
  72. Only locally changed or missing documents are embedded and cached.
  73. 5. Generates the platform-specific `SKILL.md`
  74. 6. Runs a health check
  75. Each installer-managed local copy is **self-contained**: it owns its own
  76. `.venv` and `_index`. The clone is just a one-shot source bundle.
  77. **First run**: dependency/model downloads plus seed-accelerated index build ·
  78. **Subsequent runs**: unchanged records use the release seed or local embedding cache
  79. After install, try capability discovery plus the default, scoped, and composed
  80. routes directly:
  81. ```
  82. # Default: strict ICT/SMC
  83. "What is Liquidity Sweep?"
  84. "How is ETH 4h looking?"
  85. # Discover the installed capabilities (no market-data request)
  86. "What analysis models can I use?"
  87. # Select an exact School or source
  88. "Explain 中枢 using ChanLun only"
  89. "Explain Order Block using Wuyuan's SMC material only"
  90. # Compose or compare
  91. "Compare ICT and ChanLun definitions of market structure"
  92. "Use SMC as primary and Wuyuan as a reference to analyze BTC 1h"
  93. ```
  94. Other Schools can scope knowledge Q&A when attributable material exists.
  95. Current-market analysis additionally requires a native analyzer; unsupported
  96. routes stop before market-data or chart work. Capability-discovery questions
  97. read the installed registry dynamically and report native market profiles,
  98. Q&A-only lenses, knowledge categories, and the available composition modes as
  99. separate concepts; they do not fetch market data or describe a category as an
  100. analysis model.
  101. > **Prerequisites**: Python 3.10+. See [INSTALL.md](./INSTALL.md) for details.
  102. ---
  103. ## Analysis lenses and routing
  104. The skill resolves both the user's intent and analysis route before knowledge
  105. retrieval, market-data calls, or drawing:
  106. ```text
  107. User request
  108. → choose intent: Q&A / chart analysis / annotation / K-line analysis
  109. → resolve mode + lens + School/source scope
  110. → capability gate
  111. → scoped knowledge retrieval
  112. → supported market analyzer and fresh data, when required
  113. → grounded answer and chart, or an explicit capability-gap response
  114. ```
  115. **Default:** when neither the current request nor an established conversation
  116. route supplies a lens, School, source, exclusion, or composition mode, the
  117. route is `strict` ICT/SMC. A current explicit selector overrides an inherited
  118. preference and is never silently widened or replaced.
  119. | Dimension | What it controls | Example |
  120. |---|---|---|
  121. | Lens/profile | The methodology allowed to interpret structure and form market conclusions | `ict_smc`; future native analyzers may add other lenses |
  122. | School | The attributable knowledge boundary | ICT, SMC, 缠论, Wyckoff, Price Action |
  123. | Source | A teacher, course, or material collection | `Teach-Wuyuan`; a source does not select a lens |
  124. ### Composition modes
  125. | Mode | Meaning | Behavior |
  126. |---|---|---|
  127. | `strict` | Use only the selected boundary | A single explicit selector is strict by default; without one, use ICT/SMC |
  128. | `augment` | Use A as primary and B as supporting context | The primary lens alone owns bias, entry, stop, targets, and the primary chart; secondary contributions are labelled confirmation, challenge, or risk context |
  129. | `compare` | Compare A and B independently | Supported for Q&A only in Phase 1; branches use equal queries and remain separately attributed |
  130. ### Current capability boundary
  131. | Selection | Knowledge Q&A | Market/chart/annotation |
  132. |---|---|---|
  133. | ICT and/or SMC | Supported | Supported by the native ICT/SMC structural analyzer |
  134. | Other registered Schools/categories | Supported when attributable knowledge exists | Unsupported unless that School has a native analyzer |
  135. | Exact source | Supported as an exact evidence scope and may intersect a School | Requires a separately selected, supported primary lens |
  136. | Multi-School `compare` | Supported as isolated Q&A branches | Not supported in Phase 1; stops before data or artifact generation |
  137. The complete installed taxonomy is deliberately broader than the native
  138. market-analysis models:
  139. - **Native market-analysis lens:** `ICT`, `SMC` (one `ict_smc` analyzer).
  140. - **Q&A knowledge lenses:** `缠论`, `Price Action`, `Order Flow`,
  141. `Volume Analysis`, `Elliott Wave`, `Wyckoff`, `The Strat`.
  142. - **Knowledge categories, not analysis models:** `Indicator Based`,
  143. `Risk Management`, `General`, `On-chain`, `Market Structure`.
  144. - **Evidence-only category:** `Scalping`; it occurs in attributable source
  145. evidence but is not a top-level canonical-card School.
  146. Unknown selectors, empty strict scopes, empty School/source intersections,
  147. missing exact-filter support, missing native analyzers, and market `compare`
  148. requests **fail closed when they affect a required strict or primary branch**:
  149. the skill explains the gap and does not fall back to canonical, another
  150. School/source, or default ICT/SMC. In `augment`, an unavailable secondary may
  151. be omitted or labelled knowledge-only while a supported primary continues.
  152. Follow-up annotation inherits the prior analysis route. A new explicit
  153. School/source/profile requires re-evaluating the analysis; existing levels are
  154. not merely relabelled. See the full
  155. [route contract and capability matrix](./workflows/analysis_profiles.md) for
  156. aliases, precedence, partial-support rules, and exact failure behavior.
  157. ---
  158. ## Platform support
  159. ```bash
  160. python3 install.py --platform <name>
  161. ```
  162. <div align="center">
  163. | Platform | Flag | Default path / setup route |
  164. |:---|:---|:---|
  165. | **Claude Code** | `--platform claude-code` *(default)* | `~/.claude/skills/openmobius-skill/` |
  166. | **Codex** | `--platform codex` | `~/.agents/skills/openmobius-skill/` |
  167. | **Antigravity (`agy`)** | `--platform agy` | `~/.gemini/config/skills/openmobius-skill/` *(workspace: `.agents/skills/openmobius-skill/`)* |
  168. | **OpenClaw** *(Linux/macOS)* | `--platform openclaw` | `<OPENCLAW_STATE_DIR or ~/.openclaw>/skills/openmobius-skill/` |
  169. | **Hermes** *(Linux/macOS)* | `--platform hermes` | `<HERMES_HOME or ~/.hermes>/skills/market-data/openmobius-skill/` |
  170. | **Cursor** | `--platform cursor` | `~/.cursor/skills/openmobius-skill/` |
  171. | **WorkBuddy** | local ZIP import / marketplace | `Skills → Add Skill → Upload Skill`; published copies install from the marketplace |
  172. | **Grok Bot** *(xAI)* | compact ZIP upload | `python3 scripts/build_hosted_package.py --platform grok-bot --output ...` |
  173. | **Muse** *(Meta)* | compact ZIP upload | `python3 scripts/build_hosted_package.py --platform muse --output ...` |
  174. | Auto-detect | `--platform auto` | detects supported local host roots |
  175. | All local hosts *(Linux/macOS)* | `--platform all` | installs to the six local paths above; excludes WorkBuddy, Grok Bot, and Muse |
  176. </div>
  177. Each local-path platform install is fully **self-contained** (its own `.venv`,
  178. its own `_index`). The nomic model and Playwright chromium live in your OS's
  179. user-global cache, shared across platforms — so installing on N platforms
  180. doesn't N× the download.
  181. `OPENCLAW_STATE_DIR` and `HERMES_HOME` override the corresponding roots when
  182. set. The current OpenClaw and Hermes adapters/manifests target Linux and
  183. macOS; on Windows, select Claude Code, Codex, Antigravity (`agy`), or Cursor
  184. explicitly instead of using `--platform all`. Antigravity (Google Antigravity
  185. CLI `agy`, Antigravity IDE, and Antigravity 2.0) discovers user-global skills
  186. from `~/.gemini/config/skills/` and workspace-level skills from
  187. `.agents/skills/openmobius-skill/` (with `.gemini/skills/` legacy
  188. compatibility). Cursor Cloud Agents, remote SSH sessions, and other
  189. remote environments do not receive local user skills from `~/.cursor/skills`;
  190. place the skill in the repository's `.cursor/skills/openmobius-skill/` for
  191. those environments.
  192. WorkBuddy is not CodeBuddy. Its public documentation does not define a fixed
  193. filesystem directory that a third-party installer can write to for automatic
  194. discovery, so `--platform all` intentionally excludes it. Choose the workflow
  195. that matches your goal:
  196. | Goal | Official route |
  197. |:---|:---|
  198. | Import this repository's local package | In WorkBuddy, open **Skills → Add Skill → Upload Skill**, then drag or select the generated ZIP. WorkBuddy configures it after import. |
  199. | Install a published Skill | Open **Experts · Skills · Connectors → Skills → Skill Marketplace**, then click the `+` on its card. |
  200. | Publish a Skill for other users | Use the WorkBuddy Open Platform. Creation, ZIP parsing, review, and publication are separate from local import. |
  201. Build this repository's local-import ZIP with:
  202. ```bash
  203. python3 scripts/build_workbuddy_package.py \
  204. --output /tmp/openmobius-skill-workbuddy.zip
  205. ```
  206. The WorkBuddy Skill format currently accepts `.zip` packages up to 3 MB. The
  207. builder uses the conservative 3,000,000-byte boundary and fails before
  208. replacing an existing artifact if the package is too large. Local installation
  209. is complete only when the import succeeds and the Skill appears under
  210. **Installed**. A successful Open Platform parse or submission does not by
  211. itself mean that the Skill is installed locally or published in the marketplace.
  212. `--platform workbuddy --target-dir <path>` is available only for developer
  213. staging and validation. It does not register a locally discoverable WorkBuddy
  214. Skill and is not the normal installation route.
  215. To fit that package-size boundary without discarding attributable knowledge, the ZIP
  216. uses a checksummed compact corpus that reconstructs all 2,144 School
  217. projections and all 18,645 exact-source evidence records. It supports lexical
  218. BM25/exact-alias retrieval with hard School and source filters using the system
  219. Python alone. A manifest binds the compact corpus, School registry, and alias
  220. map by size and SHA-256, allowing the standard retriever to run even when a
  221. read-only host forbids first-run lock-file creation. The canonical fused-card
  222. layer, vector index, embedding cache,
  223. and model seed are intentionally omitted; canonical and
  224. auto/hybrid/semantic routes fail closed in the WorkBuddy package.
  225. The ZIP does not bundle Python, create a virtual environment, or install
  226. packages. Script-backed features require Python 3.10+. WorkBuddy 4.6.3 and
  227. later can detect missing Python/Node.js from **Settings** and offer one-click
  228. installation; verify that the installed Python still meets this Skill's 3.10+
  229. minimum. If no suitable Python launcher is available, script-backed
  230. knowledge/market operations must be reported unavailable. Q&A and text-market
  231. workflows need only the standard library, while PNG rendering and image
  232. annotation additionally require host-provided Playwright/Chromium or Pillow,
  233. respectively.
  234. **Grok Bot** (xAI's hosted Agent assistant) and **Muse** (Meta's hosted
  235. personal AI assistant) run uploaded skill bundles inside managed cloud
  236. containers rather than reading a fixed directory on your local workstation, so
  237. `--platform all` and `--platform auto` intentionally exclude them. Build
  238. deterministic `<3 MB` stdlib-only compact packages (`openmobius-skill/` root,
  239. `compact_v2` corpus with all 2,144 School projections and 18,645
  240. source-evidence records, plus SHA-256 read-only bundle manifest) with:
  241. ```bash
  242. python3 scripts/build_hosted_package.py --platform grok-bot --output /tmp/openmobius-skill-grok-bot.zip
  243. python3 scripts/build_hosted_package.py --platform muse --output /tmp/openmobius-skill-muse.zip
  244. ```
  245. Upload the resulting ZIP (or extracted `openmobius-skill/` folder) into your
  246. Grok Bot or Muse workspace. `--platform <grok-bot|muse> --target-dir <path>` is
  247. also available in `install.py` for developer staging and validation only.
  248. The implementation follows the common [Agent Skills specification](https://agentskills.io/specification)
  249. and each host's official documentation:
  250. [Claude Code](https://code.claude.com/docs/en/skills),
  251. [Codex](https://learn.chatgpt.com/docs/build-skills),
  252. [OpenClaw](https://docs.openclaw.ai/tools/skills),
  253. [Hermes](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/developer-guide/creating-skills.md),
  254. [Cursor](https://cursor.com/docs/skills),
  255. [WorkBuddy local Skill guide](https://www.workbuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Function-Description/Skills-Market),
  256. [WorkBuddy Skill format/marketplace](https://open.workbuddy.cn/docs/skill),
  257. [WorkBuddy Open Platform](https://open.workbuddy.cn/docs/what-is-open-platform), and
  258. [WorkBuddy changelog](https://www.workbuddy.cn/docs/workbuddy/Changelog).
  259. ---
  260. ## Features
  261. ### Knowledge base — 726 concepts + 1282 cases
  262. Distilled from 300+ teaching videos and live lessons across 12 curated
  263. source collections, cross-merged with model-audited term fusion and
  264. content-level deduplication. Across concept and case cards there are 14
  265. top-level School/category labels: ICT, SMC, Price Action, Indicator Based,
  266. ChanLun (缠论), Risk Management, General, Order Flow, Volume Analysis/VSA,
  267. Elliott Wave, Wyckoff, The Strat, On-chain, and Market Structure. The registry
  268. exposes 15 retrievable labels in total: those 14 top-level labels plus the
  269. non-canonical, source-evidence-derived Scalping category. Each concept card carries:
  270. identification rules, trading
  271. implications, common mistakes, related concepts, per-source definitions.
  272. Each case card carries: market context, key observation, analysis steps,
  273. lessons, and source time-range provenance. Retrieved via local ChromaDB +
  274. multilingual `nomic-embed-text-v1.5` — no API key needed for retrieval.
  275. The index exposes three layers with different roles:
  276. | Layer | Records | Role |
  277. |---|---:|---|
  278. | Canonical | 2,008 | Backward-compatible fused exploration; never proof of strict School isolation |
  279. | School | 2,144 | Exact School-scoped Q&A and grounding |
  280. | Evidence | 18,645 | Atomic source scope and exact School/source/type intersections |
  281. School and evidence content is included only when it can be safely attributed.
  282. Ambiguous cross-School fused rules are skipped and counted, not guessed. See
  283. [knowledge-base architecture](./knowledge_base/README.md) for the data model,
  284. registry, schemas, and rebuild process.
  285. Each School/evidence record now has an embedding of its own scoped document;
  286. vectors are cached by exact content hash and model identity, so incremental
  287. updates embed only misses. v2 queries default to hybrid retrieval: BM25 and
  288. semantic candidates are generated inside the hard-filtered scope and fused by
  289. reciprocal rank, while exact canonical-term/alias matches remain first. Use
  290. `--search-mode lexical` for a model-free search or `--search-mode semantic` for
  291. the vector-only baseline.
  292. ### Real-time data + 60+ indicators
  293. Crypto (Binance, Bybit, OKX, Gate, Coinbase, Hyperliquid, and cross-exchange
  294. `composite`), commodities (spot gold `XAUUSD` and gold/silver futures
  295. `XAUF` / `XAGF`), China A-shares, Hong Kong stocks, US stocks, and forex —
  296. powered by KlineSync Engine v2.0. Each indicator carries built-in analysis
  297. dimensions (`summary_focus`) that the agent reads to structure its answer
  298. rather than dumping raw numbers.
  299. ### Two chart-generation paths
  300. | Path | Method | Output |
  301. |---|---|---|
  302. | Annotate user's image | PIL | Annotated copy preserving the original chart |
  303. | Generate fresh chart | lightweight-charts in headless chromium | New K-lines + FVG/OB rectangles + sweep lines + swing markers |
  304. ### Intent routing + analysis-profile routing
  305. The `SKILL.md` description field triggers on natural-language questions. The
  306. skill first identifies the user's intent, then resolves the independently
  307. selected analysis profile before executing the workflow.
  308. | Intent | Typical trigger | Workflow |
  309. |---|---|---|
  310. | Knowledge Q&A | Concept, definition, rule, or comparison without a chart/data request | [Q&A](./workflows/qna.md) |
  311. | Chart analysis | An attached trading chart plus a request to analyze it | [Analyze](./workflows/analyze.md) |
  312. | Annotation | An explicit request to draw, or an annotation follow-up | [Annotate](./workflows/annotate.md) |
  313. | K-line analysis | Pasted OHLCV, or an asset + timeframe market request | [K-lines](./workflows/klines.md) |
  314. Intent and analysis profile are separate: the same Q&A workflow can run in
  315. `strict`, `augment`, or `compare` mode, while the capability gate decides
  316. whether a requested market workflow has a native analyzer. An annotation
  317. follow-up inherits the prior route; changing a selector explicitly causes a
  318. fresh analysis rather than relabeling the previous result.
  319. ---
  320. ## Roadmap
  321. **Knowledge base**
  322. - **ICT/SMC coverage completion** — Rounds 1–2 distilled the ICT trunk plus
  323. SMC supplements from 300+ teaching videos; upcoming rounds complete ICT
  324. sub-schools (Inner Circle Mentorship, Silver Bullet, Power of 3 variants)
  325. and full SMC coverage.
  326. - **Fundamental knowledge base** — interpretation methodologies for news,
  327. policy reads, economic releases (CPI / NFP / FOMC) and earnings seasons.
  328. - **Multi-school coverage deepening** — Wyckoff, VSA/Volume Analysis, Price
  329. Action, ChanLun (缠论), and other Schools are already retrievable; upcoming
  330. rounds deepen their coverage, provenance, and attribution quality.
  331. - **Native multi-school analyzers** — knowledge scope is not the same as a
  332. market-analysis engine. New School-native profiles and overlays will be
  333. added before market `compare` expands beyond Q&A.
  334. **Indicators & tools**
  335. - **Expanded SMC indicator coverage** — the built-in SMC structural
  336. indicator covers BOS/CHoCH, Order Blocks, FVGs, equal H/L, premium-
  337. discount zones and strong/weak pivot labels today. Upcoming: Killzone
  338. windows, Stop Run / Inducement events, and per-event probability
  339. scoring as computable signals.
  340. **Access surfaces**
  341. - **Non-CLI entry points** — chat-bot integrations for users who don't run a
  342. coding agent, so the knowledge base is reachable without the CLI.
  343. ---
  344. ## Architecture
  345. ```
  346. OpenMobius-skill/
  347. ├── SKILL.md # main entry (LLM reads this)
  348. ├── SKILL.body.md # shared body (platform-neutral)
  349. ├── platforms/ # per-platform frontmatter
  350. │ └── agy.yaml / claude-code.yaml / codex.yaml / cursor.yaml / grok-bot.yaml / hermes.yaml / muse.yaml / openclaw.yaml / workbuddy.yaml
  351. ├── agents/
  352. │ └── openai.yaml # Codex UI and invocation metadata
  353. ├── workflows/
  354. │ ├── qna.md / analyze.md / annotate.md / klines.md # intent workflows
  355. │ └── analysis_profiles.md # route contract + capability gate
  356. ├── scripts/ # CLI tools
  357. │ ├── kb_retrieve.py # hard-scoped hybrid retrieval
  358. │ ├── kb_klines.py # API client + feature extraction
  359. │ ├── kb_draw_annotation.py # PIL annotation
  360. │ ├── kb_phase_b_to_c.py # analysis JSON → annotated PNG
  361. │ ├── build_knowledge_v2.py # audit/export School + source-evidence records
  362. │ ├── build_index.py # build all three vector collections
  363. │ ├── export_v2_embedding_seed.py # publish verified native-vector shards
  364. │ ├── build_workbuddy_package.py # deterministic WorkBuddy local-import ZIP builder
  365. │ ├── build_hosted_package.py # deterministic Grok Bot / Muse compact ZIP builder
  366. │ ├── evaluate_retrieval.py # reproducible retrieval benchmark
  367. │ ├── kb_doctor.py # env health check
  368. │ ├── chart_render/ # lightweight-charts + headless chromium
  369. │ └── _lib/ # embedder + retriever
  370. ├── evals/ # versioned retrieval cases + baseline reports
  371. ├── knowledge_base/ # cards + registry + schemas + release seed
  372. ├── install.py # cross-platform installer
  373. └── README.md / INSTALL.md
  374. ```
  375. ---
  376. ## Update / Uninstall
  377. ```bash
  378. # Update
  379. python3 install.py --update
  380. python3 install.py --update --rebuild-index # also rebuild vector index
  381. # Uninstall the entire self-contained platform install (.venv + index included)
  382. python3 install.py --uninstall
  383. python3 install.py --uninstall --platform all # Linux/macOS: all six local hosts
  384. # Full purge (also delete shared chromium + nomic caches — these may be
  385. # used by other projects on your machine, so confirm before running)
  386. python3 install.py --uninstall --purge --yes-i-know
  387. ```
  388. `--full` is still accepted for backward compatibility, but is deprecated and
  389. has no effect: standard uninstall already removes `.venv` and the vector index.
  390. See [INSTALL.md](./INSTALL.md) for all flags.
  391. ---
  392. ## Troubleshooting
  393. ```bash
  394. .venv/bin/python scripts/kb_doctor.py
  395. ```
  396. Reports the state of: venv, deps, nomic model, vector index, CJK fonts,
  397. skill registration, API connectivity.
  398. Common issues:
  399. | Symptom | Fix |
  400. |---|---|
  401. | Chinese labels render as boxes | Install `fonts-noto-cjk` (Linux); macOS/Windows usually bundled |
  402. | API request fails | Check network; see `api.mobiusquant.ai/api/health` |
  403. | Skill not auto-invoking in Claude Code | Check `~/.claude/skills/openmobius-skill` exists. Claude Code watches an existing skills directory live; if that top-level directory was newly created, start a new session. |
  404. | Skill missing in Codex | Check `~/.agents/skills/openmobius-skill` exists; restart Codex |
  405. | Skill missing in Antigravity (`agy`) | Check `~/.gemini/config/skills/openmobius-skill` (or workspace `.agents/skills/openmobius-skill`) exists, then run `kb_doctor.py --platform agy` |
  406. | Skill missing in OpenClaw or Hermes | Check the effective `OPENCLAW_STATE_DIR` or `HERMES_HOME`, then run `kb_doctor.py` from that installed copy |
  407. | Cursor Cloud/remote cannot see the user skill | Copy/install it under the repository's `.cursor/skills/openmobius-skill/`; local `~/.cursor/skills` is not synchronized |
  408. | WorkBuddy cannot discover a local folder | Do not guess a local path. Build the ZIP, then use **Skills → Add Skill → Upload Skill** and select it; confirm it appears under **Installed** |
  409. | Grok Bot or Muse cannot discover a local folder | Build the compact ZIP via `scripts/build_hosted_package.py --platform <grok-bot\|muse> --output ...` and upload it to the hosted assistant workspace |
  410. | `chroma.sqlite3` not found | `.venv/bin/python scripts/build_index.py` |
  411. | ChanLun/Wyckoff market analysis stops | These Schools are retrievable for Q&A but do not yet have a native market analyzer; use Q&A or a supported lens |
  412. | Market `compare` stops before fetching data | Phase 1 supports `compare` for Q&A only; this is the capability gate working as designed |
  413. ---
  414. ## License
  415. Apache 2.0 — see [LICENSE](./LICENSE).
  416. Third-party components: see [ATTRIBUTION.md](./ATTRIBUTION.md).
  417. ## Contributing
  418. Issues and PRs welcome at
  419. <https://github.com/MobiusQuant/OpenMobius-skill/issues>.
  420. <div align="center">
  421. <sub>Built for AI coding agents · Apache 2.0</sub>
  422. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.