Agent skill

macro-regime-detector

Detect structural macro regime transitions (1-2 year horizon) using cross-asset ratio analysis. Analyze RSP/SPY concentration, yield curve, credit conditions, size factor, equity-bond relationship, and sector rotation to identify regime shifts between Concentration, Broadening, Contraction, Inflationary, and Transitional states. Run when user asks about macro regime, market regime change, structural rotation, or long-term market positioning.

BaggaT236github.com/BaggaT236GitHub ↗
claude-codeships scriptsMIT
Install
npx skills add BaggaT236/AI-Trading-Skills --skill macro-regime-detector --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 29
SKILL.md size: 4 KB
Bundled scripts: yes
Path: skills/macro-regime-detector/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 118
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Macro Regime Detector Detect structural macro regime transitions using monthly-frequency cross-asset ratio analysis. This skill identifies 1-2 year regime shifts that inform strategic portfolio positioning. ## When to Use - User asks about current macro regime or regime transitions - User wants to understand structural market rotations (concentration vs broadening) - User asks about long-term positioning based on yield curve, credit, or cross-asset signals - User references RSP/SPY ratio, IWM/SPY, HYG/LQD, or other cross-asset ratios - User wants to assess whether a regime change is underway ## Workflow 1. Load reference documents for methodology context: - `references/regime_detection_methodology.md` - `references/indicator_interpretation_guide.md` 2. Execute the main analysis script: ```bash uv run python3 skills/macro-regime-detector/scripts/macro_regime_detector.py --output-dir reports/ ``` This fetches 600 days of data for 9 ETFs + Treasury rates (~10 API calls total). An **FMP API key is required** to run this skill (the client raises if it is missing). For individual ETFs whose FMP historical-price endpoint returns nothing, the client automatically falls back to yfinance —

What's inside
Steps it walks through
  1. When to Use
  2. Workflow
  3. Prerequisites
  4. 6 Components
  5. 5 Regime Classifications
  6. Output
  7. Relationship to Other Skills
  8. Script Arguments
  9. Resources
Ships with 24 files
  • references/historical_regimes.md
  • references/indicator_interpretation_guide.md
  • references/regime_detection_methodology.md
  • scripts/calculators/__init__.py
  • scripts/calculators/concentration_calculator.py
  • scripts/calculators/credit_conditions_calculator.py
  • scripts/calculators/equity_bond_calculator.py
  • scripts/calculators/sector_rotation_calculator.py
  • scripts/calculators/size_factor_calculator.py
  • scripts/calculators/utils.py
  • scripts/calculators/yield_curve_calculator.py
  • scripts/fmp_client.py
  • scripts/macro_regime_detector.py
  • scripts/report_generator.py
  • scripts/scorer.py
  • scripts/tests/conftest.py
  • scripts/tests/test_concentration.py
  • scripts/tests/test_credit_conditions.py
  • scripts/tests/test_equity_bond.py
  • scripts/tests/test_fmp_client.py
  • scripts/tests/test_helpers.py
  • scripts/tests/test_main_cli.py
  • scripts/tests/test_report_generator.py
  • scripts/tests/test_scorer.py
first 24 of 29
Commands it runs
uv run python3 skills/macro-regime-detector/scripts/macro_regime_detector.py --output-dir reports/
python3 macro_regime_detector.py [options]
More from AI-Trading-Skills
All skills →
About this skill
What does the macro-regime-detector skill do?

Detect structural macro regime transitions (1-2 year horizon) using cross-asset ratio analysis. Analyze RSP/SPY concentration, yield curve, credit conditions, size factor, equity-bond relationship, and sector rotation to identify regime shifts between Concentration, Broadening, Contraction, Inflationary, and Transitional states. Run when user asks about macro regime, market regime change, structural rotation, or long-term market positioning.

How do I install it?

Run `npx skills add BaggaT236/AI-Trading-Skills --skill macro-regime-detector --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BaggaT236/AI-Trading-Skills, a repository with 118 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going