How moremeds/unusual-whales-skill works
1. This repository is not a standalone trading app; it is a Claude Code skill package that extends Claude into an Unusual Whales–driven trading intelligence workflow. The skill is installed into ~/.claude/skills/unusual-whales/ and invoked from Claude Code as /unusual-whales ....
2. The top-level package boundary is very small: package.json, install.js, and uninstall.js exist to copy/remove the skill files. Operational behavior lives in skill/SKILL.md plus the reference docs under skill/references/. The .claude-plugin metadata indicates this is also publishable as a Claude plugin/marketplace asset.
3. The main runtime boundary is Claude Code + MCP tools, not a custom server. The skill depends on:
- Playwright MCP to interact with Unusual Whales pages in Chrome
- Gmail MCP for email delivery of full reports
- a locally configured Discord webhook for short summaries
- DuckDB for persistence and historical calibration
These external integrations materially shape the architecture because the skill orchestrates them rather than hosting its own backend.
4. The primary data acquisition subsystem is the Unusual Whales page extractor. The README says it pulls data from six page types using React Fiber / Highcharts chart data through Playwright. This implies the first stage is browser-based scraping of live site state, not API consumption. The extracted state becomes the raw input for all downstream scoring and report generation.
5. The core analytics pipeline is a four-bucket composite score on a ±100 scale:
- Market Structure: GEX flip, gamma walls, DEX, vanna, charm
- Volatility: IV rank, IV-HV spread, skew, term structure
- Flow: net premium, put/call ratio, dark pool conviction
- Positioning: OI changes, short interest, squeeze risk
This score is the central decision boundary that drives recommendation labels and trade selection.
6. Trade construction is a separate subsystem from signal scoring. The skill generates defined-risk trade ideas only, selecting strategy by direction and IV regime (for example, bullish + cheap IV vs bullish + expensive IV). Management rules are part of the output model: profit target, stop loss, GEX-anchored stop, and time stop. The README explicitly says unbounded risk is avoided.
7. The VRP put-selling module is an independent overlay, not just another score component. It uses z-score gating, regime awareness, and GEX-anchored strike selection. That means the system can produce a general directional view while also separately deciding whether premium-selling is favorable.
8. The reasoning layer is an AI synthesis step that turns metrics into narrative output: confluence, quality grade, and risk callouts. The repo’s docs suggest this is governed by a dedicated “analysis framework” and “AI reasoning” reference material, implying the skill separates deterministic calculations from explanatory synthesis.
9. Reporting and delivery are multi-channel:
- Email delivers the full HTML report with charts and tables
- Discord gets a compact summary
- the Claude conversation gets a minimal confirmation
Payoff diagrams are rendered via Chart.js + Playwright screenshot, so the report pipeline includes a visualization/export step before delivery.
10. Persistence is a major architectural boundary. Analyses are stored in a local DuckDB database at ~/Library/Application Support/unusual-whales/analyses.duckdb, with logical stores for:
- analyses
- trades
- raw snapshots
- outcomes
This enables replay, debugging, and historical queries without re-scraping Unusual Whales.
11. Outcome tracking and calibration form the self-improving loop. The system automatically checks T+5 and T+30 prices to score directional accuracy, then computes per-bucket and per-ticker calibration once enough history exists. This is the feedback layer that turns one-off analyses into a learning system.
12. There are several operational modes built on the same pipeline:
- single ticker and batch analysis
- watchlists
- fast mode for GEX + volatility only
- scan mode for screener-based setup discovery
- regime mode for a quick SPY/QQQ market check
- brief, history, replay, calibrate, and check for maintenance/intelligence workflows
These are different front doors into shared analysis, persistence, and delivery subsystems.
13. Configuration is intentionally externalized. The README says setup writes ~/.config/unusual-whales/config.yaml for delivery settings like Discord webhook and email address. That keeps secrets and environment-specific data out of the repository and separates installation-time configuration from analysis logic.
14. The repository content is heavily documentation-driven. skill/references/ contains the implementation guidance for extraction, scoring, alerts, history replay, persistence, regime dashboard, scan playbook, and delivery. The docs/designs/ and docs/strategy/ folders are research and architecture context, not runtime code, so the repo functions as a packaged operating manual for the skill as much as a software artifact.
Main entry points: SKILL.md Skill guide · analysis-framework.md Composite score · persistence.md DuckDB store · extraction-strategies.md Page extractor
Components 19
Package
Installable Claude skill and plugin wrapper.
- Plugin metadata · Claude plugin and marketplace packaging metadata.
.claude-plugin/plugin.json - Installer · Copies the skill into the Claude skills directory.
install.js - Uninstaller · Removes the installed skill package.
uninstall.js
Skill runtime
Main operational boundary inside Claude Code and MCP tools.
- Skill guide · Primary operational instructions for the Unusual Whales workflow.
skill/SKILL.md - Reference playbooks · Implementation guidance for extraction, scoring, alerts, delivery, replay, and modes.
skill/references - Claude Code · User-facing execution environment that invokes the skill.
- MCP tools · Tool layer used by the skill to act on browsers, email, and other external services.
Analytics
Extraction, scoring, trade construction, and reasoning pipeline.
- Unusual Whales pages · Live market intelligence pages scraped through browser interaction.
- Page extractor · Playwright-based extraction using React Fiber and chart data from multiple page types.
skill/references/extraction-strategies.md - Composite score · Four-bucket ±100 scoring across structure, volatility, flow, and positioning.
skill/references/analysis-framework.md - Trade builder · Produces defined-risk directional trade ideas with management rules.
skill/references/analysis-framework.md - VRP overlay · Independent put-selling module with regime and z-score gating.
skill/references/vrp-put-selling.md - AI synthesis · Turns metrics into narrative, grade, and risk callouts.
skill/references/ai-reasoning.md - Modes · Single, batch, watchlist, fast, scan, regime, brief, history, replay, calibrate, and check workflows.
skill/references/batch-mode.md
State & delivery
Persistence, calibration, and outbound reporting channels.
- DuckDB store · Persistent store for analyses, trades, raw snapshots, and outcomes.
skill/references/persistence.md - Calibration loop · T+5 and T+30 outcome tracking plus per-bucket and per-ticker calibration.
skill/references/calibration.md - Email report · Full HTML report delivery with charts and tables.
skill/references/email-delivery.md - Discord summary · Compact webhook summary for quick sharing.
skill/references/discord-delivery.md - Payoff charts · Chart.js payoff diagrams rendered and captured for reports.
skill/references/payoff-visualization.md
Connections 24
- Installer → Skill guide: installs · Installer places the skill package for Claude Code to use.
- Uninstaller → Skill guide: removes · Uninstaller deletes the installed skill package.
- Plugin metadata → Installer: packages · Plugin metadata supports installation and marketplace distribution.
- Claude Code → Skill guide: invokes · Claude Code enters the skill through the skill guide.
- Skill guide → Reference playbooks: orients · Skill guide points to deeper operating references.
- Skill guide → MCP tools: uses · Skill delegates work through MCP and external integrations.
- MCP tools → Page extractor: browser scrape · Playwright MCP supports browser-based extraction.
- Page extractor → Unusual Whales pages: reads · Extractor pulls live state from Unusual Whales pages.
- Page extractor → Composite score: feeds · Extracted market data becomes scoring input.
- Composite score → Trade builder: drives · Composite score informs directional trade construction.
- Composite score → VRP overlay: gates · Score and regime context influence the VRP overlay.
- Composite score → AI synthesis: interpreted by · Deterministic metrics are turned into narrative synthesis.
- Trade builder → Payoff charts: visualized by · Trade outputs are turned into payoff diagrams.
- Payoff charts → Email report: included in · Charts are embedded in the full email report.
- AI synthesis → Email report: writes · Narrative analysis is assembled into the report.
- AI synthesis → Discord summary: summarizes · Short-form synthesis becomes the Discord summary.
- Composite score → DuckDB store: stores · Analyses and snapshots are persisted locally.
- Trade builder → DuckDB store: records · Trade ideas are stored for replay and tracking.
- DuckDB store → Calibration loop: enables · Historical records support automated outcome calibration.
- Calibration loop → Composite score: tunes · Calibration feeds back into scoring thresholds and confidence.
- Modes → Composite score: routes to · Different modes reuse the same scoring core.
- Modes → DuckDB store: replays · History, replay, and calibrate modes query stored data.
- Skill guide → Email report: documents · Skill instructions define full report delivery.
- Skill guide → Discord summary: documents · Skill instructions define quick summary delivery.