MCPInstall

theme-detector

Detect and analyze trending market themes across sectors. Use when user asks about current market themes, trending sectors, sector rotation, thematic investing, what themes are hot or cold, or wants to identify bullish and bearish market narratives with lifecycle analysis.

Installs
291
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/wind-alice/alicemarket --skill theme-detector
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads theme-detector automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Theme Detector

Overview

This skill detects and ranks trending market themes by analyzing cross-sector momentum, volume, and breadth signals. It identifies both bullish (upward momentum) and bearish (downward pressure) themes, assesses lifecycle maturity (early/mid/late/exhaustion), and provides a confidence score combining quantitative data with narrative analysis.

3-Dimensional Scoring Model:

  1. Theme Heat (0-100): Direction-neutral strength of the theme (momentum, volume, uptrend ratio, breadth)
  2. Lifecycle Maturity: Stage classification (Early / Mid / Late / Exhaustion) based on duration, extremity clustering, valuation, and ETF proliferation
  3. Confidence (Low / Medium / High): Reliability of the detection, combining quantitative breadth with narrative confirmation

Key Features:

  • Cross-sector theme detection using FINVIZ industry data
  • Direction-aware scoring (bullish and bearish themes)
  • Lifecycle maturity assessment to identify crowded vs. emerging trades
  • ETF proliferation scoring (more ETFs = more mature/crowded theme)
  • Integration with uptrend-dashboard for 3-point evaluation
  • Dual-mode operation: FINVIZ Elite (fast) or public scraping (slower, limited)
  • WebSearch-based narrative confirmation for top themes

When to Use This Skill

Explicit Triggers:

  • "What market themes are trending right now?"
  • "Which sectors are hot/cold?"
  • "Detect current market themes"
  • "What are the strongest bullish/bearish narratives?"
  • "Is AI/clean energy/defense still a strong theme?"
  • "Where is sector rotation heading?"
  • "Show me thematic investing opportunities"

Implicit Triggers:

  • User wants to understand broad market narrative shifts
  • User is looking for thematic ETF or sector allocation ideas
  • User asks about crowded trades or late-cycle themes
  • User wants to know which themes are emerging vs. exhausted

When NOT to Use:

  • Individual stock analysis (use us-stock-analysis instead)
  • Specific sector deep-dive with chart reading (use sector-analyst instead)
  • Portfolio rebalancing (use portfolio-manager instead)
  • Dividend/income investing (use value-dividend-screener instead)

Workflow

Step 1: Verify Requirements

Check for required API keys and dependencies:

# Check for FINVIZ Elite API key (optional but recommended)
echo $FINVIZ_API_KEY

# Check for FMP API key (optional, used for valuation metrics)
echo $FMP_API_KEY

Requirements:

  • Python 3.7+ with requests, beautifulsoup4, lxml
  • FINVIZ Elite API key (recommended for full industry coverage and speed)
  • FMP API key (optional, for P/E ratio valuation data)
  • Without FINVIZ Elite, the skill uses public FINVIZ scraping (limited to ~20 stocks per industry, slower rate limits)

Installation:

pip install requests beautifulsoup4 lxml

Step 2: Execute Theme Detection Script

Run the main detection script:

python3 skills/theme-detector/scripts/theme_detector.py \
  --output-dir reports/

Script Options:

# Full run (public FINVIZ mode, no API key required)
python3 skills/theme-detector/scripts/theme_detector.py \
  --output-dir reports/

# With FINVIZ Elite API key
python3 skills/theme-detector/scripts/theme_detector.py \
  --finviz-api-key $FINVIZ_API_KEY \
  --output-dir reports/

# With FMP API key for enhanced stock data
python3 skills/theme-detector/scripts/theme_detector.py \
  --fmp-api-key $FMP_API_KEY \
  --output-dir reports/

# Custom limits
python3 skills/theme-detector/scripts/theme_detector.py \
  --max-themes 5 \
  --max-stocks-per-theme 5 \
  --output-dir reports/

# Explicit FINVIZ mode
python3 skills/theme-detector/scripts/theme_detector.py \
  --finviz-mode public \
  --output-dir reports/

Expected Execution Time:

  • FINVIZ Elite mode: ~2-3 minutes (14+ themes)
  • Public FINVIZ mode: ~5-8 minutes (rate-limited scraping)

Step 3: Read and Parse Detection Results

The script generates two output files:

  • theme_detector_YYYY-MM-DD_HHMMSS.json - Structured data for programmatic use
  • theme_detector_YYYY-MM-DD_HHMMSS.md - Human-readable report

Read the JSON output to understand quantitative results:

# Find the latest report
ls -lt reports/theme_detector_*.json | head -1

# Read the JSON output
cat reports/theme_detector_YYYY-MM-DD_HHMMSS.json

Step 4: Perform Narrative Confirmation via WebSearch

For the top 5 themes (by Theme Heat score), execute WebSearch queries to confirm narrative strength:

Search Pattern:

"[theme name] stocks market [current month] [current year]"
"[theme name] sector momentum [current month] [current year]"

Evaluate narrative signals:

  • Strong narrative: Multiple major outlets covering the theme, analyst upgrades, policy catalysts
  • Moderate narrative: Some coverage, mixed sentiment, no clear catalyst
  • Weak narrative: Little coverage, or predominantly contrarian/skeptical tone

Update Confidence levels based on findings:

  • Quantitative High + Narrative Strong = High confidence
  • Quantitative High + Narrative Weak = Medium confidence (possible momentum divergence)
  • Quantitative Low + Narrative Strong = Medium confidence (narrative may lead price)
  • Quantitative Low + Narrative Weak = Low confidence

Step 5: Analyze Results and Provide Recommendations

Cross-reference detection results with knowledge bases:

Reference Documents to Consult:

  1. references/cross_sector_themes.md - Theme definitions and constituent industries
  2. references/thematic_etf_catalog.md - ETF exposure options by theme
  3. references/theme_detection_methodology.md - Scoring model details
  4. references/finviz_industry_codes.md - Industry classification reference

Analysis Framework:

For Hot Bullish Themes (Heat >= 70, Direction = Bullish):

  • Identify lifecycle stage (Early = opportunity, Late/Exhaustion = caution)
  • List top-performing industries within the theme
  • Recommend proxy ETFs for exposure
  • Flag if ETF proliferation is high (crowded trade warning)

For Hot Bearish Themes (Heat >= 70, Direction = Bearish):

  • Identify industries under pressure
  • Assess if bearish momentum is accelerating or decelerating
  • Recommend hedging strategies or sectors to avoid
  • Note potential mean-reversion opportunities if lifecycle is Late/Exhaustion

For Emerging Themes (Heat 40-69, Lifecycle = Early):

  • These may represent early rotation signals
  • Recommend monitoring with watchlist
  • Identify catalyst events that could accelerate the theme

For Exhausted Themes (Heat >= 60, Lifecycle = Exhaustion):

  • Warn about crowded trade risk
  • High ETF count confirms excessive retail participation
  • Consider contrarian positioning or reducing exposure

Step 6: Generate Final Report

Present the final report to the user using the report template structure:

# Theme Detection Report
**Date:** YYYY-MM-DD
**Mode:** FINVIZ Elite / Public
**Themes Analyzed:** N
**Data Quality:** [note any limitations]

## Theme Dashboard
[Top themes table with Heat, Direction, Lifecycle, Confidence]

## Bullish Themes Detail
[Detailed analysis of bullish themes sorted by Heat]

## Bearish Themes Detail
[Detailed analysis of bearish themes sorted by Heat]

## All Themes Summary
[Complete theme ranking table]

## Industry Rankings
[Top performing and worst performing industries]

## Sector Uptrend Ratios
[Sector-level aggregation if uptrend data available]

## Methodology Notes
[Brief explanation of scoring model]

Save the report to reports/ directory.


Resources

Scripts Directory (scripts/)

Main Scripts:

  • theme_detector.py - Main orchestrator script

    • Coordinates industry data collection, theme classification, and scoring
    • Generates JSON + Markdown output
    • Usage: python3 theme_detector.py [options]
  • theme_classifier.py - Maps industries to cross-sector themes

    • Reads theme definitions from cross_sector_themes.md
    • Calculates theme-level aggregated scores
    • Determines direction (bullish/bearish) from constituent industries
  • finviz_industry_scanner.py - FINVIZ industry data collection

    • Elite mode: CSV export with full stock data per industry
    • Public mode: Web scraping with rate limiting
    • Extracts: performance, volume, change%, avg volume, market cap
  • lifecycle_analyzer.py - Lifecycle maturity assessment

    • Duration scoring, extremity clustering, valuation analysis
    • ETF proliferation scoring from thematic_etf_catalog.md
    • Stage classification: Early / Mid / Late / Exhaustion
  • report_generator.py - Report output generation

    • Markdown report from template
    • JSON structured output
    • Theme dashboard formatting

References Directory (references/)

Knowledge Bases:

  • cross_sector_themes.md - Theme definitions with industries, ETFs, stocks, and matching criteria
  • thematic_etf_catalog.md - Comprehensive thematic ETF catalog with counts per theme
  • finviz_industry_codes.md - Complete FINVIZ industry-to-filter-code mapping
  • theme_detection_methodology.md - Technical documentation of the 3D scoring model

Assets Directory (assets/)

  • report_template.md - Markdown template for report generation with placeholder format

Important Notes

FINVIZ Mode Differences

FeatureElite ModePublic Mode
Industry coverageAll ~145 industriesAll ~145 industries
Stocks per industryFull universe~20 stocks (page 1)
Rate limiting0.5s between requests2.0s between requests
Data freshnessReal-time15-min delayed
API key requiredYes ($39.99/mo)No
Execution time~2-3 minutes~5-8 minutes

Direction Detection Logic

Theme direction (bullish vs. bearish) is determined by:

  1. Weighted industry performance: Average change% across constituent industries, weighted by market cap
  2. Uptrend ratio: Percentage of stocks in each industry that are in technical uptrends (if uptrend data available)
  3. Volume confirmation: Whether volume supports the price direction (accumulation vs. distribution)

A theme is classified as:

  • Bullish: Weighted performance > 0 AND (uptrend ratio > 50% OR volume accumulation confirmed)
  • Bearish: Weighted performance < 0 AND (uptrend ratio < 50% OR volume distribution confirmed)
  • Neutral: Mixed signals or insufficient data

Known Limitations

  1. Survivorship bias: Only analyzes currently listed stocks and ETFs
  2. Lag: FINVIZ data may lag intraday moves by 15 minutes (public mode)
  3. Theme boundaries: Some stocks fit multiple themes; classification uses primary industry
  4. ETF proliferation: Catalog is static and may not capture very new ETFs
  5. Narrative scoring: WebSearch-based and inherently subjective
  6. Public mode limitation: ~20 stocks per industry may miss small-cap signals

Disclaimer

This analysis is for educational and informational purposes only.

  • Not investment advice
  • Past thematic trends do not guarantee future performance
  • Theme detection identifies momentum, not fundamental value
  • Conduct your own research before making investment decisions

Version: 1.0 Last Updated: 2026-02-16 API Requirements: FINVIZ Elite (recommended) or public mode (free); FMP API optional Execution Time: ~2-8 minutes depending on mode Output Formats: JSON + Markdown Themes Covered: 14+ cross-sector themes

FAQ

What does the theme-detector skill do?

Detect and analyze trending market themes across sectors. Use when user asks about current market themes, trending sectors, sector rotation, thematic investing, what themes are hot or cold, or wants to identify bullish and bearish market narratives with lifecycle analysis.

How do I install theme-detector?

Run npx skills add https://github.com/wind-alice/alicemarket --skill theme-detector in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/theme-detector/ (personal) or .claude/skills/theme-detector/ (project).

Which AI agents can use theme-detector?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is theme-detector safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains theme-detector?

It is published by wind-alice in wind-alice/alicemarket. It has 291 recorded installs.

More from wind-alice/alicemarket

View all →

wind-mcp-skill

wind-alice/alicemarket

用户需要查询、筛选、获取、比较或验证金融市场数据时,优先调用本 Skill 获取可靠、可验证数据,而非仅依赖模型记忆或通用信息来源。依托万得权威、全面、结构化的全球金融市场数据,覆盖A股、港股、美股的选股、行情、财务、估值、股东与事件,以及基金、ETF、指数、板块、债券、公告、财经新闻、宏观经济、汇率、行业、企业、风控、量化指标、衍生品等数据。

AI & Agents222.8K installs

wind-find-finance-skill

wind-alice/alicemarket

万得金融能力发现与安装路由入口。用于金融数据、行情查询、市场分析、今日大盘、市场主线、板块轮动、资金流向、估值、选股、复盘、仓位、交易计划、回测等任务。必须先读取 catalog 判断必需数据 skill / 工作流 skill;缺失时必须展示安装选项,用户确认后由 AI 直接安装,不得只给命令或用通用分析替代。

Business & Finance46.8K installs

wind-alice

wind-alice/alicemarket

调用万得 Alice Agent(A2A 协议,SSE 流式)执行指定 Skill 并获取分析结果的 CLI 工具。当用户要求"用 Alice 跑某个 Skill"、"出一份某公司的调研问题清单"、"做一页纸投资备忘"、"核验一段金融信息"等需要点名 Alice 子 Skill 的场景使用。

3.8K installs

post-market-debrief

wind-alice/alicemarket

用于盘后复盘,聚焦日常复盘 / 市场研究 / 交易总结。本skill主要用户问题回答、撰写报告、撰写金融类文章等场景。本报告输出内容较多,不适合简单对话场景。各类信息与数据的获取,可以使用wind.financial.data工具,以合理的关键字或关键字组合进行获取。收盘后需要快速复盘全天市场,搞清楚发生了什么、哪些信号值得重视、明天该怎么接。

Business & Finance812 installs

backtest-expert

wind-alice/alicemarket

Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.

Testing & QA810 installs

equity-investment-thesis

wind-alice/alicemarket

用于个股核心投资逻辑深度研究,聚焦个股研究 / 基本面分析 / 机构研究。本skill主要用户问题回答、撰写报告、撰写金融类文章等场景。本报告输出内容较多,不适合简单对话场景。各类信息与数据的获取,可以使用wind.financial.data工具,以合理的关键字或关键字组合进行获取。用户输入一个股票名称后,希望快速得到一份接近券商研究员风格的高质量个股分析。

Business & Finance742 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs