Skip to content
alyn
staskh

trading_skills

Claude powered advisor system for option traders

$npx skills add staskh/trading_skills
Stars
407
Installs
3.1k
Forks
87
Updated
2 days ago
License
MIT

30 skills in this pack.

58
staskh

ib-pmcc-advisor

Analyze PMCC (Poor Man's Covered Call / diagonal spread) positions from IB portfolio. For each diagonal spread, reports short leg risk (delta, IV, assignment probability), daily P&L…

Pack4073.1kCoding
58
staskh

scanner-pmcc

Scan stocks for Poor Man's Covered Call (PMCC) suitability. Analyzes LEAPS and short call options for delta, liquidity, spread, IV, yield, trend direction, and earnings proximity. Use when…

Pack4073.1kCoding
56
staskh

ib-collar

Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.

Pack4073.1kCoding
56
staskh

ib-find-short-roll

Find roll options for existing short positions OR find best covered call/put to open against long stock. Use when user asks about rolling shorts, finding roll candidates, writing covered…

Pack4073.1kCoding
56
staskh

ib-portfolio-action-report

Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across…

Pack4073.1kFinance
56
staskh

ib-stop-loss

Downside stop-loss management for PMCC, naked LEAPS, and stock positions in IB. Computes stop prices, detects alerts, and places conditional combo orders. Dry-run by default. Requires TWS…

Pack4073.1kCoding
56
staskh

ib-trades-history

Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (~7 days history) and FlexReport (full history). Use when user asks about their…

Pack4073.1kCoding
56
staskh

ib-trailing-stop

Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway…

Pack4073.1kCoding
55
staskh

ib-report-delta-adjusted-notional-exposure

Report delta-adjusted notional exposure across all IBKR accounts. Calculates option deltas using Black-Scholes and reports long/short exposure by account and underlying. Use when user asks…

Pack4073.1kCoding
55
staskh

report-stock

Generate comprehensive stock analysis report (PDF or markdown) with trend, PMCC, and fundamental analysis

Pack4073.1kFinance
55
staskh

whale-hunting

Detect institutional whale activity in options for a given underlying. Use when the user asks about unusual options activity, large block trades, whale trades, or institutional options flow…

Pack4073.1kCoding
54
staskh

scanner-bullish

Scan stocks for bullish trends using technical indicators (SMA, RSI, MACD, ADX). Use when user asks to scan for bullish stocks, find trending stocks, or rank symbols by momentum.

Pack4073.1kFinance
54
staskh

technical-analysis

Compute technical indicators like RSI, MACD, Bollinger Bands, SMA, EMA for a stock. Use when user asks about technical analysis, indicators, RSI, MACD, moving averages, overbought/oversold…

Pack4073.1kCoding
53
staskh

calendar

Report scheduled US economic events (CPI, NFP, FOMC, GDP, PCE, ISM, jobless claims...) with times in ET, impact, actual/consensus/previous. Use when user asks about the economic calendar…

Pack4073.1kProductivity
53
staskh

fundamentals

Get fundamental financial data including financials, earnings, and key metrics. Use when user asks about financials, earnings, revenue, profit, balance sheet, income statement, or company…

Pack4073.1kFinance
53
staskh

ib-option-chain

Get option chain data from Interactive Brokers for equities, ETFs, and futures (FOP), including calls and puts with strikes, bids, asks, volume, implied volatility, and model Greeks. Use…

Pack4073.1kCoding
52
staskh

greeks

Calculate option Greeks (delta, gamma, theta, vega) and implied volatility for specific options. Use when user asks about Greeks, delta, gamma, theta, vega, IV, or option sensitivity…

Pack4073.1kCoding
52
staskh

ib-account

Get account summary from Interactive Brokers including cash balance, buying power, and account value. Use when user asks about their account, balance, buying power, or available cash…

Pack4073.1kCoding
52
staskh

ib-create-consolidated-report

Consolidate IBRK trade CSV files from a directory into a summary report. Groups trades by symbol, underlying, date, strike, buy/sell, and open/close. Outputs both markdown and CSV.

Pack4073.1kData analysis
52
staskh

ib-portfolio

Get portfolio positions from Interactive Brokers. Use when user asks about their portfolio, positions, holdings, or what stocks they own. Requires TWS or IB Gateway running locally.

Pack4073.1kFinance
52
staskh

markdown-to-pdf

Convert a markdown file to PDF using mistune + reportlab. Use when the user wants to convert a .md file to PDF, or when another skill needs to produce a PDF from markdown output.

Pack4073.1kDocuments
52
staskh

spread-analysis

Analyze option spread strategies like vertical spreads, iron condors, straddles, strangles. Use when user asks about spreads, multi-leg strategies, vertical spread, iron condor, straddle…

Pack4073.1kCoding
52
staskh

stock-quote

Get real-time stock quote with price, volume, change, market cap, and 52-week range for any ticker symbol. Use when user asks about current stock price, quote, or basic stock info.

Pack4073.1kFinance
51
staskh

chart-ema-rsi

Renders a JPG chart of a ticker's daily candles with EMA 9/20 lines, their golden/death crossovers marked, and an RSI 14 panel with 70/30 bands. Use when the user asks for a chart, candle…

Pack4073.1kData analysis
51
staskh

earnings-calendar

Get upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates, earnings calendar, when a company reports, or upcoming earnings.

Pack4073.1kProductivity
51
staskh

insider-trading

Get insider trading activity (SEC Form 4 filings) for one or more stocks. Use when user asks about insider buying/selling, executive transactions, insider sentiment, or Form 4 activity.

Pack4073.1kFinance
51
staskh

news-sentiment

Get recent news and sentiment for a stock. Use when user asks about news, headlines, sentiment, what's happening with a stock, or recent developments.

Pack4073.1kFinance
51
staskh

option-chain

Get option chain data including calls and puts with strikes, bids, asks, volume, open interest, and implied volatility. Use when user asks about options, option prices, calls, puts, or…

Pack4073.1kCoding
51
staskh

price-history

Get historical price data (OHLCV) for a stock. Use when user asks about price history, historical data, past performance, price over time, or needs data for chart analysis.

Pack4073.1kCoding
51
staskh

risk-assessment

Assess risk metrics for a stock or position including volatility, beta, VaR, and drawdown analysis. Use when user asks about risk, volatility, beta, VaR, value at risk, drawdown, or…

Pack4073.1kCoding

From the README

How to use trading_skills

Trading Skills — AI-Powered Market Analysis

Most retail traders juggle 5+ tabs — broker, charting platform, screener, news feed, spreadsheet — just to decide whether to enter a trade. This project collapses all of that into a single conversational interface powered by Claude.

Ask a question in plain English, get back real data: technicals, fundamentals, option Greeks, risk metrics, earnings dates, correlation matrices, and full PDF reports. Connect your Interactive Brokers account and it manages your portfolio too — finds roll candidates for expiring shorts, flags earnings risk, and generates action reports.

Star History Chart

Who is this for?

  • Retail options traders who sell premium, run PMCCs, or manage covered calls
  • Self-directed investors who want quick fundamental + technical scans without switching tools
  • Python-literate traders who want to extend the analysis with custom scripts
  • IBRK users who want AI-assisted portfolio management

Quick example — scan for bullish setups and check PMCC viability:

You: Scan AAPL,MSFT,NVDA,GOOGL,AMZN for bullish trends, then check the top picks for PMCC suitability

Claude: [runs scanner-bullish → filters top scores → runs scanner-pmcc]
        NVDA: Bullish score 8/10, PMCC score 9.2/11 — LEAPS $95 call (Δ0.82),
        sell $140 call (Δ0.18), net debit $5,420, annual yield 47%...

Another example — correlation check before adding to a portfolio:

You: Show correlation for SPY,GOOG,NVDA,ZM,RTX,PFE,XOM

Claude: NVDA is the standout diversifier — near-zero correlation with everything.
        RTX/XOM at 0.86 — little diversification benefit between them.

Real sessions in Claude Desktop (free account)

"Analyze option spread strategies and probability of profit for SPY, QQQ and DIA"

Spread analysis with POP metrics for SPY, QQQ, DIA

Requirements

  • Python 3.12+
  • uv package manager
  • Claude Code, Claude Desktop, or Cursor with third-party skills enabled (fully installed and authenticated)
  • Optional: TWS or IB Gateway for portfolio features

Two Ways to Use

Claude Code / Cursor (Full Experience)

Installation
git clone https://github.com/staskh/trading_skills.git
cd trading_skills
uv sync

Run Claude Code or Cursor in the repository root. All skills are available as interactive commands — ask questions about your IBKR portfolio, symbols, or companies of interest.

MCP Server (Claude Desktop)

The MCP server is a lightweight alternative for use with Claude Desktop (including the free tier). It exposes 23 trading analysis tools directly to Claude Desktop without needing Claude Code.

Installation
  1. Install the package (requires Python 3.12+):

    pip install trading-skills
    
  2. Find the full path to the installed command:

    macOS / Linux:

    which trading-skills-mcp
    

    Windows:

    where trading-skills-mcp
    

    If where doesn't find it, locate it manually:

    python -c "import sysconfig; print(sysconfig.get_path('scripts'))"
    

    The script will be trading-skills-mcp.exe in that directory (typically at C:\Users\<YourUsername>\AppData\Local\Programs\Python\Python<Version>\Scripts\)

  3. Open Claude Desktop, go to Settings → Developer → Edit Config:

    Claude Desktop Settings → Developer

    Add the following to claude_desktop_config.json:

    macOS / Linux:

    {
      "mcpServers": {
        "trading-skills": {
          "command": "/full/path/to/trading-skills-mcp"
        }
      }
    }
    

    Windows:

    {
      "mcpServers": {
        "trading-skills": {
          "command": "C:\\full\\path\\to\\trading-skills-mcp.exe"
        }
      }
    }
    

    Replace the path with the output from step 2.

  4. Restart Claude Desktop. Don't worry if you see an MCP error message — it will disappear once you try some of the examples below.

Installation from GitHub

Add the following to claude_desktop_config.json:

macOS / Linux:

{
  "mcpServers": {
    "trading-skills": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/staskh/trading_skills.git", "trading-skills-mcp"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "trading-skills": {
      "command": "cmd",
      "args": ["/c", "uvx", "--from", "git+https://github.com/staskh/trading_skills.git", "trading-skills-mcp"]
    }
  }
}

Example Queries

  • "What's AAPL's current price and 1y range?"
  • "Run technical analysis on SPY with RSI/MACD"
  • "Scan AAPL,MSFT,NVDA,GOOGL for bullish trends"
  • "Find PMCC candidates from my watchlist"
  • "Compare risk metrics for MSFT vs AAPL"
  • "Show correlation between SPY,NVDA,GOOG,XOM"
  • "When is NVDA's next earnings?"
  • "Show my portfolio positions" (requires IB)
  • "Generate portfolio action report" (requires IB)
  • "Find roll candidates for my GOOG short call" (requires IB)

Available Skills (25)

Market Data

Skill Description
stock-quote Real-time price, volume, change, market cap, 52-week range
option-chain Calls and puts with strikes, bids, asks, volume, OI, IV
price-history Historical OHLCV data
fundamentals Financials, earnings, key metrics, Piotroski F-Score
news-sentiment Recent headlines and sentiment
earnings-calendar Upcoming earnings dates with BMO/AMC timing and EPS estimates
calendar Scheduled US economic events (CPI, NFP, FOMC, GDP...) in ET, with optional ForexFactory cross-check
insider-trading SEC Form 4 insider transactions — executive buys/sells and sentiment

Analysis

Skill Description
technical-analysis RSI, MACD, Bollinger Bands, SMA, EMA, ATR, ADX, correlation matrix
greeks Delta, gamma, theta, vega, IV (Black-Scholes)
spread-analysis Verticals, diagonals, straddles, strangles, iron condors
risk-assessment Volatility, beta, VaR, drawdown, Sharpe ratio
chart-ema-rsi JPG chart: daily candles, EMA 9/20 with crossovers marked, RSI panel

Scanners

Skill Description
scanner-bullish Scan symbols for bullish trends (SMA, RSI, MACD, ADX)
scanner-pmcc Scan for PMCC suitability (delta, liquidity, spread, IV, yield)
whale-hunting Detect institutional option whale activity for an underlying (requires Massive API key)

Portfolio (requires TWS/Gateway)

TWS API access levels:

  • Read-only — fetches positions, prices, and Greeks; places no orders: ib-account, ib-portfolio, ib-option-chain, ib-find-short-roll, ib-collar, ib-pmcc-advisor, ib-portfolio-action-report, ib-create-consolidated-report, ib-report-delta-adjusted-notional-exposure
  • Read-write — can place and cancel conditional orders in TWS: ib-stop-loss (only when --execute is passed; dry-run by default)
Skill Description
ib-account Account summary (cash, buying power, margin)
ib-portfolio Portfolio positions with market prices
ib-option-chain Real-time option chain data from IB (under development)
ib-find-short-roll Roll candidates for short positions or covered call/put selection
ib-collar Tactical collar strategy for earnings/event protection
ib-pmcc-advisor PMCC position analysis: assignment risk, P&L projections, ranked roll candidates
ib-stop-loss Conditional stop-loss management for PMCC, naked LEAPS, and stock positions
ib-portfolio-action-report Portfolio review with earnings risk and action items
ib-create-consolidated-report Consolidate IBRK trade CSVs into summary reports
ib-report-delta-adjusted-notional-exposure Delta-adjusted notional exposure across accounts

Reports

Skill Description
report-stock Comprehensive PDF/markdown report with trend, PMCC, and fundamental analysis

MCP Server Tools (32 tools)

The MCP server exposes skills as tools for Claude Desktop:

TWS API access levels for MCP tools:

  • Read-only: ib_account, ib_portfolio, ib_option_expiries, ib_option_chain, ib_find_short_roll, ib_collar, ib_pmcc_advisor, ib_portfolio_action_report, ib_delta_exposure
  • Read-write (places/cancels orders): ib_stop_loss when execute=True
Category Tools
Market Data stock_quote, price_history, news_sentiment, insider_trading, fundamentals, piotroski_score, earnings_calendar, economic_calendar
Technical technical_indicators, price_correlation, risk_assessment
Options option_expiries, option_chain, option_greeks
Spreads spread_vertical, spread_diagonal, spread_straddle, spread_strangle, spread_iron_condor
Scanners scan_bullish, scan_pmcc
Whale Hunting whale_hunting
Reports report_stock
IB Portfolio ib_account, ib_portfolio, ib_option_expiries†, ib_option_chain, ib_find_short_roll, ib_collar, ib_pmcc_advisor, ib_stop_loss, ib_portfolio_action_report, ib_delta_exposure

† MCP-only helper — not a standalone skill. Used in Claude Desktop to discover available expiry dates before calling ib_option_chain.

Sandbox Outputs (Not Committed)

Temporary reports, datasets, and notebooks are saved to sandbox/ and are not committed to git. Report filenames include timestamps: <name>_YYYY-MM-DD_HHmm.<ext>.

Interactive Brokers Setup

To use IB features:

  1. Install TWS or IB Gateway
  2. Enable API connections in TWS: Configure → API → Settings → Enable ActiveX and Socket Clients
  3. Note the port: 7497 (paper) or 7496 (live)

Massive (formerly Polygon.io) Setup

Whale-detection features (option_whales, whales_hunter) require a Massive API key (the platform was previously known as Polygon.io).

Claude Code / Cursor

Create a .env file in the repository root:

MASSIVE_API_KEY=your_polygon_api_key_here

The library loads it automatically via python-dotenv.

MCP Server (Claude Desktop)

Pass the key through the env field in claude_desktop_config.json:

macOS / Linux:

{
  "mcpServers": {
    "trading-skills": {
      "command": "/full/path/to/trading-skills-mcp",
      "env": {
        "MASSIVE_API_KEY": "your_massive_api_key_here"
      }
    }
  }
}

Windows:

{
  "mcpServers": {
    "trading-skills": {
      "command": "C:\\full\\path\\to\\trading-skills-mcp.exe",
      "env": {
        "MASSIVE_API_KEY": "your_massive_api_key_here"
      }
    }
  }
}

The env block is merged with the system environment, so other variables are not affected.

Development

# Run tests
uv run pytest tests/ -v

# Lint
uv run ruff check src/ tests/
uv run ruff format src/ tests/

# Test individual script
uv run python .claude/skills/fundamentals/scripts/fundamentals.py AAPL

# Debug MCP server with MCP Inspector
npx @modelcontextprotocol/inspector uv run python -m mcp_server.server

Architecture

User Query → Claude Code/Desktop → Skill or MCP Tool → Python Script → Response

Skills are SKILL.md files in .claude/skills/ that instruct Claude how to fetch and analyze data using Python scripts. Skill scripts live under .claude/skills/<skill-name>/scripts/, and progressive reference material belongs in .claude/skills/<skill-name>/references/.

The MCP server (mcp_server/server.py) wraps the same Python scripts as tools for Claude Desktop via the FastMCP framework.

Data Sources

Source Used by Notes
Yahoo Finance All market data, fundamental, and options skills Free; up to 15-minute delay
Massive (formerly Polygon.io) whale-hunting (whale_hunting MCP tool) Paid API key required; see setup section below

License

MIT

Questions

What is staskh/trading_skills?

Claude powered advisor system for option traders

How do I install trading_skills?

Run "npx skills add staskh/trading_skills" and choose the skills you want. Many packs also document their own install path (for example a Claude Code plugin marketplace) in the README below.

How many skills are in trading_skills?

30 SKILL.md skills. Alyn lists 30 of them with their own pages.