ib-collar
Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.
Install / Use
npx skills add staskh/trading_skills --skill ib-collarInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of ib-collar
ib-collar scores 85/100 on our quality scale, 2671st of 4,619 Development & Engineering skills we index.
Its SKILL.md is 4.0 KB long, well organised into 15 sections with 2 code examples: a solid amount of guidance for an agent.
It has 369 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 17 days ago, so ib-collar is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-05. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ib-collar compared with similar skills
All 4 of these similar skills score higher than ib-collar; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ib-collar (this skill)by staskh | 85 | 369 | 17d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 90.8k | 19d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.4k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 45.0k | 1d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 4d ago | CLAUDE.md |
Frequently asked questions
- How do I install ib-collar?
- Run
npx skills add staskh/trading_skills --skill ib-collar. The install tabs above show the steps for each supported agent. - Which AI agents does ib-collar work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is ib-collar safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ib-collar still maintained?
- The repository was last updated 17 days ago, so ib-collar is actively maintained.
Skill content
View source on GitHubname: ib-collar description: Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally. dependencies: ["trading-skills"]
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_PORTenv var — default port when--portis omitted (e.g.IB_PORT=4001for a Gateway container). Precedence:--portflag >IB_PORT> built-in default. Set it in the shell or a.envfile.
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 infolong_strike,long_expiry,long_qty,long_cost- LEAPS positionshort_positions- List of short callsis_proper_pmcc,short_above_long- PMCC health flagsearnings_date,days_to_earnings- Earnings timingput_analysis- List of put scenarios with costs and P&L under gap up/flat/downunprotected_loss_10,unprotected_loss_15,unprotected_gain_10- LEAPS risk without collarvolatility- Historical volatility data
Report Sections
- Position Summary: Current PMCC structure (long calls, short calls)
- PMCC Health Check: Is structure proper (short > long strike) or broken?
- Earnings Risk: Next earnings date and days until event
- Put Duration Analysis: Comparison of short vs medium vs long-dated puts
- Collar Scenarios: Gap up, flat, gap down outcomes with each put duration
- Cost/Benefit Analysis: Insurance cost vs protection value
- Implementation Timeline: Step-by-step checklist with dates
- Recommendation: Optimal put strike and expiration
Key Concepts
Proper PMCC Structure:
- Long deep ITM LEAPS call
- Short OTM calls ABOVE long strike
- No additional margin required for collar
Broken PMCC Structure:
- Long call is now OTM (after crash)
- Short calls BELOW long strike require margin
- Collar still works but margin implications exist
Tactical Collar:
- Buy protective puts ONLY before high-risk events (earnings)
- Sell puts after event passes
- Balances income generation with crash protection
Put Duration Trade-offs:
- Short-dated: Cheaper, more gamma, but zero salvage on gap up
- Medium-dated (2-4 weeks): Best balance of cost, gamma, and salvage
- Long-dated: Preserves value on gap up, but expensive and less gamma
Example Usage
# Analyze NVDA position (defaults to paper port 7497)
uv run python scripts/collar.py NVDA
# Analyze specific account
uv run python scripts/collar.py AMZN --account U790497
# Use paper trading port instead
uv run python scripts/collar.py NVDA --port 7497
Timezone
All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.
Related Skills
Agent-Reach
90.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
45.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
