breadth-chart-analyst by tradermonty/claude-trading-skills
npx skills add https://github.com/tradermonty/claude-trading-skills --skill breadth-chart-analyst此技能支持对两种互补的市场广度图表进行专门分析,提供战略(中至长期)和战术(短期)的市场视角。分析广度图表图像以评估市场健康状况,基于回测策略识别交易信号,并制定持仓建议。所有思考与输出均完全使用英文进行。
在以下情况使用此技能:
在以下情况请勿使用此技能:
us-stock-analysis 技能)sector-analyst 技能)market-news-analyst 技能)广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
此技能生成保存到 reports/ 目录的 Markdown 分析报告:
breadth_200ma_analysis_[YYYY-MM-DD].mduptrend_ratio_analysis_[YYYY-MM-DD].mdbreadth_combined_analysis_[YYYY-MM-DD].md报告包括执行摘要、当前读数、信号识别、带概率的情景分析,以及针对不同交易者类型的可操作持仓建议。
用途:中至长期战略市场定位
关键要素:
回测策略:
用途:短期战术择时和波段交易
关键要素:
波段交易策略:
关键:CSV 数据是所有广度值的主要来源。此步骤必须在任何图像分析之前执行。
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py
为何 CSV 是主要来源:
数据来源:
tradermonty.github.io/market-breadth-analysis/market_breadth_data.csv
tradermonty/uptrend-dashboard/data/uptrend_ratio_timeseries.csv
tradermonty/uptrend-dashboard/data/sector_summary.csv
数据源优先级:
| 优先级 | 来源 | 用于 | 可靠性 |
|---|---|---|---|
| 1(主要) | CSV 数据 | 所有数值,死叉状态,颜色 | 高 |
| 2(补充) | 图表图像 | 视觉趋势上下文,模式确认 | 中 |
| 3(已弃用) | 不可靠 | ||
| 4(最后手段) | 低 |
预期输出:
============================================================
Breadth Data (CSV) - 2026-02-13
============================================================
--- Market Breadth (S&P 500) ---
200-Day MA: 62.26% (healthy (>=60%))
8-Day MA: 67.56% (healthy_bullish (60-73%))
8MA vs 200MA: +5.30pt (8MA ABOVE -- NO dead cross)
Trend: UPTREND
--- Uptrend Ratio (All Markets) ---
Current: 33.03% GREEN (neutral_bullish)
10MA: 32.65%, Slope: +0.0055, Trend: UP
--- Sector Summary ---
...
============================================================
验证:运行 CSV 获取后,验证:
当用户提供广度图表图像进行分析时:
如果未提供图表图像:跳过步骤1、1.5和基于图像的分析。使用步骤0的 CSV 数据作为唯一数据源,并直接进入分析和报告生成步骤。
语言说明:所有后续的思考、分析和输出都将使用英文。
关键:使用两阶段分析方法,防止将历史数据误读为当前值。
首先,分析完整的图表图像以理解:
然后,提取并分析图表的最右侧25%,以准确确定当前值。
执行 Python 脚本以提取右侧边缘:
python3 skills/breadth-chart-analyst/scripts/extract_chart_right_edge.py <image_path> --percent 25
| 阶段 | 目的 | 提取内容 |
|---|---|---|
| 阶段1(全图) | 历史上下文,趋势周期 | 整体模式,过去的谷值/峰值 |
| 阶段2(右侧边缘) | 当前值(关键) | 8日均线值,200日均线值,当前颜色,当前斜率 |
此方法防止的常见错误:
在开始分析之前,阅读全面的广度图表方法论:
Read: references/breadth_chart_methodology.md
此参考包含以下详细指导:
为了解图表格式和视觉元素,请查看此技能中包含的示例图表:
View: skills/breadth-chart-analyst/assets/SP500_Breadth_Index_200MA_8MA.jpeg
View: skills/breadth-chart-analyst/assets/US_Stock_Market_Uptrend_Ratio.jpeg
这些示例展示了:
如果提供了图表1,进行系统性分析:
从图表图像中识别:
此步骤是必需的,以避免误读近期趋势变化。
关键警告:图表可能具有欺骗性。大多数分析错误发生是因为分析师:
在分析趋势方向之前,首先确认线条颜色:
集中精力关注图表的最右侧3-5个数据点(最近几周):
对于8日均线(橙色线)- 分析最新的轨迹:
需要回答的关键问题:
对于200日均线(绿色线)- 分析最新的轨迹:
失败反转检测(关键):如果最近识别出8日均线谷值(紫色▼):
示例分析格式:
Latest 8MA Data Points (rightmost to left):
- Current (Week 0): 48%
- 1 week ago: 52%
- 2 weeks ago: 55%
- 3 weeks ago: 50%
Analysis: 8MA is FALLING. It rose from 50% to 55% (weeks 3-2), but has since declined to 48%.
This shows a failed reversal pattern - bounce was temporary, downtrend has resumed.
SLOPE: Falling (not rising!)
必需交叉检查(以发现误读):确定趋势后,问自己:
寻找并记录:
基于读数和模式,将当前市场分类为:
用图表中的具体证据支持分类。
应用回测策略规则,并严格要求确认:
检查买入信号(所有标准必须满足):
买入信号状态:
检查卖出信号:
当前持仓确定:
创建2-3个带有概率估计的情景:
如果提供了图表2,进行系统性分析:
注意(问题 #7):此 OpenCV 检测步骤已弃用。使用步骤0的 CSV 数据作为主要来源。OpenCV 脚本可仅用于补充验证,但 CSV 值在所有情况下均优先。
python3 skills/breadth-chart-analyst/scripts/detect_uptrend_ratio.py <image_path> [--debug]
从图表图像中识别:
寻找并记录:
基于当前比率和颜色,分类为:
用图表中的具体证据支持分类。
应用波段交易策略规则:
检查做多入场信号:
检查做多出场信号:
当前持仓:做多、空仓、准备入场或准备出场
创建2-3个带有概率估计的情景:
如果两个图表都提供,整合战略和战术视角:
创建定位矩阵:
确定以下四种情景中哪一种适用:
情景1:两者皆看涨
情景2:战略看涨,战术看跌
情景3:战略看跌,战术看涨
情景4:两者皆看跌
为以下对象提供综合持仓指导:
解决图表之间的任何冲突并解释解决方案。
使用模板结构创建全面的 Markdown 报告:
Read and use as template: skills/breadth-chart-analyst/assets/breadth_analysis_template.md
重要:所有分析和输出必须使用英文。
报告结构根据分析的图表而有所不同:
如果仅图表1:
如果仅图表2:
如果两个图表:
文件命名约定:将每次分析保存为:
breadth_200ma_analysis_[YYYY-MM-DD].mduptrend_ratio_analysis_[YYYY-MM-DD].mdbreadth_combined_analysis_[YYYY-MM-DD].md在最终确定报告之前,验证:
最终合理性检查:
症状:报告声称8日均线在上升,而实际上是200日均线在上升
预防:
症状:报告描述1-2个月前发生的情况,而非现在正在发生的情况
预防:
症状:当8日均线和200日均线即将死叉(看跌)时,报告却看涨
预防:
症状:当图表显示粉色下跌趋势背景时,报告却声称看涨设置
预防:
症状:仅上升1周后,报告就说“买入信号已确认”
预防:
User: "breadth分析して" (Analyze breadth)
[No chart images provided]
Breadth Analyst:
1. Executes fetch_breadth_csv.py to get latest CSV data
2. Reads breadth_chart_methodology.md
3. Analyzes CSV data:
- 200MA: 62.26% (healthy)
- 8MA: 67.56% (healthy_bullish)
- 8MA vs 200MA: +5.30pt (NO dead cross)
- Uptrend Ratio: 33.03% GREEN (neutral_bullish)
- Sector summary with overbought/oversold sectors
4. Assesses market regime based on CSV values
5. Generates report: breadth_combined_analysis_2026-03-16.md
User: "Please analyze this S&P 500 breadth chart and tell me where we are in the market cycle."
[Provides Chart 1 image: 200MA Breadth Index]
Breadth Analyst (thinking in English):
1. Executes CSV fetch for authoritative numerical values
2. Confirms receipt of Chart 1 (200MA-based breadth index)
3. Reads breadth_chart_methodology.md for Chart 1 guidance
4. Two-stage analysis: full chart → right edge extraction
5. Cross-checks CSV values with chart readings
6. Generates comprehensive report in English
User: "Analyze both of these breadth charts and give me your overall market view."
[Provides both Chart 1 and Chart 2 images]
Breadth Analyst (thinking in English):
1. Executes CSV fetch as PRIMARY source
2. Confirms receipt of both charts
3. Reads full breadth_chart_methodology.md
4. Two-stage analysis for each chart
5. Cross-checks all values against CSV data
6. Combined assessment and unified recommendation
7. Generates comprehensive combined report
此技能包含以下捆绑资源:
全面的方法论,涵盖:
用法:在进行任何广度图表分析之前阅读此文件,以确保系统、准确的解读。
用于英文广度分析报告的结构化模板。
用法:为每个分析报告使用此模板结构。
用于格式参考的图表1示例图像。
用于格式参考的图表2示例图像。
主要数据源。从公共 CSV 来源获取市场广度、上涨比率和板块摘要数据。仅使用标准库(urllib + csv)-- 无外部依赖。
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py # Human-readable
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py --json # JSON output
提取图表图像的右侧部分,以帮助聚焦于最新数据点。需要 PIL/Pillow。
python3 skills/breadth-chart-analyst/scripts/extract_chart_right_edge.py <image_path> --percent 25
基于 OpenCV 的上涨比率检测。已由 CSV 获取取代。需要 opencv-python + numpy。
基于 OpenCV 的广度值检测。已由 CSV 获取取代。需要 opencv-python + numpy。
关键:所有分析、思考和输出必须使用英文。这包括:
请勿翻译或使用任何其他语言。用户期望完全使用英文输出。
此技能强调回测、系统性策略,而非主观解读。始终:
目标是可操作的情报。每次分析都应回答:
每周安装次数
159
代码仓库
GitHub 星标数
398
首次出现
2026年1月26日
安全审计
安装于
gemini-cli149
opencode148
cursor148
codex147
github-copilot144
amp142
This skill enables specialized analysis of two complementary market breadth charts that provide strategic (medium to long-term) and tactical (short-term) market perspectives. Analyze breadth chart images to assess market health, identify trading signals based on backtested strategies, and develop positioning recommendations. All thinking and output are conducted exclusively in English.
Use this skill when:
Do NOT use this skill when:
us-stock-analysis skill instead)sector-analyst skill instead)market-news-analyst skill instead)This skill generates markdown analysis reports saved to the reports/ directory:
breadth_200ma_analysis_[YYYY-MM-DD].mduptrend_ratio_analysis_[YYYY-MM-DD].mdbreadth_combined_analysis_[YYYY-MM-DD].mdReports include executive summaries, current readings, signal identification, scenario analysis with probabilities, and actionable positioning recommendations for different trader types.
Purpose : Medium to long-term strategic market positioning
Key Elements :
Backtested Strategy :
Purpose : Short-term tactical timing and swing trading
Key Elements :
Swing Trading Strategy :
CRITICAL : CSV data is the PRIMARY source for all Breadth values. This step MUST be executed BEFORE any image analysis.
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py
Why CSV is PRIMARY :
Data Sources :
tradermonty.github.io/market-breadth-analysis/market_breadth_data.csv
tradermonty/uptrend-dashboard/data/uptrend_ratio_timeseries.csv
tradermonty/uptrend-dashboard/data/sector_summary.csv
Data Source Priority :
| Priority | Source | Use For | Reliability |
|---|---|---|---|
| 1 (PRIMARY) | CSV Data | All numerical values, dead cross status, color | HIGH |
| 2 (SUPPLEMENTARY) | Chart Image | Visual trend context, pattern confirmation | MEDIUM |
| 3 (DEPRECATED) | UNRELIABLE | ||
| 4 (LAST RESORT) | LOW |
Expected Output :
============================================================
Breadth Data (CSV) - 2026-02-13
============================================================
--- Market Breadth (S&P 500) ---
200-Day MA: 62.26% (healthy (>=60%))
8-Day MA: 67.56% (healthy_bullish (60-73%))
8MA vs 200MA: +5.30pt (8MA ABOVE -- NO dead cross)
Trend: UPTREND
--- Uptrend Ratio (All Markets) ---
Current: 33.03% GREEN (neutral_bullish)
10MA: 32.65%, Slope: +0.0055, Trend: UP
--- Sector Summary ---
...
============================================================
Validation : After running CSV fetch, verify:
When the user provides breadth chart images for analysis:
If NO chart images are provided : Skip Steps 1, 1.5, and image-based analysis. Use CSV data from Step 0 as the sole data source and proceed directly to the analysis and report generation steps.
Language Note : All subsequent thinking, analysis, and output will be in English.
CRITICAL : Use a two-stage analysis approach to prevent misreading historical data as current values.
First, analyze the FULL chart image to understand:
Then, extract and analyze the rightmost 25% of the chart to accurately determine CURRENT values.
Execute the Python script to extract the right edge:
python3 skills/breadth-chart-analyst/scripts/extract_chart_right_edge.py <image_path> --percent 25
| Stage | Purpose | What to Extract |
|---|---|---|
| Stage 1 (Full) | Historical context, trend cycles | Overall patterns, past troughs/peaks |
| Stage 2 (Right Edge) | Current values (CRITICAL) | 8MA value, 200MA value, current color, current slope |
Common Error This Prevents:
Before beginning analysis, read the comprehensive breadth chart methodology:
Read: references/breadth_chart_methodology.md
This reference contains detailed guidance on:
To understand the chart format and visual elements, review the sample charts included in this skill:
View: skills/breadth-chart-analyst/assets/SP500_Breadth_Index_200MA_8MA.jpeg
View: skills/breadth-chart-analyst/assets/US_Stock_Market_Uptrend_Ratio.jpeg
These samples demonstrate:
If Chart 1 is provided, conduct systematic analysis:
From the chart image, identify:
This step is MANDATORY to avoid misreading recent trend changes.
CRITICAL WARNING : Charts can be deceptive. The MAJORITY of analysis errors occur because the analyst:
BEFORE analyzing trend direction, FIRST confirm line colors :
Focus intensively on the rightmost 3-5 data points of the chart (most recent weeks):
For 8MA (Orange Line) - Analyze the very latest trajectory :
Critical Questions to Answer :
For 200MA (Green Line) - Analyze the very latest trajectory :
Failed Reversal Detection (CRITICAL): If an 8MA trough (purple ▼) was recently identified:
Example Analysis Format :
Latest 8MA Data Points (rightmost to left):
- Current (Week 0): 48%
- 1 week ago: 52%
- 2 weeks ago: 55%
- 3 weeks ago: 50%
Analysis: 8MA is FALLING. It rose from 50% to 55% (weeks 3-2), but has since declined to 48%.
This shows a failed reversal pattern - bounce was temporary, downtrend has resumed.
SLOPE: Falling (not rising!)
MANDATORY CROSS-CHECK (to catch misreadings): After determining the trend, ask yourself:
Look for and document:
Based on readings and patterns, classify the current market as:
Support the classification with specific evidence from the chart.
Apply the backtested strategy rules with STRICT confirmation requirements:
Check for BUY signal (ALL criteria must be met):
BUY Signal Status :
Check for SELL signal :
Current position determination :
Create 2-3 scenarios with probability estimates:
If Chart 2 is provided, conduct systematic analysis:
NOTE (Issue #7) : This OpenCV detection step is DEPRECATED. Use CSV data from Step 0 as the PRIMARY source. The OpenCV script may be run for supplementary validation only, but CSV values take precedence in all cases.
python3 skills/breadth-chart-analyst/scripts/detect_uptrend_ratio.py <image_path> [--debug]
From the chart image, identify:
Look for and document:
Based on current ratio and color, classify as:
Support the classification with specific evidence from the chart.
Apply the swing trading strategy rules:
Check for ENTER LONG signal :
Check for EXIT LONG signal :
Current position : Long, Flat, Preparing to Enter, or Preparing to Exit
Create 2-3 scenarios with probability estimates:
If both charts are provided, integrate the strategic and tactical perspectives:
Create a positioning matrix:
Determine which of the four scenarios applies:
Scenario 1: Both Bullish
Scenario 2: Strategic Bullish, Tactical Bearish
Scenario 3: Strategic Bearish, Tactical Bullish
Scenario 4: Both Bearish
Provide integrated positioning guidance for:
Address any conflicts between charts and explain resolution.
Create a comprehensive markdown report using the template structure:
Read and use as template: skills/breadth-chart-analyst/assets/breadth_analysis_template.md
IMPORTANT : All analysis and output must be in English.
The report structure varies based on which chart(s) are analyzed:
If Chart 1 only :
If Chart 2 only :
If Both Charts :
File Naming Convention : Save each analysis as:
breadth_200ma_analysis_[YYYY-MM-DD].mduptrend_ratio_analysis_[YYYY-MM-DD].mdbreadth_combined_analysis_[YYYY-MM-DD].mdBefore finalizing the report, verify:
FINAL SANITY CHECK :
Symptom : Report claims 8MA is rising when it's actually the 200MA that's rising
Prevention :
Symptom : Report describes what happened 1-2 months ago, not what's happening NOW
Prevention :
Symptom : Report is bullish when 8MA and 200MA are about to death cross (bearish)
Prevention :
Symptom : Report claims bullish setup when chart shows pink downtrend background
Prevention :
Symptom : Report says "BUY signal confirmed" after only 1 week of increase
Prevention :
User: "breadth分析して" (Analyze breadth)
[No chart images provided]
Breadth Analyst:
1. Executes fetch_breadth_csv.py to get latest CSV data
2. Reads breadth_chart_methodology.md
3. Analyzes CSV data:
- 200MA: 62.26% (healthy)
- 8MA: 67.56% (healthy_bullish)
- 8MA vs 200MA: +5.30pt (NO dead cross)
- Uptrend Ratio: 33.03% GREEN (neutral_bullish)
- Sector summary with overbought/oversold sectors
4. Assesses market regime based on CSV values
5. Generates report: breadth_combined_analysis_2026-03-16.md
User: "Please analyze this S&P 500 breadth chart and tell me where we are in the market cycle."
[Provides Chart 1 image: 200MA Breadth Index]
Breadth Analyst (thinking in English):
1. Executes CSV fetch for authoritative numerical values
2. Confirms receipt of Chart 1 (200MA-based breadth index)
3. Reads breadth_chart_methodology.md for Chart 1 guidance
4. Two-stage analysis: full chart → right edge extraction
5. Cross-checks CSV values with chart readings
6. Generates comprehensive report in English
User: "Analyze both of these breadth charts and give me your overall market view."
[Provides both Chart 1 and Chart 2 images]
Breadth Analyst (thinking in English):
1. Executes CSV fetch as PRIMARY source
2. Confirms receipt of both charts
3. Reads full breadth_chart_methodology.md
4. Two-stage analysis for each chart
5. Cross-checks all values against CSV data
6. Combined assessment and unified recommendation
7. Generates comprehensive combined report
This skill includes the following bundled resources:
Comprehensive methodology covering:
Usage : Read this file before conducting any breadth chart analysis to ensure systematic, accurate interpretation.
Structured template for breadth analysis reports in English.
Usage : Use this template structure for every analysis report.
Sample Chart 1 image for format reference.
Sample Chart 2 image for format reference.
PRIMARY data source. Fetches market breadth, uptrend ratio, and sector summary data from public CSV sources. Uses only stdlib (urllib + csv) -- no external dependencies.
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py # Human-readable
python3 skills/breadth-chart-analyst/scripts/fetch_breadth_csv.py --json # JSON output
Extracts the rightmost portion of chart images to help focus on latest data points. Requires PIL/Pillow.
python3 skills/breadth-chart-analyst/scripts/extract_chart_right_edge.py <image_path> --percent 25
OpenCV-based uptrend ratio detection. Superseded by CSV fetch. Requires opencv-python + numpy.
OpenCV-based breadth value detection. Superseded by CSV fetch. Requires opencv-python + numpy.
CRITICAL : All analysis, thinking, and output MUST be in English. This includes:
Do not translate or use any other language. The user expects English output exclusively.
This skill emphasizes backtested, systematic strategies rather than discretionary interpretation. Always:
The goal is actionable intelligence. Every analysis should answer:
Weekly Installs
159
Repository
GitHub Stars
398
First Seen
Jan 26, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli149
opencode148
cursor148
codex147
github-copilot144
amp142
Python PDF处理教程:合并拆分、提取文本表格、创建PDF文件
61,100 周安装
stop-slop:AI写作优化工具 - 消除陈词滥调,提升文本真实性与可读性
686 周安装
智能外联草拟工具:基于调研的个性化邮件与LinkedIn消息生成器 | 销售与营销自动化
703 周安装
数据库性能审计工具 - 协调4大审计工作器,优化持久化与运行时性能
141 周安装
AI代码安全审计工具 - 检测vibe-coding应用漏洞,防止数据泄露与API密钥被盗
719 周安装
Top-Design 世界级数字设计技能:掌握Awwwards获奖设计标准与评分体系
760 周安装
Office转Markdown工具:Word/Excel/PPT/PDF一键转换,支持AI增强处理
757 周安装