analyze-thread

Analyze complete email thread with conversation context, timeline, participants, and attachments tracking.

16 stars

Best use case

analyze-thread is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Analyze complete email thread with conversation context, timeline, participants, and attachments tracking.

Teams using analyze-thread should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/analyze-thread/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/business/analyze-thread/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/analyze-thread/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How analyze-thread Compares

Feature / Agentanalyze-threadStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze complete email thread with conversation context, timeline, participants, and attachments tracking.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Analyze Email Thread

Comprehensive analysis of an email thread including conversation flow, participant interactions, timeline, key points, and attachment evolution.

## When to Use

Use this skill when you need to:
- Understand complete conversation context
- Track discussion progression over time
- Identify key decisions and action items
- See how attachments evolved through the thread
- Get overview of multi-email conversations

**Triggers**:

English:
- "Analyze this email thread `<message-id>`"
- "Show me the conversation `<message-id>`"
- "What's the thread about `<message-id>`"
- "Thread analysis for `<message-id>`"
- "Summarize this thread `<message-id>`"

Chinese:
- "分析这个邮件线索 `<message-id>`"
- "看看这个对话 `<message-id>`"
- "整理一下这个线索 `<message-id>`"
- "线索内容总结 `<message-id>`"
- "这个讨论的脉络 `<message-id>`"

## Invocation Methods

### Method 1: Natural Language (Recommended)

```bash
User: Analyze this email thread <E42FF77C-C563-466D-8544-3E0C16EA24EC@taler.net>
AI: [Proceeds to analyze immediately]
```

### Method 2: Slash Command

```bash
User: /analyze-thread
AI: 请提供线索中任意一封邮件的 Message-ID
User: <E42FF77C-C563-466D-8544-3E0C16EA24EC@taler.net>
AI: [Proceeds to analyze]
```

> **Note**: Any message-id from the thread works. The system will find all related emails.

## Execution Steps

1. **Get message-id** (if not provided)
   ```bash
   Please provide any Message-ID from the thread

   💡 Quick method (recommended):
   In Mail.app: Select email → Press shortcut (⌘⇧C) → Message-ID copied
   See README "Setup Mail Quick Action" section if not configured
   ```

2. **Read thread using MCP**
   ```python
   thread_data = mcp__mail__read_thread(message_id)
   ```

3. **Handle truncation checks**

   **Check 1: Thread Result Oversized**
   - If result indicates size overflow (>80KB):
     - Warn user about thread size
     - Suggest reducing max_body_length
     - Ask if user wants to retry with tighter limits

   **Check 2: Individual Email Truncation**
   - After successful load, check for truncated emails
   - Classify by importance:
     - ⚠️ Critical: Truncated + has attachments
     - ⚠️ High: Lost 60%+ content
     - ℹ️ Medium: Only quote-stripped
   - Suggest reading important emails individually if needed

4. **Analyze thread structure**
   - Count total emails
   - Identify all participants
   - Extract date range
   - Track subject evolution

5. **Extract key information**
   - Main discussion topics
   - Decisions made
   - Action items with owners
   - Attachments and their evolution
   - Important dates/deadlines

6. **Present structured output**

## Output Format

```markdown
🧵 Email Thread Analysis

### Thread Overview
- Total emails: [N]
- Time span: [start date] to [end date]
- Duration: [X days/weeks/months]
- Participants: [list of unique senders]

### Conversation Timeline
[Chronological summary of key emails]

1. [Date] - [Sender] - [Brief description]
2. [Date] - [Sender] - [Brief description]
...

### 💬 Main Topics
1. [Topic 1]
   - [Brief summary]
2. [Topic 2]
   - [Brief summary]

### ✅ Decisions Made
- [Decision 1]
- [Decision 2]

### ⚠️ Action Items
- [ ] [Action item] - [Owner] - [Deadline if any]

### 📎 Attachments Summary
[Total] attachments across thread:
- [filename] - [context/importance]
- [filename] - [context/importance]

### 📅 Important Dates
- [Date]: [Event/Deadline]

### ⚠️ Truncation Notice
[If applicable, warn about truncated emails]
```

## Thread Content Truncation Handling ⚠️

**CRITICAL**: Thread reading has smart limits to prevent token overflow (1200 chars/email with quote stripping).

### Check 1: Thread Result Oversized

If thread is too large:

```markdown
⚠️ **Thread Too Large** (estimated XXX KB)

This email thread is too large to load with current settings.

**Options:**
1. 🔄 **[Recommended]** Reduce limit and retry
   - Current: 1200 chars/email
   - Suggested: 800 chars/email

2. 📧 **Read individual emails**
   - Use /analyze-email for specific messages

**Shall I automatically reduce the limit and retry?**
```

**Implementation**:
- NEVER try to process oversized results
- ALWAYS ask user first before retrying

### Check 2: Individual Email Truncation

After loading, check for truncated emails:

```python
truncated_emails = []
for email in thread['emails']:
    if email.get('truncated'):
        importance = assess_truncation_importance(email)
        if importance in ['Critical', 'High']:
            truncated_emails.append({
                'message_id': email['message_id'],
                'subject': email['subject'],
                'original_length': email.get('original_length'),
                'importance': importance
            })
```

**User Prompt** (only if critical/high truncations found):

```markdown
⚠️ **Detected Truncated Emails**

[Number] emails were truncated. Important ones:

1. [Subject] ([Importance])
   - Original: [X] chars → Current: 1200 chars
   - Has attachments: Yes/No

**Recommendation**: Read important emails individually using /analyze-email
```

## Example Scenarios

### Scenario 1: Technical Discussion Thread

User: /analyze-thread
AI: 请提供线索中任意一封邮件的 Message-ID
User: <E42FF77C-C563-466D-8544-3E0C16EA24EC@taler.net>
AI:
🧵 Email Thread Analysis

### Thread Overview
- Total emails: 37
- Time span: Jul 2, 2025 to Dec 10, 2025
- Duration: ~5 months
- Participants:
  - Marc Stibane (marc@taler.net) - GNU Taler developer
  - Yang Xu (fatbobman@gmail.com) - SwiftUI consultant

### Conversation Timeline

**Phase 1: Problem Identification (Jul 2-3)**
- Marc asks about SwiftUI Text layout sizing issue
- Yang explains SwiftUI layout behavior
- Marc provides screenshots and code examples

**Phase 2: Solution Development (Jul 3-4)**
- Yang implements TruncationDetectingText component
- Solution tested and working
- Marc extends to support two text components

**Phase 3: Business Completion (Jul 4-8)**
- MIT license agreed
- Payment: 150€ via Wise
- Invoice provided

**Phase 4: Bug Discovery (Jul 8 - Dec 10)**
- Layout flickering issue on iPhone XS (iOS 17)
- Multiple debugging attempts
- Issue still under investigation

### 💬 Main Topics
1. **SwiftUI Layout Problem**
   - Text component not returning correct size with lineLimit
   - Need for adaptive layout selection

2. **Solution Implementation**
   - TruncationDetectingText component
   - PreferenceKey-based truncation detection
   - ZStack + LayoutPriority approach

3. **Ongoing Issue**
   - Layout flickering on specific devices
   - Related to text width and timing

### ✅ Decisions Made
- Use MIT license for the solution code
- Payment amount: 150€
- Payment method: Wise transfer

### ⚠️ Action Items
- [ ] Resolve layout flickering on iPhone XS (Marc)
- [ ] Consider writing blog post about solution (Yang)

### 📎 Attachments Summary
9 attachments across thread:
- **AdaptiveAmountRow.swift** - Final solution code
- **TruncationDetectingText.swift** - Core component
- **Invoice - SwiftUI Consultation.pdf** - Paid invoice
- Various screenshots showing flickering issue

### 💡 Key Insights
- Solution works well for main use case
- Edge case issue on specific hardware/iOS version
- Successful commercial collaboration

### Scenario 2: Short Thread (No Truncation)

User: Analyze this thread <short@example.com>
AI:
🧵 Email Thread Analysis

### Thread Overview
- Total emails: 3
- Time span: Jan 10, 2025
- Duration: 1 day
- Participants: Alice, Bob

### Conversation Timeline
1. Alice asks about project timeline
2. Bob provides estimate
3. Alice confirms and schedules meeting

### ⚠️ Action Items
- [ ] Meeting on Jan 15 at 2 PM

### 📎 Attachments Summary
1 attachment: project_timeline.pdf

## Related Skills

- `/analyze-email` - For single email analysis
- `/analyze-attachments` - For deep attachment analysis

## Technical Notes

**Quote Stripping**: Thread reading automatically removes redundant quoted content while preserving context (first 10 lines of each quote block). This reduces token usage by ~80%.

**Token Safety**: Default 1200 chars/email limit ensures threads of up to ~50 emails can be analyzed safely within Claude Code's token limits.

Related Skills

pdf-analyzer

16
from diegosouzapw/awesome-omni-skill

Analyze PDF, DOCX, and spreadsheet documents using vision models. Converts documents to images and extracts insights with layout preservation. Uses VT Code's native document processor (no container skills required).

excel-field-analyzer

16
from diegosouzapw/awesome-omni-skill

分析Excel/CSV字段结构,AI自动生成中英文映射,验证翻译质量,输出统计报告。用于电子表格分析、数据字典创建、字段映射场景。

analyze-us-bank-credit-deposit-decoupling

16
from diegosouzapw/awesome-omni-skill

分析銀行貸款與存款之間的「信貸創造脫鉤」現象,追蹤存款的絕對收縮與回升軌跡,用以辨識聯準會緊縮政策在銀行體系內部的真實傳導效果。

analyze-silver-miner-metal-ratio

16
from diegosouzapw/awesome-omni-skill

以「銀礦股價格 ÷ 白銀價格」的相對比率衡量礦業股板塊相對於金屬本體的估值區間(偏貴/偏便宜),並用歷史分位數與類比區間推導「底部/頂部」訊號與情境推演。

analyze-jgb-insurer-superlong-flow

16
from diegosouzapw/awesome-omni-skill

從日本保險公司對超長期(10年以上)JGB 的淨買賣時間序列,自動產出「本月是否創紀錄淨賣出、連續淨賣出月數、期間累積淨賣出」等結論。

analyze-japan-debt-service-tax-burden

16
from diegosouzapw/awesome-omni-skill

以日本公債殖利率變化為觸發,量化「政府利息支出 / 稅收」負擔(含情境壓力測試),並判斷是否進入債務利息螺旋風險區。

analyze-investment-clock-rotation

16
from diegosouzapw/awesome-omni-skill

把「獲利成長 × 財務狀況(金融環境)」映射成「投資時鐘」,判斷目前落在哪個象限、近期是順時針還是逆時針旋轉、以及相對於上一輪循環的位置差異。

analyze-copper-supply-concentration-risk

16
from diegosouzapw/awesome-omni-skill

用公開資料量化「銅供應是否過度集中、主要產地是否結構性衰退、替代增量是否依賴少數國家」,並輸出可行的中期供應風險結論與情境推演。

analyze-copper-stock-resilience-dependency

16
from diegosouzapw/awesome-omni-skill

用跨資產訊號(全球股市韌性 + 中國利率環境)評估銅價能否突破關卡或進入「回補/回踩」到支撐的機率與路徑。

analyze-agent-overlap

16
from diegosouzapw/awesome-omni-skill

Analyzes existing agents, skills, prompts, and instructions to identify overlaps, redundancies, and conflicts. Works with GitHub Copilot, Claude Code, Codex, OpenCode, and other providers. Use before creating new customization files to avoid duplication, when consolidating agents, or when troubleshooting conflicting behaviors.

ab-testing-analyzer

16
from diegosouzapw/awesome-omni-skill

全面的AB测试分析工具,支持实验设计、统计检验、用户分群分析和可视化报告生成。用于分析产品改版、营销活动、功能优化等AB测试结果,提供统计显著性检验和深度洞察。

32-analyze-verify-150

16
from diegosouzapw/awesome-omni-skill

[32] ANALYZE. Ensure every critical claim has verifiable evidence with confidence levels. Each fact must have source + confidence percentage. If confidence <85%, enter Loop150 to find more sources. Use for critical decisions, factual claims, legal/compliance work, or any situation where unverified claims are dangerous.