Skip to content

v1.3.0: Plugin Architecture Refactor & Smart Thread Optimization

Latest

Choose a tag to compare

@fatbobman fatbobman released this 30 Dec 04:40
· 1 commit to master since this release

🚀 Major Features

  • Split attachment-analyzer into 3 specialized commands/skills

    • analyze-email: Quick single email overview
    • analyze-thread: Full conversation analysis with truncation handling
    • analyze-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
  • 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.md
  • plugins/mail-attachment-analyzer/skills/analyze-thread/SKILL.md
  • plugins/mail-attachment-analyzer/skills/analyze-attachments/SKILL.md

Commands

  • plugins/mail-attachment-analyzer/commands/analyze-email.md
  • plugins/mail-attachment-analyzer/commands/analyze-thread.md
  • plugins/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

  1. Natural Language: Direct prompts like "Analyze this email "
  2. Slash Commands: /analyze-email, /analyze-thread, /analyze-attachments
  3. 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-analyzer skill 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