🚀 Major Features
-
Split attachment-analyzer into 3 specialized commands/skills
analyze-email: Quick single email overviewanalyze-thread: Full conversation analysis with truncation handlinganalyze-attachments: Deep file extraction with 3 modes (Quick/Interactive/Auto)
-
Smart quote stripping reduces thread token usage by ~80%
- Preserves first 10 lines of each quote block for context
- Removes redundant quoted content automatically
-
Configurable truncation limits
- Thread emails: 1200 chars (configurable via
MAIL_THREAD_MAX_BODY_LENGTH) - Single emails: 10000 chars (configurable via
MAIL_SINGLE_MAX_BODY_LENGTH) - Automatic truncation detection and classification
- Thread emails: 1200 chars (configurable via
-
Enhanced attachment analysis
- Importance classification (High/Medium/Low)
- Three analysis modes for different use cases
- Auto-cleanup of temporary files
📦 New Components
Skills
plugins/mail-attachment-analyzer/skills/analyze-email/SKILL.mdplugins/mail-attachment-analyzer/skills/analyze-thread/SKILL.mdplugins/mail-attachment-analyzer/skills/analyze-attachments/SKILL.md
Commands
plugins/mail-attachment-analyzer/commands/analyze-email.mdplugins/mail-attachment-analyzer/commands/analyze-thread.mdplugins/mail-attachment-analyzer/commands/analyze-attachments.md
Core Code
src/quote_stripper.py: Intelligent quote detection and removal (249 lines)
⚙️ Environment Variables
{
"MAIL_THREAD_MAX_BODY_LENGTH": "1200", // Thread email limit
"MAIL_SINGLE_MAX_BODY_LENGTH": "10000", // Single email limit
"MAIL_KEEP_QUOTE_LINES": "10", // Quote context preservation
"MAIL_ATTACHMENT_PATH": "/tmp" // Extraction directory
}📚 Documentation
- Comprehensive usage examples with 3 invocation methods
- Truncation handling guides for large threads
- Keyboard shortcut integration (⌘⇧C via Automator)
- Thread-specific email selection instructions
- Behavior differences between Slash Commands and Extension Skills
🐛 Performance
- 37-email thread: 365KB → 60KB (83.6% reduction)
- Automatic truncation detection: Classifies by importance (Critical/High/Medium)
- Smart attachment levels: High (gov/legal/finance), Medium (docs), Low (images)
🎯 User Experience
Three Invocation Methods
- Natural Language: Direct prompts like "Analyze this email "
- Slash Commands:
/analyze-email,/analyze-thread,/analyze-attachments - Extension Skills: Auto-triggered with context memory
UX Improvements
- Automator Quick Action support (⌘⇧C shortcut)
- Thread email selection via "Show → Expand All Conversations"
- Auto-cleanup prevents disk space issues
- Context-aware mode selection (Quick/Interactive/Auto)
📊 Architecture Changes
Before: Single attachment-analyzer (388 lines)
After: 3 specialized skills + commands (~900 lines total)
- Better separation of concerns
- More focused functionality
- Easier to maintain and extend
🔧 Migration Notes
- No breaking changes to MCP tools
- Old
attachment-analyzerskill removed - New skills automatically installed with Claude Code plugin
- Environment variables are optional (sensible defaults provided)
📝 Files Changed
- 14 files changed, 1621 insertions(+), 613 deletions(-)
- 3 new skills, 3 new commands
- 1 new core module (
quote_stripper.py) - Updated documentation (README_zh.md, TOOLS.md)
- Environment variables synced to
mcp.json
🔒 Privacy
Updated example scenarios to use fictional data instead of real information
Full changelog: v1.2.0...v1.3.0