calendar
Report scheduled US economic events (CPI, NFP, FOMC, GDP, PCE, ISM, jobless claims...) with times in ET, impact,…
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 or IB Gateway running locally.
Claude Code
$ npx -y skills add staskh/trading_skills --skill ib-stop-loss --agent claude-code
Codex
$ npx skills add staskh/trading_skills --skill ib-stop-loss -a codex -y
Cursor
$ npx skills add staskh/trading_skills --skill ib-stop-loss -a cursor -y
Gemini CLI
$ npx skills add staskh/trading_skills --skill ib-stop-loss -a gemini-cli -y
GitHub Copilot
$ npx skills add staskh/trading_skills --skill ib-stop-loss -a github-copilot -y
OpenCode
$ npx skills add staskh/trading_skills --skill ib-stop-loss -a opencode -y
Windsurf
$ npx skills add staskh/trading_skills --skill ib-stop-loss -a windsurf -y
name: ib-stop-loss description: 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 or IB Gateway running locally. dependencies: ["trading-skills"]
Analyzes PMCC (diagonal call spread), naked LEAPS, and stock positions in the IB portfolio and manages conditional stop-loss orders.
**Default mode is dry-run** — no orders are placed unless `--execute` is in the request.
TWS or IB Gateway must be running locally with API enabled:
**Port fallback:** If the configured port fails, automatically retry on the other port. If the retry succeeds, save to memory which account type worked (live/paper) and reuse it for all IB skill calls in this and future sessions — until the user explicitly asks for the other account. If both ports fail, ask the user to verify that TWS or IB Gateway is running with API access enabled.
Dry-run (default — no orders placed):
uv run python .claude/skills/ib-stop-loss/scripts/stop_loss.py
Execute (cancel orphan orders + place SL_ conditional orders):
uv run python .claude/skills/ib-stop-loss/scripts/stop_loss.py --execute
Execute forced (basis = current mid price, can lower existing stops):
uv run python .claude/skills/ib-stop-loss/scripts/stop_loss.py --execute --forced
Format JSON output as a markdown report with four sections:
List symbols in `alert_soon` prominently — these are past the early-warning threshold.
Show `all_conditional_orders.module` (SL_ orders) and `all_conditional_orders.manual` (manually placed). If `orphan_orders` is non-empty, warn that these were cancelled (execute mode) or need manual cancellation (dry-run).
For each entry in `positions`, show a table:
| Field | Value | |---|---| | Symbol | NVDA — pmcc (3 contracts) | | Spot | $219.05 | | LEAPS | 200C 20270115 · avg cost $44.27 · current $44.23 · basis $44.27 | | **Stop price** | $22.14 (40% stop) → action: place_new | | LEAPS loss | 0.1% | | Shorts | 235C 20260515 · received $0.61 · current $0.56 · 9.5% decayed |
Show `preserve_existing` when a more-protective stop already exists. Show `overwrite` (red) when `forced=true` lowers an existing stop.
Group alerts by symbol. Types:
| Type | Meaning | |---|---| | `leaps_early_warning` | LEAPS down ≥ stop_pct/2% from basis | | `short_premium_decay` | 90%+ of short premium captured — close or roll | | `short_near_strike` | Spot at/above or within X% of short strike |
| Flag | Default | Description | |------|---------|-------------| | `--port` | 7497 | IB Gateway/TWS port | | `--account` | all | Specific account ID | | `--symbols` | all | Analyze only these symbols | | `--legs` | none | Specific option legs: `SYMBOL:STRIKE[C\|P]:EXPIRY` (e.g. `IBKR:70C:20270115 IBKR:100C:20260918`). Right defaults to `C`. Takes precedence over `--symbols`. Use when multiple PMCC/LEAPS coexist on the same symbol and only one pairing should get a stop. | | `--stop-pct` | 40 | Loss % that triggers exit | | `--short-near-strike-pct` | 5 | Near-strike alert threshold | | `--price-mode` | mid | Option pricing: `mid` or `last` | | `--execute` | off | Cancel orphans + place SL_ orders | | `--forced` | off | Use current mid as basis (requires `--execute`) |
{
"generated_at": "2026-05-12 10:00 ET",
"dry_run": true,
"forced": false,
"stop_pct": 40.0,
"short_near_strike_pct": 5.0,
"accounts": ["U1234567"],
"symbols_filter": null,
"all_conditional_orders": {"module": [], "manual": []},
"orphan_orders": [],
"alert_soon": ["PFE"],
"positions": [
{
"symbol": "NVDA",
"type": "pmcc",
"account": "U1234567",
"qty": 3,
"underlying_price": 219.05,
"leaps": {
"strike": 200.0, "expiry": "20270115", "avg_cost": 44.27,
"current_price": 44.23, "stop_basis": 44.27,
"stop_price": 22.14, "loss_pct": 0.1
},
"shorts": [
{"strike": 235.0, "expiry": "20260515",
"premium_received": 0.61, "current_price": 0.56, "decay_pct": 9.5}
],
"stop_loss": {"stop_price": 22.14, "action": "place_new", "existing_stop": null},
"alert_soon": false,
"alerts": []
},
{
"symbol": "AAPL",
"type": "stock",
"account": "U1234567",
"qty": 100,
"underlying_price": 189.50,
"stock": {
"avg_cost": 175.00, "stop_basis": 189.50,
"stop_price": 94.75, "loss_pct": 0.0
},
"stop_loss": {"stop_price": 94.75, "action": "place_new", "existing_stop": null},
"alert_soon": false,
"alerts": []
}
]
}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.
Report scheduled US economic events (CPI, NFP, FOMC, GDP, PCE, ISM, jobless claims...) with times in ET, impact,…
Get upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates,…
Get fundamental financial data including financials, earnings, and key metrics. Use when user asks about financials, earnings,…
Calculate option Greeks (delta, gamma, theta, vega) and implied volatility for specific options. Use when user asks about Greeks,…
Get account summary from Interactive Brokers including cash balance, buying power, and account value. Use when user asks about…
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…