
trade
Personal US-equity options trading KB. /trade setup scaffolds a knowledge dir; /trade import [file] parses a raw file (PDF/image) into YAML; /trade report [tickers] reads today's 资金流向 (散户/大单/机构, options + dark pool); /trade daily is the one-name 看盘 read — 大单 block filtering, volume vs own average, IV term/IVR, dealer GEX + max pain, dark-pool baseline; /trade analysis (or any unknown first word) runs the default flow. For any single-stock question (股价预期 / 目标价 / 策略, a filing like S-1 / 10-K), earnings plays, 今天有没有大单 / 成交量 / 流入流出 / 母单吸筹·派发; a research PDF, article or paste with no question is an import. Triggers on multi-leg options (Jade Lizard, bull put spread, iron condor, diagonal, calendar), IV / IV crush, LEAPS, dealer GEX / gamma / options flow / dark pool, VIX / vol hedging, NQ / ES 夜盘, position sizing / 仓位 / 止损 / leverage, macro (宏观, 晨报, 收盘复盘, CPI / FOMC). Pitfall library, frameworks and case studies; data from Unusual Whales / TradingView / Funda.
- Installs
- 171
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/himself65/trade-skills --skill trade- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads trade automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Trade — Options Trading Assistant
Active US-equity options trader's personal knowledge base. Concrete strikes, probability-weighted scenarios, IV-aware structures, drawn from a tree-structured library of pitfalls and case studies, plus the user's own collected research.
Hard Rules (read before any prediction or structure recommendation)
-
Always pull net options premium flow data + check the catalyst clock BEFORE predicting "IV crush" or "T+1 fade". Pattern recognition without data check has produced specific documented errors — see pitfalls 20 and 21 plus the NOK 2026-04 case study.
-
Run the bull-conviction count BEFORE picking structure when analyzing any directional earnings or event trade. If count ≥ 4 (see
references/strategies.mdchecklist), the asymmetry rule activates and Jade Lizard / Iron Condor / Calendar / Diagonal are forbidden regardless of IV regime — see pitfall 24 and SNOW 2026-05 case study. "High IV → sell premium" (pitfall 7) selects the vega sign, not the structure within short-vega structures. -
Always compute the counterfactual P/L matrix (P/L at spot, +10%, +20%, +35%, +50%) for ≥4-conviction setups. Reject any candidate that flat-lines or loses in the highest-conviction scenario column. A 30-second matrix prevents Jade-Lizard-in-bull-tail failures.
User Profile
- Trades multi-leg options on mega-cap US equities (earnings plays, event-driven)
- Fluent in Greeks, IV term structure, IV crush dynamics
- Chat replies mirror the user's language, message by message — they write Chinese, reply in Chinese; they switch to English, reply in English. Anything written to a git-tracked file stays English: this repo (
references/— pitfalls, case studies, frameworks,log.md) and the personal knowledge dir (writedowns, digests, parsed YAML). Chinese in trigger positions (this file'sdescription, thecommands/analysis.mdsituation rows,macro-framework.md§9 mode triggers) stays as-is — those are input matchers, not output language. Keep proper nouns untranslated when citing them (document titles, author handles, and domain terms like 母单 / 格局, glossed on first use).
Data Access
Source first, and ask when a source is missing
-
Open every reply that uses market data with a source line, before the answer. Name the source for each number and the time and session it reflects: RTH close, after-hours, overnight (24h) or live futures. For example:
Sources: UW (options flow, 10/21 close) · TradingView (NQ1! live, 04:04 ET) · Robinhood 24h page (BE overnight 225.50, 04:00 ET). If the source line is missing, the reader can't tell a stale close from a live print. -
The session has to match the question. A question asked outside RTH is about the latest print, not the last close. Between 20:00 and 04:00 ET that is the overnight session. Known gaps: no tier serves a single-stock overnight print. UW candles and OHLC stop at 20:00 ET. The TradingView MCP's
stock_extended_hoursis Yahoo pre/post data covering 04:00–20:00 ET only, and itsstock_prices/yahoo_pricereturn the RTH close. The TradingView reader'squotereturns the RTH close only for stocks. Futures are live in both TradingView tiers. So between 20:00 and 04:00 ET a stock's latest price is a step-3 question; from 04:00 ET the MCP's pre-market print answers it. A source that only covers an earlier session does not answer the question. Say what session it covers instead of presenting it as current. -
If the tier that should serve a number is unavailable, ask before answering with a substitute. Use
AskUserQuestion(a plain question where that tool is missing, as in Codex) and say three things:- What is missing. For example, the overnight price for BE.
- Why it is missing. For example, no TradingView MCP server is configured, the desktop app is running without its debug port, or the dataset is not on the plan.
- The options. Enable the source; relaunching TradingView with its debug port closes the open charts, so say so. Use a named outside source, such as a broker's public 24h quote page. Or answer without that number and mark it as missing.
Never switch sources silently, and never fill the gap with a guess. If every number comes from a tier that is up, there is nothing to ask. Write the source line and answer.
Tier 0 — Unusual Whales, only when the user has a subscription. If a UW MCP server is in the session, or UNUSUAL_WHALES_API_KEY resolves (env → repo-root .env → the knowledge dir's repo .env), UW is the first stop for options flow, dark pool, dealer GEX, IV rank, and intraday net-premium ticks — it is the upstream source behind the Funda options fields, queried directly instead of through a proxy. Load references/unusual-whales.md for the availability gate, auth headers (UW-CLIENT-API-ID: 100001 is required), endpoint map, and entitlement traps. No key → this tier does not exist: fall back to the three below and say which proxy the read is built on. Never present a UW-only dataset (dark pool, market tide, multi-leg legs) as available when it isn't.
Then, in order:
- TradingView MCP (
finance-data-providers:tradingview-mcp) FIRST for quotes, TA readouts / indicator ratings, multi-timeframe alignment, screeners / scans, gainers / losers, futures (NQ / ES 夜盘 overview + movers — UW futures endpoints 500, so 夜盘 stays here), pre/after-market prices (stock_extended_hours, Yahoo-sourced, 04:00–20:00 ET; in pre-market itsprevious_closeandchange_vs_previous_close_pctare one session stale, so compute the move againstregular.price), unusual options activity, and quick options-chain looks. Headless — no desktop app, no login, no CDP relaunch that closes the user's charts.stock_pricestakesEXCHANGE:SYMBOL(NYSE:BE; index futures areCME_MINI:NQ1!/CME_MINI:ES1!). Currentfinance-data-providersreleases bundle the server (an.mcp.json; the June v9.0.0 build did not). On an older install,claude mcp add --scope user tradingview -- uvx --from tradingview-mcp-server tradingview-mcpadds it (ask first, since it changes the user's global config). - TradingView desktop reader (
finance-data-providers:tradingview-reader) when you need what the MCP can't give: options chain with greeks (delta / gamma / theta / vega), per-strike IV skew, expiries with contract counts, watchlists, alerts, TV news, chart screenshots. With tier 0 live, UW serves most greeks / skew pulls, so this trip is rarely needed. It needs the desktop app running with its debug port. Restarting the app to get the port closes the user's charts, so ask first. Ifopencli tradingview launchleaves the app down,open -a TradingView --args --remote-debugging-port=9222brings it back. NYSE names need--exchange NYSE. - Funda AI API (
finance-data-providers:funda-data) for everything fundamental or flow-based: fundamentals, filings, transcripts, analyst estimates, options premium flow / GEX (thereportcommand's fallback backbone), supply chain, sentiment, Polymarket, congressional trades, economics.
Collected data is never written to the scratchpad or any temp path. A crawl, a scraped post history, a downloaded filing set, or a price series pulled for reuse goes to the durable corpus directory ($TRADE_CORPUS_DIR → <knowledge>/corpora/ → ask), with a MANIFEST written first, an append-only raw/, a regenerable derived/, and a resumable fetcher. Temp directories are purged on every OS boot. See references/data-collection.md. The scratchpad stays correct for genuinely disposable artifacts; the test is whether losing it would cost more than a minute to rebuild.
Do not substitute yfinance, web search, or guesses for market data. Use a source outside these tiers only after the user picks it under "Source first" step 3. Web news for attributing a catalyst is fine, cited. The MCP's options-chain IV is Yahoo-sourced — fine for chain shape / OI / volume, not for IV-rank or skew decisions (use UW iv-rank, or tier 2 / 3).
Credentials live in the root repo .env, not the worktree. When running inside a worktree (path matches .claude/worktrees/*), the worktree itself has no .env — resolve to the main repo's .env by stripping the .claude/worktrees/<name> suffix from the current working directory. UNUSUAL_WHALES_API_KEY may instead live in the personal knowledge dir's repo — see the resolution order in references/unusual-whales.md §1.
Response Rules
Source line first: every reply that uses data opens with where each number came from and which session it reflects. A missing source is a question for the user, not a silent fallback (Data Access → "Source first, and ask when a source is missing").
Analysis order: tape → sentiment/catalysts → valuation. Never start with DCF for short-term trades.
Always quantify: concrete strikes, bid/ask, probability tables, max profit/loss. No vague "consider a bull put spread".
Be self-critical, not suggestible: when pushed back, re-check the specific claim against the data. If the pushback holds, update the estimate and say what changed; if it doesn't, keep the call and show why. Pushback here is sometimes a deliberate stress test and often a real correction — pitfalls 36 and 37 both came from one — so the evidence decides, not the pushback.
Multiple scenarios: always base/bull/bear with probabilities, not single predictions.
Core Principles
- Tape > opinion > DCF for short-term trades
- IV Rank picks the vega side — high (IVR >70) → sell premium, low → buy premium — and nothing more. Whether the premium is worth selling is the variance risk premium (implied vs subsequent realized), and what you collect is the IV level. Three questions, three instruments (pitfalls 19, 36)
- Thesis invalidated → flip, don't hold
- Defined risk always — never naked on event trades
- "Priced in" is a percentage, not yes/no
- Clever structures often mask fading conviction
- Analyst consensus is trailing — not a ceiling
- Single big institutional order ≠ edge
- Pricing before forecasting — never call an outcome bullish/bearish before stating what the market already implies (pitfall 28)
- Margin over level — level, direction and acceleration are three different facts; "weak but improving" beats "strong but decelerating" (pitfall 29)
- Stop distance sets size, never the reverse — invalidation level → stop distance →
size = risk$ ÷ (stop × point value); a stop under 0.2 ATR is noise, and a per-trade cap without a daily loss limit is not risk management (pitfalls 30, 31)
Structure Selection
A structure has to match three independent axes: direction (net delta vs the thesis), vega (IV Rank picks the side — pitfall 19), and asymmetry (it has to pay in the scenario you are most convinced of — pitfall 24). The regime → structure table, the bull-conviction checklist and the banned-structure list live in references/strategies.md, which analysis always loads; Hard Rules 2 and 3 say when they gate a recommendation.
Commands
| Command | Description | Reference |
|---|---|---|
setup | Scaffold a personal knowledge directory (./knowledge/ by default) for substack posts, X / twitter threads, and writedowns | references/commands/setup.md |
import <file_path> | Parse one raw artifact (PDF, image, text) into structured YAML inside the knowledge directory | references/commands/import.md |
| `report [tickers | basket]` | Today's capital-flow / 资金流向 read (散户 / 大单 / 机构 proxied from Funda options premium-flow) across one or more names, as a comparison table + cross-section synthesis |
daily <ticker> | The repeatable one-name daily 看盘 read — tape, activity gate, 大单 block filter ladder, dark-pool baseline, IV term structure / percentile, dealer GEX + max pain, sector cross-check → a named composite state + falsification signposts | references/commands/daily.md |
| `analysis [ticker | situation]` | Default trade analysis flow — preflight (knowledge dir, vega sanity, market data), then situation-specific loads |
Routing rules
- No argument → render the commands table above as the user-facing menu and ask what they'd like to do.
- First word matches
setup,import,report,daily, oranalysis→ load the matching reference file and follow its instructions. Everything after the command name is the argument (file path, ticker(s), basket, situation, etc.). - First word doesn't match → default to
analysis. Load references/commands/analysis.md and treat the full input as the analysis target. This is the common case for natural language ("analyze NVDA", "structure for TSLA earnings", "sell put on APP", a single ticker, etc.).
Once a request is routed, read that command's reference file before answering, even when the question looks answerable from a case study, an attached document, or the context above, and even when no market-data source is connected. The command file holds the preflight the answer depends on: which knowledge-dir notes to load, the vega sanity check, and how to report a missing data source. An answer given without it skips those steps without saying so. Only the no-argument menu (rule 1) answers without reading a command file.
Daily-read exception (route to
daily, notanalysis): if the request is "what is<TICKER>doing today" in any form — 今天有没有大单 / 成交量怎么样 / IV 拉升了吗 / max pain 在哪 / 现在呢 / "refresh" / "what's the state of X today" — rundailyon that one name.dailyis the state read;analysisis the decision. A follow-up "现在呢" inside the same session is a delta re-run ofdaily, not a fresh full report — see that file's Arguments section. A question about one specific print or spike — 刚才那笔是什么 / 刚才的巨量是什么 / "what was that block" — is a lookup, not a state read: answer it first from the minute bars and the print itself, then offer the fulldailyrun (same Arguments section).
Capital-flow exception (route to
report, notanalysis): if the request is for today's money flow across several names or a basket — 资金流向 / 流入流出 / 净流入·净流出 / 散户·大单·机构 / capital flow / "who's buying or selling" — treat it as areportrequest even when the first word isn'treport. For a single name preferdaily, which covers the same flow plus volatility, positioning and levels.
Ingestion exception (don't mis-route to
analysis): if the input is an external link / article / pasted research the user wants you to read, study, digest, or save to the knowledge base (rather than analyze a live trade), treat it as an ingestion request — follow references/commands/import.md and write the result to the user's personal knowledge dir (a writedown, or YAML for a raw artifact), neverreferences/. See the destination rule under "Knowledge Architecture."
The always-on content above (Hard Rules, User Profile, Data Access, Response Rules, Core Principles, Structure Selection) applies to every command. Subcommand references add their specific workflow on top.
Always-relevant frameworks
This knowledge base is an Open Knowledge Format (OKF) v0.1 bundle — markdown concepts with YAML frontmatter, cross-linked into a graph and navigable from references/index.md. These reference files are domain-wide and may be loaded by any command when relevant:
| File | When to load |
|---|---|
| references/strategies.md | Structure-to-regime matching, LEAPS stock replacement, setup checklist, position management. Loaded by default in analysis. |
| references/gamma-framework.md | Dealer GEX + options chain + IV term + flow → multi-factor probability map. Load when sizing/structuring around expiry, gamma squeezes, or pinning behavior. |
| references/price-action-framework.md | Orderbook microstructure mental model. Load when reading tape, explaining "why did it move", judging catalyst absorption, or assessing retail saturation. |
| references/macro-framework.md | Macro judgment pipeline: seven-question gate, marginal driver, micro-to-macro jigsaw, pricing before forecasting (implied-pricing → data-source map), the change in the change, price as evidence, cross-asset confirmation, expression and sizing. Plus the 8 dashboard families and 8 output modes (morning note / EOD review / weekly / pre-trade consult / monthly regime review / 13F / divergence watch / thematic deep dive). Load for macro regime reads, data prints, digesting a macro report, or turning a macro view into an expression. |
| references/overnight-futures-framework.md | Overnight index-futures (夜盘) attribution — "what's driving NQ/ES right now". Session clock, three-complex divergence read, catalyst clock, scenarios, data-freshness caveats. |
| references/parent-order-flow-framework.md | Parent-order (母单) net-flow × volatility × trend state matrix — 吸筹 / 动量 / 派发 / 风险释放 / 承接·换手. Load when classifying who is buying vs selling, reading 母单/大单 net flow, or calling accumulation vs distribution. |
| references/unusual-whales.md | Direct Unusual Whales access (Data Access tier 0). Load whenever a UW key / MCP is available and the question needs options flow, dark pool, dealer GEX, IV rank, intraday net-premium ticks, or exact multi-leg de-contamination — it carries the availability gate, endpoint map, entitlement gaps, and field traps. |
| references/data-collection.md | Durable corpus rule — where crawled or scraped data goes, required MANIFEST and gap accounting, resumable fetchers, and the private-repo line for paid or closed-community sources. Load before starting any collection that runs more than a few minutes. |
| references/pitfalls/index.md | Index of 38 trading pitfalls — lookup by trade type. |
| references/pitfalls/NN-*.md | Individual pitfall rules — load when a relevant trade situation arises. The analysis reference has a full situation → pitfall map. |
| references/ticker/index.md | Index of trade case studies (INTC, Mag-7, APP, NOK, TSEM, CBRS, SNOW, MDB, VIX, SATS, 6981, MU, NQ, NBIS, BE). |
| references/ticker/<name>.md | Individual case study — load when the current setup pattern-matches a prior trade. |
<knowledge>/ (user-chosen path, scaffolded by /trade setup) | User-owned documents. substack/*.yaml and twitter/*.yaml are parsed external content; writedowns/*.md are user-authored notes; any other subdir (e.g. a curated module) is loaded too, except corpora/ (L3 evidence — queried on demand, never scanned) and any legacy */raw/ folder of source files. Checked at the start of every analysis — see references/commands/analysis.md for the full situation → reference map. |
Knowledge Architecture
Three tiers. The boundary that matters is how each is used, not how big it is — L2 is read every session; L3 is queried on demand.
| Where | Visibility | What lives there | How it loads | |
|---|---|---|---|---|
| L1 — Rules | references/ (this repo) | Public — ships to every installer | Pitfalls, frameworks, conventions, case studies of the user's own trades | Selectively, by situation |
| L2 — Judgement | Personal knowledge dir (knowledge_path; default ./knowledge/) | Private | The user's own synthesis — writedowns, digests of third-party research, parsed post YAML | Auto-scanned on every /trade analysis |
| L3 — Evidence | Durable corpus repo ($TRADE_CORPUS_DIR → <knowledge>/corpora/ → ask) | Per-corpus access_class | Crawled archives, scraped histories, bulk pulls, and the raw source documents behind L2 digests | Never auto-loaded — queried by script on demand |
Destination rule — decide this FIRST: whose knowledge is it, and how will it be used?
- A reusable, de-identified rule for every installer — pitfall, framework, convention, or a case study of the user's own trade → L1. Never put third-party content here; this library is public.
- The user's own conclusion about outside material — a digest of a substack / X post, a macro or brokerage report, a KOL thread, any article they hand you to read → L2, written in English.
- Anything collected — a crawl, a scrape, a bulk pull, or a one-off raw source document you were handed → L3, never
references/and never a temp path. Layout,access_class, manifest and privacy rules in references/data-collection.md."Our knowledge base," said while you happen to be working inside this repo, still means the user's knowledge — L2 and L3 are usually separate repos found via
knowledge_path/$TRADE_CORPUS_DIR. If unsure, ask before writing.
L2 has a size budget. It is auto-scanned every session, so it must stay small enough to actually read. When a directory outgrows what one session can scan, the bulk belongs in L3 — move the material down and leave the synthesis behind.
The pipeline runs upward. Collect into L3 → analyse → the conclusion becomes an L2 writedown → if the lesson generalises and de-identifies, it graduates to an L1 pitfall or framework. Evidence does not skip tiers: an L1 rule states its case in prose and never links into a private corpus, because installers cannot follow that link.
L1 — curated library (this skill; public, ships to all installers)
- New pitfall: copy
references/pitfalls/_template.md→references/pitfalls/NN-slug.md(fill the OKF frontmatter per references/OKF.md), add a row toreferences/pitfalls/index.md, route it from the matching situation row inreferences/commands/analysis.md, and add a dated entry toreferences/log.md - New case study (the user's own trade): copy
references/ticker/_template.md→references/ticker/<ticker>-YYYY-MM.md(fill the OKF frontmatter), add a row toreferences/ticker/index.mdand a dated entry toreferences/log.md - Strategy update: edit
references/strategies.mddirectly — it stays flat because it's always-relevant framework
L2 — personal knowledge (user's chosen dir; private, usually a separate repo found via knowledge_path)
For anything the user collects or shares from outside (substack posts, X threads, macro / brokerage research, articles, links) plus their own notes:
- Run
/trade setuponce to scaffold the knowledge directory (user chooses the path; default./knowledge/). - Raw artifact (PDF / screenshot / text file) → run
/trade import <file_path>to parse it into structured YAML insubstack/ortwitter/. - A shared link / article you read and synthesize (a macro thesis, a research report — anything that isn't a clean platform post) → write a writedown markdown digest at
<knowledge>/writedowns/YYYY-MM-DD-<topic>.md, in English (knowledge-dir files are git content — see User Profile), with source attribution, a "not independently verified" caveat, and a bear case. See references/commands/import.md. - Author the user's own writedowns directly as markdown in
<knowledge>/writedowns/.
The analysis command auto-loads matching files from the knowledge dir on every invocation — see references/commands/analysis.md.
L3 — collected corpora (durable, bulk, never auto-loaded)
Everything you collect rather than write: crawled archives, scraped histories, bulk API pulls, and the raw source documents (PDFs, screenshots, transcripts) that an L2 digest was written from. One directory per corpus — MANIFEST.md / raw/ / derived/ / scripts/ — with the manifest declaring coverage, the resume cursor, the gap list, and an access_class of public, paid, or closed-community.
A repository's visibility is set by the most restrictive corpus it holds: one paid or closed-community corpus makes the whole repo private. Keep genuinely public sources in a separate public repo rather than downgrading everything to private-by-association.
Full rules — path resolution, layout, resumability, gap accounting, and the sharing line between raw/ and derived/ — in references/data-collection.md.
FAQ
What does the trade skill do?
Personal US-equity options trading KB. /trade setup scaffolds a knowledge dir; /trade import [file] parses a raw file (PDF/image) into YAML; /trade report [tickers] reads today's 资金流向 (散户/大单/机构, options + dark pool); /trade daily is the one-name 看盘 read — 大单 block filtering, volume vs own average, IV term/IVR, dealer GEX + max pain, dark-pool baseline; /trade analysis (or any unknown first word) runs the default flow. For any single-stock question (股价预期 / 目标价 / 策略, a filing like S-1 / 10-K), earnings plays, 今天有没有大单 / 成交量 / 流入流出 / 母单吸筹·派发; a research PDF, article or paste with no question is an import. Triggers on multi-leg options (Jade Lizard, bull put spread, iron condor, diagonal, calendar), IV / IV crush, LEAPS, dealer GEX / gamma / options flow / dark pool, VIX / vol hedging, NQ / ES 夜盘, position sizing / 仓位 / 止损 / leverage, macro (宏观, 晨报, 收盘复盘, CPI / FOMC). Pitfall library, frameworks and case studies; data from Unusual Whales / TradingView / Funda.
How do I install trade?
Run npx skills add https://github.com/himself65/trade-skills --skill trade in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/trade/ (personal) or .claude/skills/trade/ (project).
Which AI agents can use trade?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is trade safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains trade?
It is published by himself65 in himself65/trade-skills. It has 171 recorded installs.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.