Skip to content
SkillScript-led2,539 tokens in use

Market Top Detector

A Python script and workflow that combine O'Neil distribution days, Minervini leading-stock health and defensive sector rotation into a 0-100 heuristic score for two to eight week market top risk.

7,428 stars on the repository MIT Licensetradermonty/claude-trading-skills · skills/market-top-detector

Skill label

measured from its files

What installing Market Top Detector costs

92tokens idle
2,539tokens in use
8,336tokens, 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/_market_calendar.py, scripts/_price_bars.py, scripts/breadth_csv_client.py, scripts/calculators/__init__.py, scripts/calculators/breadth_calculator.py, scripts/calculators/defensive_rotation_calculator.py, scripts/calculators/distribution_day_calculator.py, scripts/calculators/index_technical_calculator.py, scripts/calculators/leading_stock_calculator.py, scripts/calculators/math_utils.py, scripts/calculators/sentiment_calculator.py, scripts/fmp_client.py, scripts/historical_comparator.py, scripts/market_top_detector.py, scripts/price_bar_utils.py, scripts/report_generator.py, scripts/scenario_engine.py, scripts/scorer.py, scripts/utils.py.

Touches

shelldetectednetworkdetectedwrites filesdetectedcredentialsdetected

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 →
Good
  • Frontmatter12/15
  • Structure23/25
  • Examples9/15
  • Output10/15
  • Size15/15
  • Resources3/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 →
Good
  • Reads credentials−15

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

    SKILL.md, line 119
  • Runs shell commands−5

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

    SKILL.md, line 119
  • Reaches the network−10

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

    scripts/_market_calendar.py, line 108
  • Writes files−8

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

    scripts/report_generator.py, line 14

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

Market Top Detector assesses tactical market top risk over a two to eight week horizon. Claude collects a few breadth and sentiment readings from the web, runs a Python script that pulls index, ETF and volatility data from Financial Modeling Prep, and produces a six-component composite score with a risk zone from Green to Critical.

The score is a heuristic. The skill states that a score of 70 does not mean a 70 percent chance of a top, and it reports no comparable historical episode when the data does not support a match. It describes market conditions and does not give investment advice.

What You Get

  • A JSON and a Markdown report named market_top_DATE_TIME
  • A 0-100 composite score with a Green, Yellow, Orange, Red or Critical risk zone
  • Six component scores with the strongest warning signal highlighted
  • Data freshness warnings for any manual input older than three business days
  • A comparison with historical top patterns and what-if sensitivity scenarios
  • A delta against the previous report in the same output folder

Common Use Cases

  • Checking whether distribution days are piling up while the index holds
  • Seeing whether defensive sectors are outperforming growth
  • Tracking whether leading growth ETFs are breaking down ahead of the index
  • Producing a recurring top-risk report and comparing it with the last one

What Makes It Unique

It joins three named methods, O’Neil, Minervini and Monty, in one weighted score and keeps its claims modest. The skill spells out that the score is a heuristic and not an event probability, that risk-budget percentages are policy heuristics, and that no calibration results are supplied. It focuses on tactical two to eight week signals for 10 to 20 percent corrections, and a separate Bubble Detector skill covers longer horizons.

Under The Hood

The skill runs a Python script from the command line. The script calls the Financial Modeling Prep API for S&P 500, QQQ, VIX, growth ETF and sector ETF quotes and history, using your API key from an environment variable or a flag, and downloads a public breadth CSV from GitHub Pages. Before the run, Claude uses web search to collect the 50-day breadth percentage and the CBOE put/call ratio, and may fetch a Barchart or YCharts page as a fallback. The script writes JSON and Markdown reports into an output folder and reads the previous report there for the delta. Dependencies come from a requirements file and include a market calendar library and requests.

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