regime-overlay

regime-overlay is a skill for Claude Code from Superior-Trade/superior-skills. It costs 68 tokens per session (1,403 once invoked), scanned A, original, MIT.

A reusable filter that lets a directional trading strategy enter only when several market signals agree about the current condition. A regime means the broader market state, such as a strong rise, strong fall, or sideways range.

In plain words
What is it for?
Use it to add trend confirmation, ADX and EMA-separation checks, or explicit strong-bull, strong-bear, and range gates to an existing strategy.
Why use it?
A strategy can work in one market state and fail in another. This filter can skip entries during unsuitable conditions, such as choppy sideways trading.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the superior-skills plugin — 31 skills shipped together

Good fit Use it to add trend confirmation, ADX and EMA-separation checks, or explicit strong-bull, strong-bear, and range gates to an existing strategy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/superior-trade/superior-skills/regime-overlay
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 Superior-Trade/superior-skills --skill regime-overlay
Clone the repo
git clone --depth 1 https://github.com/Superior-Trade/superior-skills

Made for: Claude Code.

Or install superior-skills, the plugin that ships this one along with the rest of its 31 skills.

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 regime-overlay

README.md
[![agentmods](https://agentmods.dev/badge/skills/superior-trade/superior-skills/regime-overlay/github.svg)](https://agentmods.dev/skills/superior-trade/superior-skills/regime-overlay)
Your own site
<a href="https://agentmods.dev/skills/superior-trade/superior-skills/regime-overlay"><img src="https://agentmods.dev/badge/skills/superior-trade/superior-skills/regime-overlay/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 regime-overlay

Your own site · 80×15
<a href="https://agentmods.dev/skills/superior-trade/superior-skills/regime-overlay"><img src="https://agentmods.dev/badge/skills/superior-trade/superior-skills/regime-overlay.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,403 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.00068 $0.01403
Opus 5 $0.00034 $0.00701
Sonnet 5 $0.00014 $0.00281
Haiku 4.5 $0.00007 $0.00140

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

Security

Grade A, and why

regime-overlay 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 12d ago.

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.

skills/regime-overlay/SKILL.md · 112 lines

How it starts

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

Regime Overlay — Triple-Confirmation Gate

A reusable filter that wraps any directional strategy and only allows entries when three independent regime confirmations align. Validated as the difference between a fragile and a robust trend strategy.

Searchable under: regime filter, trend gate, trade-or-skip filter, directional confirmation, ADX gate.

Why a separate primitive

After 21 backtests, the single biggest performance lever was not entry logic, stop sizing, or trailing config. It was whether the strategy traded at all during specific market structure.

The proof:

  • Same Donchian-breakdown short on BTC 4h, no regime gate → +12.85% over 162d (looks great)
  • Same strategy, on a different window (the rangy second half) → -4.32% (edge gone)
  • Same strategy with triple-confirmed regime gate → +6.69% with 0% drawdown, fires zero trades in the chop window

The first version captured a real edge mixed with random noise. The third version captured only the real edge. Smaller absolute return; cleaner equity curve; no losing periods.

The three confirmations

A signal is "in regime" when ALL three of these hold simultaneously:

Indicator Threshold What it confirms
(EMA50 - EMA200) / EMA200 < -0.06 (for bear) Structural trend direction — not a fresh cross, real separation
ADX(14) > 25 Strength of the current trend
close.pct_change(30) < -0.10 (for bear) Recent momentum is actually moving

Three independent angles — structure, strength, recency. A market can satisfy any one or two by accident; satisfying all three is genuinely rare and genuinely informative.

For long-side strategies, invert the signs:

  • (EMA50 - EMA200) / EMA200 > +0.06
  • ADX(14) > 25 (same — ADX is direction-agnostic)
  • close.pct_change(30) > +0.10

Implementation

def regime_strong_bear(df: pd.DataFrame) -> pd.Series:
    ema50 = ta.EMA(df, timeperiod=50)
    ema200 = ta.EMA(df, timeperiod=200)
    adx = ta.ADX(df, timeperiod=14)
    ema_sep = (ema50 - ema200) / ema200
    ret_30 = df["close"].pct_change(30)
    return (ema_sep < -0.06) & (adx > 25) & (ret_30 < -0.10)


def regime_strong_bull(df: pd.DataFrame) -> pd.Series:
    ema50 = ta.EMA(df, timeperiod=50)
    ema200 = ta.EMA(df, timeperiod=200)
    adx = ta.ADX(df, timeperiod=14)
    ema_sep = (ema50 - ema200) / ema200
    ret_30 = df["close"].pct_change(30)
    return (ema_sep > 0.06) & (adx > 25) & (ret_30 > 0.10)


def regime_range(df: pd.DataFrame) -> pd.Series:
    adx = ta.ADX(df, timeperiod=14)
    return adx < 25

Read the full file on GitHub · 112 lines

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. 12d ago First seen · 112 lines · 68 tokens per session scan A 58ce17ff15c9

Subscribe to this mod's changes

regime-overlay is a skill published in the GitHub repository Superior-Trade/superior-skills (209 stars, last pushed 2d ago), licensed MIT. It adds 68 tokens to every session and 1,403 once invoked, about $0.0003 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

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

ashare-pre-st-filter

An A-share China stock risk checker that forecasts whether a company may receive an ST or *ST warning in the next financial year. ST labels are Chinese exchange warnings for companies facing specified financial or regulatory problems.

HKUDS/Vibe-Trading · 89 tokens

correlation-analysis

Correlation and cointegration analysis — co-movement discovery, deep return-correlation analysis, sector clustering, realized correlation, Engle-Granger / Johansen cointegration, half-life, Kalman dynamic hedge ratio, cross-market linkage analysis, and pair-trading signal generation.

HKUDS/Vibe-Trading · 57 tokens

credit-analysis

A guide to analysing bonds and other fixed-income investments, including issuer credit quality, interest payments, default risk, credit spreads, and convertible bonds. It also covers Chinese fixed-income markets and local-government financing bonds.

HKUDS/Vibe-Trading · 36 tokens

social-media-intelligence

Social media intelligence: financial signal extraction from Twitter/X, Telegram, Discord, and Reddit for sentiment-driven trading strategies.

HKUDS/Vibe-Trading · 28 tokens

vibe-trading

Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract →…

HKUDS/Vibe-Trading · 173 tokens