skills/sector-analyst/SKILL.md
This skill should be used when analyzing sector rotation patterns and market cycle positioning. It fetches sector uptrend data from CSV (no API key required) and optionally accepts chart images for supplementary analysis. Use this skill when the user requests sector rotation analysis, cyclical vs defensive assessment, overbought/oversold identification, or market cycle phase estimation. All analysis and output are conducted in English.
npx skillsauth add kavi-lin/stock sector-analystInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables comprehensive analysis of sector rotation and market cycle positioning by fetching uptrend ratio data from TraderMonty's public CSV dataset. It ranks sectors, calculates cyclical vs defensive risk regime scores, identifies overbought/oversold conditions, and estimates the current market cycle phase. Chart images can optionally supplement the data-driven analysis with industry-level detail.
Use this skill when:
Example user requests:
requests library (for CSV fetching)Sector uptrend ratios are fetched from TraderMonty's public GitHub repository (no API key required):
sector_summary.csv — uptrend ratio, trend, slope, and status per sectoruptrend_ratio_timeseries.csv — max(date) used to verify data recency# Default: fetch CSV, print human-readable analysis
python3 scripts/analyze_sector_rotation.py
# JSON output
python3 scripts/analyze_sector_rotation.py --json
# Save to file
python3 scripts/analyze_sector_rotation.py --save --output-dir reports/
Follow this structured workflow:
python3 scripts/analyze_sector_rotation.pyUse the script's cycle phase estimate as a starting point:
references/sector_rotation.md to access market cycle and sector rotation frameworksIf chart images are provided, use them to supplement with industry-level detail:
Synthesize observations into an objective assessment:
Use data-driven language and specific references to performance figures.
Based on sector rotation principles and current positioning, develop 2-4 potential scenarios for the next phase:
For each scenario:
Scenarios should range from most likely (highest probability) to alternative/contrarian scenarios.
Create a structured Markdown document with the following sections:
Required Sections:
Save analysis results as a Markdown file with naming convention: sector_analysis_YYYY-MM-DD.md
Use this structure:
# Sector Performance Analysis - [Date]
## Executive Summary
[2-3 sentences summarizing key findings]
## Current Situation
### Market Cycle Assessment
[Which cycle phase and why]
### Performance Patterns Observed
#### 1-Week Performance
[Analysis of recent performance]
#### 1-Month Performance
[Analysis of medium-term trends]
#### Sector-Level Analysis
[Detailed breakdown by sector]
#### Industry-Level Analysis
[Notable industry-specific observations]
## Supporting Evidence
### Confirming Signals
- [List data points supporting cycle assessment]
### Contradictory Signals
- [List any conflicting indicators]
## Scenario Analysis
### Scenario 1: [Name] (Probability: XX%)
**Description**: [What happens]
**Outperformers**: [Sectors/industries]
**Underperformers**: [Sectors/industries]
**Catalysts**: [What would confirm this scenario]
### Scenario 2: [Name] (Probability: XX%)
[Repeat structure]
[Additional scenarios as appropriate]
## Recommended Positioning
### Strategic Positioning (Medium-term)
[Sector allocation recommendations]
### Tactical Positioning (Short-term)
[Specific adjustments or opportunities]
## Key Risks and Monitoring Points
[What to watch that could invalidate the analysis]
---
*Analysis Date: [Date]*
*Data Period: [Timeframe of charts analyzed]*
When conducting analysis:
Apply these probability ranges based on evidence strength:
Total probabilities across all scenarios should sum to approximately 100%.
analyze_sector_rotation.py - Fetches sector CSV data and produces sector rankings, risk regime scoring, overbought/oversold flags, and cycle phase estimation. No API key required.sector_rotation.md - Comprehensive knowledge base covering market cycle phases, typical sector performance patterns, and probability assessment frameworksSample charts demonstrating the expected input format for optional image-based analysis:
sector_performance.jpeg - Example sector-level performance chart (1-week and 1-month)industory_performance_1.jpeg - Example industry performance chart (outperformers)industory_performance_2.jpeg - Example industry performance chart (underperformers)development
# earnings-analyst — 個股財報深度分析 > **Trigger**: `財報 [TICKER]` > **Version**: V1.0 > **Data Source**: FMP HTTP REST(`$FMP_API_KEY`) ## 目的 針對單一個股產出**深度財報分析報告**(逐季趨勢、品質指標、估值、分析師共識),涵蓋 sector V1.4 與 `分析 [TICKER]` 既有 protocol **沒有**的「財報層級」深潛內容。 ## 與既有 skill 的差異 | Skill | 重點 | 觸發 | |---|---|---| | `us-stock-analysis` | 估值/技術/情緒 snapshot(yfinance + FMP partial) | Phase 2 fundamentals lane | | `earnings-valuation-forecaster` | 12M 目標價 3×3 敏感度 | ad-hoc / earnings 前 14 天 | | `earnings-trade-analyzer` |
testing
Daily Top N hot themes × Top M short-term movers per theme. Combines theme-detector heat scoring (medium-term) with short-term-target predictions (1d/5d/15d) into a "Tactical Opportunity Radar" recommendation log. Tags concentration WARNING when ≥2 picks share theme. Records FRED + market regime snapshot at recommendation time for future backtest cross-tabs. Standalone — not auto-wired into investment_protocol. Use for daily watchlist refresh / Dashboard推薦面板feed / batch screening across hot themes.
testing
Short-term (1d / 5d / 15d) directional projection for a US stock — "Tactical Opportunity Radar". Outputs target range + confidence breakdown + benchmark-relative alpha + trading meta (stop / position size hint / exit trigger). Each horizon uses independent weights from config/weights.yaml. Refuses to project when source data is stale (returns insufficient_data with reasons). Hard-clamped to prevent cold-start absurd predictions. Use when caller wants short-term directional bias on a specific ticker, NOT for long-term valuation (use earnings-valuation-forecaster for 12-month). Standalone — not auto-wired into investment_protocol.
tools
Shared Finnhub API client used by other skills. Provides rate-limited (60/min), cached, retry-aware access to 17 Finnhub endpoints covering quotes, OHLCV, fundamentals, earnings calendar, earnings surprises, insider transactions, recommendation history, price targets, upgrades/downgrades, dividends, splits, IPOs, and SEC filings. Also exports adapters that normalize Finnhub raw responses into FMP-compatible shapes so that downstream code can swap providers without changing call sites. Use when another skill needs Finnhub data or when building a unified provider layer.