Skip to content
SkillScript-led2,363 tokens in use

Contrarian Setup Gate

Reads three contrarian-pipeline report files and applies a fail-closed rule set to produce one setup status, with the reason for every input that could not be confirmed.

7,426 stars on the repository MIT Licensetradermonty/claude-trading-skills · skills/contrarian-setup-gate

Skill label

measured from its files

What installing Contrarian Setup Gate costs

67tokens idle
2,363tokens in use
8,105tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Script-led

Script-ledMixedModel-led

Most of this skill is scripts, so it behaves much the same whichever model runs it.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/gate_logic.py, scripts/run_contrarian_setup_gate.py.

Touches

shelldetectedwrites filesdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter8/15
  • Structure25/25
  • Examples15/15
  • Output15/15
  • Size15/15
  • Resources11/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 47
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    scripts/run_contrarian_setup_gate.py, line 201

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community68
  • Maturity36
  • Momentum40

Contrarian Setup Gate is the synthesis step of a three-step contrarian process. It reads the JSON reports from the COT crowding detector, the news-reaction failure analyzer and the weekly price-action confirmation, and combines them into a single status such as CROWDED, WATCHING_PRICE, READY_FOR_PLAN, REJECTED or INSUFFICIENT_EVIDENCE.

It runs entirely on local files. A missing, unreadable, stale or inconsistent report never counts as a pass; it is named in the output and blocks or downgrades the status. The gate does not place or recommend orders and is not investment advice.

What You Get

  • A setup status of READY_FOR_PLAN, WATCHING_PRICE, CROWDED, REJECTED or INSUFFICIENT_EVIDENCE
  • A list of missing or blocking confirmations, each with its state and reason
  • Direction, entry trigger and invalidation level when all three steps confirm
  • A decision table reference that covers every reachable combination of the three step states

Common Use Cases

  • Seeing which pipeline step still blocks a futures setup
  • Checking whether stale or mismatched report files were used
  • Handing a confirmed direction and stop reference to a position sizing step
  • Re-running a past date with a fixed as-of value to get the same result

What Makes It Unique

Each step is settled fully before the next file is consulted, so an earlier definitive verdict is never softened by a later problem. The as-of date is required, so staleness checks give the same result on every rerun. Input files are rejected if they contain any non-finite number anywhere, which keeps every output a valid JSON file even with adversarial input. A bad input file produces a report that names the reason and exits normally.

Under The Hood

The agent runs a local Python script that reads up to three JSON report files and writes a JSON file and a Markdown file into an output folder (reports/ by default), so it creates files on disk. The script makes no network calls, reads no environment variables for credentials and needs no API key. A second module holds the pure decision logic and a reference file holds the decision table.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers