Agent skill

Cot Contrarian Detector

by tradermonty in tradermonty/claude-trading-skills

Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason Shapiro's methodology.

MITAuto-check passedMarketing & SEO

Install Cot Contrarian Detector

skills CLI
$ npx skills add tradermonty/claude-trading-skills --skill cot-contrarian-detector -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tradermonty/claude-trading-skills cot-contrarian-detector --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tradermonty/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cot-contrarian-detector .claude/skills/cot-contrarian-detector && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cot-contrarian-detector
GitHub stars
3k
Token cost
~1.9k tokens
SKILL.md length
890 words
Files
8 (incl. scripts, references)
Skills in repo
74
Repo updated
First seen
Licence
MIT

At a glance

Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason Shapiro's methodology.

  • Works in 3 steps: Run the crowding screen → Present the crowding report → Guide steps 2-5 manually (Shapiro process)
  • The user asks about COT report analysis
  • SKILL.md covers Overview, When to Use This Skill, Prerequisites and Workflow, plus 4 more sections
  • Runs Python scripts from its folder; calls python3; needs FMP_API_KEY

What it does

Cot Contrarian Detector is an agent skill from tradermonty/claude-trading-skills. Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason Shapiro's methodology. Screens large-speculator ("non-commercial") net positioning across 65 futures markets (indices, rates, FX, metals, energy, crypto) via the FMP Commitment of Traders API, computes a 3-year and 26-week COT Index per market, and classifies extremes as CROWDEDLONG / CROWDEDSHORT. Use when the user asks about COT report analysis, crowded positioning, "who is trapped"…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `references/cot-index-calculation.md`, `references/shapiro-methodology.md` and `scripts/cot_index.py`).

It sits in Marketing & SEO, covering Positioning and messaging. The repository describes itself as: Claude Code skills for equity investors and traders — market analysis, technical charting, economic calendars, screeners, and trading strategy development. The licence is MIT.

When your agent uses it

  • The user asks about COT report analysis
  • Crowded positioning
  • Speculative positioning extremes
  • Contrarian futures setups

Example prompts

  • “s methodology. Screens large-speculator (”
  • “who is trapped”
  • “/cot-contrarian-detector”

Requirements

  • Python 3
  • A credential in FMP_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Run the crowding screen
  2. Present the crowding report
  3. Guide steps 2-5 manually (Shapiro process)

What it can do on your machine

Read from SKILL.md and the folder at commit c8d58f0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FMP_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cot Contrarian Detector loads about 1.9k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 188 tokens; SKILL.md has 890 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~188
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from tradermonty/claude-trading-skills at commit c8d58f0, republished under its MIT licence (© tradermonty). 890 words, ~1,948 tokens.

Download SKILL.mdSave it as .claude/skills/cot-contrarian-detector/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
cot-contrarian-detector
description
Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason Shapiro's methodology. Screens large-speculator ("non-commercial") net positioning across 65 futures markets (indices, rates, FX, metals, energy, crypto) via the FMP Commitment of Traders API, computes a 3-year and 26-week COT Index per market, and classifies extremes as CROWDED_LONG / CROWDED_SHORT. Use when the user asks about COT report analysis, crowded positioning, "who is trapped", speculative positioning extremes, contrarian futures setups, or wants to run Jason Shapiro-style analysis. This skill automates crowding DETECTION only (step 1 of 5) — it does not generate trade signals by itself.

COT Contrarian Detector

Overview

Implements step 1 of Jason Shapiro's COT (Commitment of Traders) contrarian process: detect when large speculators are crowded into one side of a futures market. Crowded positioning is a precondition for a contrarian trade, not a trade signal — a market only becomes tradable once crowding is confirmed by a news failure and price-action reversal (steps 2-3), which this skill guides the user through manually.

Core thesis (Shapiro): Large speculators (hedge funds, CTAs, momentum traders) tend to be maximally positioned at trend exhaustion, not trend inception. When they are already crowded onto one side, the next big move is statistically more likely to run them over than to reward them further. Fade the speculators, not the commercials (commercials hedge for structural reasons and are not a crowd-psychology signal).

When to Use This Skill

English:

  • "What markets are the speculators crowded into right now?"
  • "Run a COT report analysis" / "Show me COT positioning extremes"
  • "Is anyone 'trapped' in gold / the dollar / bonds right now?"
  • User wants to find contrarian futures setups
  • User asks for a Jason Shapiro-style COT screen

Japanese:

  • 「COTレポートで買われすぎ・売られすぎのポジションを調べて」
  • 「投機筋が偏っている市場は?」
  • 「ジェイソン・シャピロ式の逆張り分析をして」

Do NOT use when:

  • The user wants a trade signal right now — crowding alone is not actionable; see Guardrails below
  • The user is asking about individual equities — COT reports cover CFTC futures markets only (indices, rates, FX, metals, energy, agri, crypto), not single stocks

Prerequisites

  • FMP API Key: Required. Set FMP_API_KEY environment variable or pass --api-key. COT endpoints require an FMP Premium+ plan — a free-tier key will not have access.
  • Python 3.9+ with requests installed.
  • API Budget: One call per market (23 for --core, up to ~65 for the full universe), plus one call for the market list when neither --symbols nor --core is given.

Workflow

Phase 1: Run the crowding screen
bash
# Curated core futures universe (23 liquid/representative markets)
python3 skills/cot-contrarian-detector/scripts/screen_cot_crowding.py --core --output-dir reports/

# Explicit symbols
python3 skills/cot-contrarian-detector/scripts/screen_cot_crowding.py --symbols "ES,GC,CL" --output-dir reports/

# Full universe (all ~65 markets FMP's COT list covers)
python3 skills/cot-contrarian-detector/scripts/screen_cot_crowding.py --output-dir reports/

The script fetches each market's weekly legacy COT report (large-speculator long/short positions), computes a 156-week (3-year) and 26-week COT Index per market, and classifies extremes:

  • CROWDED_LONG — COT Index >= 90 (near the 3-year net-long high)
  • CROWDED_SHORT — COT Index <= 10 (near the 3-year net-short high)
  • NEUTRAL — everything in between

Markets with insufficient history to compute the index are never silently dropped — they appear in a skipped list with the reason (e.g. "insufficient history: 40/156 weeks").

Phase 2: Present the crowding report

Present the generated Markdown report, highlighting:

  • Which markets are CROWDED_LONG / CROWDED_SHORT and by how much
  • The 26-week index for context (is the crowding fresh or aging?)
  • Week-over-week net-position swings (fast-moving crowds are more fragile)
  • The methodology note and disclaimer — crowding is not a trade signal
Phase 3: Guide steps 2-5 manually (Shapiro process)

For any CROWDED_LONG / CROWDED_SHORT market the user wants to pursue, load references/shapiro-methodology.md and walk through the remaining steps — these are not automated:

  1. Crowding detection (done — this skill)
  2. News failure — use WebSearch to check whether recent news favorable to the crowd's direction failed to move price the way the crowd would expect (e.g. crowded-long market doesn't rally on bullish news). This is the core edge and the most important manual confirmation.
  3. Price-action confirmation — check the weekly chart for a reversal pattern or a failure at a new high/low.
  4. Entry — against the crowd, with a stop at the recent swing extreme and small, fixed-risk sizing (see position-sizer skill).
  5. Exit — when positioning normalizes toward neutral (COT Index back toward 50) or the stop is hit.

Never recommend an entry from crowding alone — steps 2 and 3 must both confirm first.

Show full SKILL.md (319 more words)Show less

Output

  • JSON: reports/cot_crowding_<as-of-date>.json — machine-readable, with a run_context block (schema_version, params, universe, data_date) plus markets (ranked results) and skipped (never silently dropped).
  • Markdown: reports/cot_crowding_<as-of-date>.md — human-readable report with Crowded Long / Crowded Short / Full Ranking / Week-over-Week Swings / Skipped Markets / Methodology sections.

Cadence

CFTC publishes the COT report Fridays ~3:30pm ET, with positions as of the prior Tuesday — data is always 3+ days old by the time it's published, and up to 9 days old by the following Friday. Run this skill:

  • Weekly, after Friday's publication or over the weekend, for a fresh read
  • Ad hoc, when the user asks about a specific market's positioning — the underlying data will be from the most recent Friday release either way

Guardrails

  • Crowdedness alone is NOT a trade signal. It is a precondition. Never suggest an entry without steps 2 (news failure) and 3 (price action) from references/shapiro-methodology.md also confirming.
  • Data is lagged. COT positions are 3-9 days old by the time they're read; do not treat them as a real-time signal.
  • Fade speculators, not commercials. This skill only looks at non-commercial ("large speculator") positioning — commercial hedging flows are structurally different and not a crowd-psychology signal.
  • Not investment advice. All output is for research/educational purposes.

Resources

references/shapiro-methodology.md

The full 5-step process (crowding → news failure → price action → entry → exit), why speculators (not commercials) are the fade target, the 3-day publication lag caveat, and a table of what this skill automates vs. what stays manual. Load this whenever guiding a user past step 1.

references/cot-index-calculation.md

The COT Index formula, lookback rationale (156w primary / 26w context), extreme threshold sensitivity, open-interest normalization rationale, the legacy-vs-disaggregated report distinction (this skill uses the legacy report's non-commercial = large-speculator fields), and a glossary of the FMP COT API field names consumed by scripts/cot_index.py.

When to Load References
  • First use / explaining the methodology: Load references/shapiro-methodology.md
  • Explaining a specific number in the report: Load references/cot-index-calculation.md
  • Regular execution: References not needed — the script handles the crowding computation

© tradermonty, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/cot-contrarian-detector of tradermonty/claude-trading-skills.

  • SKILL.md
  • references/cot-index-calculation.md
  • references/shapiro-methodology.md
  • requirements.txt
  • scripts/cot_index.py
  • scripts/screen_cot_crowding.py
  • scripts/tests/test_cot_index.py
  • scripts/tests/test_screen_cot_crowding.py

Open the folder on GitHubat commit c8d58f0

Compare with similar skills

Cot Contrarian Detector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cot Contrarian Detector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cot Contrarian Detector this skilltradermonty/claude-trading-skills3k—~1.9kAutomated safety check: PassMIT
Marketing OsYuzzyuk/marketing-os540—~2.5kAutomated safety check: PassMIT
Revenue Centric Designheliocosta-dev/revenue-centric-design740—~1.6kAutomated safety check: PassCustom licence
Startup Positioningferdinandobons/startup-skill1.2k—~4.6kAutomated safety check: PassMIT
B2b Playbookweilun88313/B2B-Playbook203—~3.1kAutomated safety check: PassProprietary
Research Brandonvoyage-ai/gtm-engineer-skills1.3k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Marketing Os

    Yuzzyuk/marketing-os

    A complete marketing department in one skill. An agent skill from Yuzzyuk/marketing-os.

    540 GitHub stars~2.5k tokensUpdated 1 mo ago
    Marketing & SEOAuto-check passed
  • Revenue Centric Design

    heliocosta-dev/revenue-centric-design

    Playbook for designing SaaS and startup products that convert, retain, and monetize — landing pages & CRO, checkout & forms, onboarding/activation, churn reduction, pricing psychology, dashboards…

    740 GitHub stars~1.6k tokensUpdated 1 mo ago
    Marketing & SEOAuto-check passed
  • Startup Positioning

    ferdinandobons/startup-skill

    Market positioning strategy using the April Dunford framework, enriched with JTBD discovery, Moore positioning statement, and Neumeier's Onliness Test.

    1.2k GitHub stars~4.6k tokensUpdated 3 mo ago
    Marketing & SEOAuto-check passed
  • B2b Playbook

    weilun88313/B2B-Playbook

    Turn B2B marketing work into evidence-aware outputs using market, positioning, demand, account-program, lifecycle, and tool-selection guidance.

    203 GitHub stars~3.1k tokensUpdated 29 days ago
    Marketing & SEOAuto-check passed
  • Research Brand

    onvoyage-ai/gtm-engineer-skills

    Researches a company from its URL and produces a Brand DNA file covering positioning, audience, competitors, voice, and messaging.

    1.3k GitHub stars~1.3k tokensUpdated 4 mo ago
    Marketing & SEOAuto-check passed
  • Startup Design

    ferdinandobons/startup-skill

    Design, validate, and plan a startup from scratch. An agent skill from ferdinandobons/startup-skill.

    1.2k GitHub stars~8.1k tokensUpdated 3 mo ago
    Marketing & SEOAuto-check passed

More from tradermonty/claude-trading-skills

All 74 skills in this repo
  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Auto-check passed
  • Theme Detector

    tradermonty/claude-trading-skills

    Detect and analyze trending market themes across sectors. An agent skill from tradermonty/claude-trading-skills.

    3k GitHub starsUsed in 2 repos~4.9k tokens
    Auto-check passed
  • Trader Memory Core

    tradermonty/claude-trading-skills

    Track investment theses across their lifecycle — from screening idea to closed position with postmortem.

    3k GitHub starsUsed in 2 repos~4.3k tokens
    Auto-check passed
  • Edge Strategy Reviewer

    tradermonty/claude-trading-skills

    Critically review strategy drafts from edge-strategy-designer for edge plausibility, overfitting risk, sample size adequacy, and execution realism.

    3k GitHub starsUsed in 1 repo~988 tokens
    Auto-check passed
  • Sector Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing sector rotation patterns and market cycle positioning.

    3k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Stanley Druckenmiller Investment

    tradermonty/claude-trading-skills

    Druckenmiller Strategy Synthesizer - Integrates 8 upstream skill outputs (Market Breadth, Uptrend Analysis, Market Top, Macro Regime, FTD Detector, VCP Screener, Theme Detector, CANSLIM Screener)…

    3k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed

Categories

Questions about Cot Contrarian Detector

What does Cot Contrarian Detector do?

Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason Shapiro's methodology. Cot Contrarian Detector is an agent skill from tradermonty/claude-trading-skills. Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find contrarian setups using Jason Shapiro's methodology.

When should I use Cot Contrarian Detector?

Cot Contrarian Detector fits situations like: the user asks about COT report analysis; crowded positioning; speculative positioning extremes; contrarian futures setups.

How do I install Cot Contrarian Detector in Claude Code?

Run `npx skills add tradermonty/claude-trading-skills --skill cot-contrarian-detector -a claude-code`. Or copy the skill folder (skills/cot-contrarian-detector in tradermonty/claude-trading-skills) into .claude/skills/cot-contrarian-detector in your project. Claude Code loads it when a task matches its description.

How do I install Cot Contrarian Detector in Codex?

Run `npx skills add tradermonty/claude-trading-skills --skill cot-contrarian-detector -a codex`. Or copy the skill folder (skills/cot-contrarian-detector in tradermonty/claude-trading-skills) into .agents/skills/cot-contrarian-detector in your project. Codex loads it when a task matches its description.

Can I use Cot Contrarian Detector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tradermonty/claude-trading-skills --skill cot-contrarian-detector -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cot-contrarian-detector, .gemini/skills/cot-contrarian-detector, .github/skills/cot-contrarian-detector and .opencode/skills/cot-contrarian-detector in your project.

What does Cot Contrarian Detector need to run?

Going by SKILL.md and its folder, Cot Contrarian Detector needs Python for the scripts in its folder, the command-line tools its instructions call (python3) and credentials named FMP_API_KEY. Our summary lists: Python 3; A credential in FMP_API_KEY.

Does Cot Contrarian Detector access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cot Contrarian Detector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Cot Contrarian Detector use?

Cot Contrarian Detector is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cot Contrarian Detector use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.9k tokens, read only when the agent opens those files.

What are the alternatives to Cot Contrarian Detector?

Skills that share tags, products or a category with Cot Contrarian Detector: Marketing Os (Yuzzyuk/marketing-os, 540 stars), Revenue Centric Design (heliocosta-dev/revenue-centric-design, 740 stars), Startup Positioning (ferdinandobons/startup-skill, 1.2k stars) and B2b Playbook (weilun88313/B2B-Playbook, 203 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cot Contrarian Detector?

tradermonty (a GitHub user) maintains it in tradermonty/claude-trading-skills, which has 2,982 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.

Source: tradermonty/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.