ib-collar

ib-collar is a skill for Claude Code from staskh/trading_skills. It costs 30 tokens per session (1,005 once invoked), scanned A, original, MIT.

A report generator for collar strategies that can protect PMCC positions around earnings or other high-risk events. A collar combines an owned position with options intended to limit downside and may also limit upside.

In plain words
What is it for?
Use it to create tactical collar reports for symbols in an Interactive Brokers account and review position and scenario data around events.
Why use it?
It helps assess protection for a position during a period when a large price move is possible. It requires a locally running Interactive Brokers TWS or IB Gateway connection.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to create tactical collar reports for symbols in an Interactive Brokers account and review position and scenario data around events.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/staskh/trading_skills/ib-collar
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add staskh/trading_skills --skill ib-collar
Clone the repo
git clone --depth 1 https://github.com/staskh/trading_skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ib-collar

README.md
[![agentmods](https://agentmods.dev/badge/skills/staskh/trading_skills/ib-collar/github.svg)](https://agentmods.dev/skills/staskh/trading_skills/ib-collar)
Your own site
<a href="https://agentmods.dev/skills/staskh/trading_skills/ib-collar"><img src="https://agentmods.dev/badge/skills/staskh/trading_skills/ib-collar/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ib-collar

Your own site · 80×15
<a href="https://agentmods.dev/skills/staskh/trading_skills/ib-collar"><img src="https://agentmods.dev/badge/skills/staskh/trading_skills/ib-collar.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.01005
Opus 5 $0.00015 $0.00502
Sonnet 5 $0.00006 $0.00201
Haiku 4.5 $0.00003 $0.00101

Measured 9d ago against content hash c816cba5d1ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ib-collar scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/collar.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/ib-collar/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

IB Tactical Collar

Generate a tactical collar strategy report for protecting PMCC positions through earnings or high-risk events.

IB Connection

TWS or IB Gateway must be running locally with API enabled:

  • Paper trading — port 7497
  • Live trading — port 7496
  • IB_PORT env var — default port when --port is omitted (e.g. IB_PORT=4001 for a Gateway container). Precedence: --port flag > IB_PORT > built-in default. Set it in the shell or a .env file.

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.

Instructions

Step 1: Gather Data

uv run python scripts/collar.py SYMBOL [--port PORT] [--account ACCOUNT]

The script returns JSON to stdout with all position and scenario data.

Step 2: Format Report

Read templates/markdown-template.md for formatting instructions. Generate a markdown report from the JSON data and save to sandbox/.

Step 3: Report Results

Present key findings to the user: recommended put protection, cost/benefit, and the saved report path.

Arguments

  • SYMBOL - Stock symbol to analyze (must be in portfolio)
  • --port - IB port (default: 7497 for paper trading)
  • --account - Specific account ID (optional, searches all accounts)

JSON Output

The script returns JSON with these key fields:

  • symbol, current_price - Basic info
  • long_strike, long_expiry, long_qty, long_cost - LEAPS position
  • short_positions - List of short calls
  • is_proper_pmcc, short_above_long - PMCC health flags
  • earnings_date, days_to_earnings - Earnings timing
  • put_analysis - List of put scenarios with costs and P&L under gap up/flat/down
  • unprotected_loss_10, unprotected_loss_15, unprotected_gain_10 - LEAPS risk without collar
  • volatility - Historical volatility data

Read the full file on GitHub · 107 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 107 lines · 30 tokens per session scan A c816cba5d1ea

Subscribe to this mod's changes

ib-collar is a skill published in the GitHub repository staskh/trading_skills (362 stars, last pushed 8d ago), licensed MIT. It adds 30 tokens to every session and 1,005 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

find-cpa-firm

Use whenever the user wants to find, shortlist, vet, or enrich US accounting and tax firms (CPA firms) — financial-statement audit, SOC 1/2 audit, corporate tax, bookkeeping for businesses, advisory/fractional CFO, M&A diligence, 409A valuations, R&D tax credits, IPO readiness, sales-and-use tax. Triggers on "find me…

nostrband/ServiceGraph · 238 tokens

clawby-data

Query and analyze real financial data for any asset (US stocks / options / crypto / forex / perps / prediction markets) — quotes, volume, short volume & short interest, borrow fee, dark pool, options chain, Reddit sentiment, OHLC bars, FTDs, dividends & splits, stock screener, company financials & SEC filings (income…

openclawby/openclawby-skills · 215 tokens

second-order-thinking

Think beyond immediate consequences to understand the chain reactions of decisions. Master Howard Marks' investment framework for seeing what others miss. Use when: Strategic decisions where long-term consequences matter; Policy/rule changes that will trigger behavioral responses; Competitive moves to anticipate…

guia-matthieu/clawfu-skills · 82 tokens

forecast-scenarios

Model best-case, worst-case, and likely revenue scenarios with sensitivity analysis for strategic planning. Use when: building financial forecasts; presenting board scenarios; planning headcount around revenue uncertainty; modeling pricing changes impact; preparing investor updates with upside/downside ranges.

guia-matthieu/clawfu-skills · 54 tokens

commission-intelligence

Explain sales commission calculations, resolve discrepancies, and model compensation scenarios for quota planning.

guia-matthieu/clawfu-skills · 19 tokens

pipeline-forecasting

Generate predictive pipeline forecasts with confidence intervals and scenario modeling for revenue planning.

guia-matthieu/clawfu-skills · 18 tokens