Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:45:47 +08:00
commit 857aa79f37
12 changed files with 2705 additions and 0 deletions

View File

@@ -0,0 +1,338 @@
# Workflow Pattern Analyzer
A web-compatible Custom Skill that brings export-quality conversation analysis to Claude's web interface. Analyzes recent conversation history using native chat tools to identify recurring patterns and generate evidence-based Custom Skills recommendations.
## Why This Skill?
**The Bridge Between Two Worlds:**
- **Export-based plugin** (`/analyze-skills`): Comprehensive but requires Claude Code + JSON exports
- **skill-idea-generator**: Web-friendly but lacks statistical rigor
- **workflow-pattern-analyzer**: Best of both - rigorous analysis accessible anywhere
## Key Features
### 🌐 Web Interface Compatible
- No conversation exports required
- Uses `recent_chats` and `conversation_search` tools
- Works in Claude.ai web interface or Claude Code
### 📊 Statistical Rigor
- **5-dimensional scoring framework** (0-10 scale each):
- Frequency analysis
- Consistency evaluation
- Complexity assessment
- Time savings calculation
- Error reduction potential
- **Composite scoring** (0-50 total) for prioritization
- **Statistical validation** with significance thresholds
### 🎯 Comprehensive Analysis
- Pattern discovery across multiple dimensions (explicit, implicit, domain, temporal)
- Relationship mapping and overlap detection
- Smart consolidation strategies
- Evidence-based recommendations with conversation excerpts
### 📦 Complete Outputs
- Detailed analysis reports with pattern evidence
- Prioritization matrix (frequency vs impact)
- Ready-to-use skill specifications
- Implementation roadmap
## When to Use
**Perfect for:**
- Web interface users who can't run `/analyze-skills`
- Quick pattern identification without export overhead
- Iterative skill discovery (start small, expand as needed)
- Users who want analysis rigor without technical setup
**Use the export plugin instead when:**
- You have Claude/ChatGPT conversation exports available
- You need cross-platform analysis (Claude + ChatGPT)
- You want comprehensive historical analysis (100+ conversations)
- You need incremental processing for large datasets
## Usage Guide
### Quick Start
Simply say:
- "Analyze my conversation patterns"
- "What workflows should I automate?"
- "Find skill opportunities in my recent chats"
- "Identify my most common requests"
### Analysis Depth Options
**1. Quick Scan (20-30 conversations, ~2-3 min)**
```
"Do a quick scan of my recent conversations"
```
Best for: Immediate insights, identifying top 1-2 patterns
**2. Standard Analysis (50-75 conversations, ~5-7 min)**
```
"Analyze my conversation history for patterns"
```
Best for: Comprehensive pattern detection, multiple skill opportunities
**3. Deep Dive (100+ conversations, ~10-15 min)**
```
"Do a comprehensive analysis of my workflows"
```
Best for: Full workflow mapping, temporal trends, strategic insights
**4. Targeted Search (variable)**
```
"Find patterns in my coding conversations"
"Analyze how I use you for writing tasks"
```
Best for: Domain-specific skill discovery
### Understanding the Output
**Score Interpretation:**
- **40-50 (Critical)**: Implement immediately - highest ROI
- **30-39 (High)**: Strong candidates for skill creation
- **20-29 (Medium)**: Consider for automation
- **10-19 (Low)**: Defer or use simple prompt templates
- **0-9 (Not Viable)**: Not worth skill automation
**Prioritization Matrix:**
```
VALUE/IMPACT
HIGH │ Quick Wins Strategic
│ [Immediate ROI] [Critical but complex]
LOW │ Automate Defer
│ [Nice-to-have] [Not worth it]
└─────────────────────────
LOW FREQUENCY HIGH
```
## Example Workflows
### Scenario 1: First-Time User
**User**: "I want to find out what I should automate"
**Skill Output**:
- Quick scan of 30 recent conversations
- Top 3 patterns identified with scores
- Evidence excerpts from actual conversations
- Recommendation for next steps (expand analysis or build skills)
### Scenario 2: Domain-Specific Analysis
**User**: "Find patterns in my coding work"
**Skill Output**:
- Targeted search of coding-related conversations
- Domain-specific patterns (code review, documentation, debugging)
- Frequency and consistency scores for each pattern
- Skill specifications tailored to development workflows
### Scenario 3: Comprehensive Workflow Audit
**User**: "Do a deep analysis of everything I do"
**Skill Output**:
- Analysis of 100+ conversations across 3 months
- Full pattern taxonomy (15+ patterns identified)
- Prioritization matrix with 6-8 skill recommendations
- Implementation roadmap with phased approach
- Complete skill packages ready to deploy
## What Makes This Different?
### vs. skill-idea-generator
| Feature | skill-idea-generator | workflow-pattern-analyzer |
|---------|---------------------|---------------------------|
| **Approach** | Conversational suggestions | Statistical analysis |
| **Scoring** | Qualitative | Quantitative (0-50 scale) |
| **Evidence** | Minimal | Detailed conversation excerpts |
| **Output** | Ideas + sketches | Complete skill packages |
| **Best for** | Inspiration, brainstorming | Evidence-based decisions |
### vs. Export-Based Plugin
| Feature | Export Plugin | workflow-pattern-analyzer |
|---------|---------------|---------------------------|
| **Platform** | Claude Code only | Web + Claude Code |
| **Setup** | Requires JSON exports | Zero setup |
| **Data Scope** | Complete history | Recent accessible history |
| **Cross-platform** | Claude + ChatGPT | Claude only |
| **Analysis Depth** | Comprehensive | Extensive (within tool limits) |
| **Best for** | Historical analysis | Quick insights |
## Quality Standards
**Pattern Validation:**
- Minimum 3 instances OR >5% of conversations
- 70%+ consistency across instances
- 2-3 conversation excerpts as evidence
- >30 min/month cumulative time savings
**Skill Recommendations:**
- Maximum 8-10 skills (focus on ROI)
- Clear differentiation between skills
- Evidence-based design from actual usage
- Practical focus on time/quality impact
**Analysis Rigor:**
- No generic patterns (avoid "writing", "analysis")
- Validated frequencies within sample
- Temporal awareness (emerging/stable/declining)
- User context consideration
## Advanced Usage
### Incremental Analysis
Start with quick scan, expand iteratively:
```
1. Quick scan (30 conversations) → Identify top pattern
2. Generate skill for top pattern → Deploy and test
3. Standard analysis (50-75 conversations) → Find next opportunities
4. Deep dive (100+ conversations) → Complete workflow mapping
```
### Adjusting Scoring Weights
Request custom prioritization:
```
"Analyze my patterns but prioritize time savings over frequency"
"Focus on high-complexity patterns even if they're less frequent"
```
### Domain-Focused Batches
Analyze specific workflow areas:
```
"Analyze my business communication patterns"
"Find patterns in my technical writing"
"What do I repeatedly do for project planning?"
```
## Technical Details
### Data Collection Strategy
- **Broad sampling**: Multiple `recent_chats` calls with varied parameters
- **Temporal distribution**: Sample across different time periods
- **Topic exploration**: `conversation_search` for discovered domains
- **Smart batching**: Balance coverage with efficiency
### Pattern Detection Methods
- **Explicit markers**: Repeated phrases, formatting instructions
- **Implicit workflows**: Multi-turn structures, refinement cycles
- **Domain clustering**: Topic frequency and task type analysis
- **Temporal patterns**: Recurring tasks, event-driven workflows
### Scoring Methodology
Each pattern scored 0-10 across 5 dimensions:
1. **Frequency**: Occurrence rate in conversation sample
2. **Consistency**: Similarity of requirements across instances
3. **Complexity**: Steps, decision points, cognitive load
4. **Time Savings**: Minutes saved per use × frequency
5. **Error Reduction**: Quality improvement potential
Composite score (0-50) determines priority classification.
## Limitations
**Compared to Export-Based Analysis:**
- ❌ Can't analyze ChatGPT conversations
- ❌ Limited to accessible recent history (API constraints)
- ❌ No cross-platform deduplication
- ❌ Can't process 1000+ conversation datasets efficiently
- ❌ No incremental processing log
**Inherent Constraints:**
- Requires 10+ conversations for basic analysis
- Pattern detection accuracy improves with more data
- Very old conversations may not be accessible via tools
- Analysis time scales with conversation depth
## Best Practices
**For Accurate Results:**
1. Run analysis after accumulating 30+ conversations
2. Use targeted searches for specific domains
3. Request deep dive for comprehensive insights
4. Provide feedback on detected patterns (accuracy validation)
**For Skill Generation:**
1. Start with top 3-5 highest-scoring patterns
2. Test generated skills before building more
3. Iterate based on actual usage
4. Re-run analysis monthly as patterns evolve
**For Efficiency:**
1. Use quick scans for regular check-ins
2. Save deep dive for quarterly workflow audits
3. Focus targeted searches on specific pain points
4. Combine analysis with skill building in same session
## Example Output Structure
```markdown
# Workflow Pattern Analysis Report
**Analysis Date**: 2025-01-23
**Conversations Analyzed**: 75 conversations (3 months)
**Patterns Identified**: 12 patterns
**Skills Recommended**: 5 skills
## 🔥 HIGH-PRIORITY OPPORTUNITIES
### 1. Email Response Composer
**Score: 42/50** (Frequency: 9/10, Consistency: 9/10, Complexity: 6/10, Time: 10/10, Error: 8/10)
**Pattern Description**: You regularly draft professional emails with specific tone and structure requirements
**Evidence**:
- Found in 14 conversations (18.7% of sample)
- First seen: Oct 15, Most recent: Jan 20
- Average time per instance: 15 minutes
- Total time savings potential: 210 min/month
**Example Occurrences**:
1. Jan 18: "Draft an email to client about project delay..."
2. Jan 12: "Write a professional response to vendor inquiry..."
3. Jan 5: "Compose email to team about Q1 objectives..."
**Proposed Skill**: Professional email composer with tone control, structure templates, and action item extraction
**Implementation Priority**: Immediate (Highest ROI)
---
[4 more patterns with detailed breakdowns]
## 💡 MODERATE OPPORTUNITIES
[3 patterns, briefer format]
## ⏸️ DEFERRED PATTERNS
[4 patterns that didn't meet thresholds]
## 📊 PRIORITIZATION MATRIX
[Visual classification of patterns]
## 🚀 IMPLEMENTATION ROADMAP
Week 1: Build Email Response Composer + Meeting Notes Structurer
Week 2: Test and refine initial skills
Week 3: Build Code Review Checklist + API Documentation Humanizer
Week 4: Evaluate usage, iterate, consider remaining patterns
```
## Contributing
Found a bug or have suggestions for improving the analysis methodology?
- Open an issue: [GitHub Issues](https://github.com/hirefrank/hirefrank-marketplace/issues)
- Discuss improvements: [GitHub Discussions](https://github.com/hirefrank/hirefrank-marketplace/discussions)
## License
MIT License - see repository root for details
---
**Built to bridge web accessibility with export-quality analysis rigor**

View File

@@ -0,0 +1,322 @@
---
name: workflow-pattern-analyzer
description: Analyzes recent conversation history using chat tools to identify recurring workflow patterns and generate Custom Skills recommendations with statistical rigor. Use when users request workflow analysis, pattern identification, skill generation suggestions, or automation opportunities based on their AI usage patterns without requiring conversation exports.
---
# Workflow Pattern Analyzer
## Instructions
This skill provides comprehensive conversation pattern analysis using Claude's native chat history tools (`recent_chats` and `conversation_search`) to identify skill-worthy automation opportunities with the statistical rigor of export-based analysis.
**Core Capabilities:**
- Web interface compatible (no exports required)
- Statistical pattern validation and scoring
- Frequency analysis and temporal tracking
- Evidence-based skill recommendations
- Complete skill package generation
## Analysis Framework
This skill uses the **[shared analysis methodology](../../shared/analysis-methodology.md)** with tool-based data collection adaptations.
### Phase 1: Data Collection Strategy
**Determine Analysis Scope:**
Ask user: "How deep should I analyze your conversation history?"
**Options:**
- **Quick Scan** (20-30 conversations, ~2-3 min): Recent patterns and immediate opportunities
- **Standard Analysis** (50-75 conversations, ~5-7 min): Comprehensive pattern detection
- **Deep Dive** (100+ conversations, ~10-15 min): Full workflow mapping with temporal trends
- **Targeted Search** (variable): Focus on specific topics or time periods
**Data Collection Process:**
1. **Broad Sampling**: Use `recent_chats(n=30)` multiple times with varied parameters to get diverse coverage
2. **Temporal Distribution**: Sample conversations across different time periods (recent, 1 week ago, 1 month ago)
3. **Topic Exploration**: Use `conversation_search` for domains mentioned by user or detected in initial sampling
4. **Depth vs Breadth**: Balance comprehensive coverage with processing efficiency
### Phase 2-6: Core Analysis
Apply the **[shared analysis methodology](../../shared/analysis-methodology.md)** phases:
- **Phase 2**: Pattern Discovery & Classification (explicit, implicit, domain, temporal)
- **Phase 3**: Frequency Analysis & Validation (occurrence metrics, statistical validation)
- **Phase 4**: Skill-Worthiness Scoring (0-50 composite scale across 5 dimensions)
- **Phase 5**: Relationship Mapping & Consolidation (overlap detection, boundary optimization)
- **Phase 6**: Prioritization Matrix & Recommendations (frequency vs impact visualization)
See [shared methodology](../../shared/analysis-methodology.md) for complete scoring rubrics and quality standards.
### Phase 7: Skill Package Generation
**For each approved skill, create:**
**A. Skill Specification Document:**
```markdown
## [Skill Name]
**Pattern Evidence:**
- Frequency: [X instances in Y conversations (Z%)]
- Consistency: [X/10 score]
- Time savings: [X hours/month]
**Composite Score: [X/50]**
- Frequency: [X/10]
- Consistency: [X/10]
- Complexity: [X/10]
- Time Savings: [X/10]
- Error Reduction: [X/10]
**Example Conversations:**
1. [Date]: [Brief excerpt showing pattern]
2. [Date]: [Brief excerpt showing pattern]
3. [Date]: [Brief excerpt showing pattern]
**Pattern Components:**
- **Consistent elements**: [What stays the same]
- **Variable elements**: [What changes per instance]
- **Common refinements**: [Typical adjustments user makes]
**Proposed Skill Structure:**
SKILL.md sections:
1. Overview & trigger conditions
2. [Main workflow methodology]
3. Quality standards
4. Examples
Supporting files needed:
- reference.md: [Detailed framework/methodology]
- templates/: [Reusable output templates]
- examples.md: [Additional use cases]
```
**B. Complete SKILL.md File:**
Generate production-ready skill with:
- Proper YAML frontmatter (name, description with triggers)
- Clear instructions based on pattern analysis
- Evidence-based examples from actual conversations
- Quality standards derived from user refinement patterns
- Progressive disclosure (link to references for detail)
## Output Formats
**After analysis completion, present:**
### Summary Report
```markdown
# Workflow Pattern Analysis Report
**Analysis Date**: [Timestamp]
**Conversations Analyzed**: [X conversations across Y time period]
**Patterns Identified**: [X patterns]
**Skills Recommended**: [Y skills]
## 🔥 HIGH-PRIORITY OPPORTUNITIES
### 1. [Skill Name]
**Score: [X/50]** (Frequency: X/10, Consistency: X/10, Complexity: X/10, Time: X/10, Error: X/10)
**Pattern Description**: [What you do repeatedly]
**Evidence**:
- Found in [X] conversations ([Y%] of analyzed sample)
- First seen: [Date], Most recent: [Date]
- Average time per instance: [X minutes]
**Example Occurrences**:
1. [Date]: "[Brief excerpt]"
2. [Date]: "[Brief excerpt]"
**Proposed Skill**: "[One-line skill description]"
**Time Savings**: [X hours/month]
---
[Repeat for top 5-8 patterns]
## 💡 MODERATE OPPORTUNITIES
[Briefer summaries of medium-priority patterns]
## 🎯 QUICK AUTOMATION CANDIDATES
[Simple, high-frequency patterns]
## ⏸️ DEFERRED PATTERNS
[Patterns that didn't meet skill-worthiness thresholds]
## 📊 ANALYSIS METADATA
- Total conversations: [X]
- Date range: [earliest] to [latest]
- Unique patterns identified: [X]
- Patterns validated: [Y]
- Cross-pattern overlaps: [Z]
- Recommended consolidations: [N]
```
### Interactive Follow-Up Options
```
What would you like to do next?
A. Generate complete SKILL.md files for [top 3-5 skills]
B. Deep dive into specific pattern: [skill name]
C. Expand analysis with more conversations
D. Focus on specific domain/topic area
E. Adjust scoring weights and recalculate priorities
```
## Quality Standards
All quality standards follow the **[shared analysis methodology](../../shared/analysis-methodology.md#quality-standards)**:
- Pattern validation requirements (frequency, consistency, evidence)
- Skill consolidation rules (max 8-12 skills, clear boundaries)
- Skill package generation standards
- Anti-patterns to avoid
## Progressive Disclosure Strategy
**Keep this SKILL.md concise by referencing:**
- **Core methodology**: [shared/analysis-methodology.md](../../shared/analysis-methodology.md)
- **Detailed scoring rubrics**: See methodology Phase 4
- **Quality standards**: See methodology Quality Standards section
- **Anti-patterns**: See methodology Anti-Patterns section
**Load additional context only when:**
- User requests deep dive on specific pattern
- Generating complete skill packages (not just analysis)
- User wants to understand scoring methodology in detail
- Building reference materials for complex domains
## Examples
### Example 1: Quick Scan Request
**User**: "Analyze my recent chats for automation opportunities"
**Claude**:
I'll perform a quick scan of your recent conversation history to identify skill opportunities.
[Uses recent_chats(n=30) multiple times]
📊 **Quick Scan Results** (30 conversations analyzed)
🔥 **TOP OPPORTUNITY**:
**"Email Response Composer"** - Score: 42/50
- Found in 9 conversations (30%)
- Pattern: You regularly ask me to draft professional emails with specific tone and structure requirements
- Time savings: ~90 min/month (10 min per email × 9 emails)
- Evidence: Consistent 3-paragraph structure with greeting, main content, action items
Want me to:
A. Generate complete skill package for this
B. Continue analysis for more patterns (expand to 50-75 conversations)
C. Focus on other domains
### Example 2: Targeted Domain Analysis
**User**: "Find patterns in how I use you for coding tasks"
**Claude**:
I'll analyze your coding-related conversations to identify workflow patterns.
[Uses conversation_search for coding terms + recent_chats filtering]
📊 **Coding Workflow Analysis** (18 relevant conversations)
🔥 **TOP PATTERNS**:
1. **"Code Review Checklist Generator"** - Score: 38/50
- Found in 7 code review discussions
- Pattern: You ask for language-specific review checklists before reviewing PRs
- Consistency: 85% (always includes security, performance, style sections)
2. **"API Documentation Humanizer"** - Score: 35/50
- Found in 5 documentation tasks
- Pattern: Converting technical API specs into developer-friendly guides
- Structure: Always includes quick start, common use cases, troubleshooting
Want me to build skills for these patterns?
### Example 3: Deep Dive Analysis
**User**: "Do a comprehensive analysis of my workflow over the last few months"
**Claude**:
I'll perform a deep analysis of your conversation history. This will take 10-15 minutes to ensure comprehensive coverage.
[Uses recent_chats extensively, conversation_search for discovered topics, temporal sampling]
📊 **Comprehensive Workflow Analysis**
- **Conversations analyzed**: 120
- **Date range**: [3 months]
- **Patterns identified**: 15
- **Skills recommended**: 6
🔥 **CRITICAL PRIORITY** (Score 40-50):
1. **"Weekly Status Report Generator"** - Score: 47/50
- Frequency: 12 instances (10% of conversations)
- Consistency: 95% - always same structure
- Evidence: Every Monday, you format updates in identical 5-section template
- Time savings: 240 min/month (20 min/week × 4 weeks × 3 months avg)
**HIGH PRIORITY** (Score 30-39):
2. **"Client Proposal Framework"** - Score: 36/50
3. **"Meeting Notes Structurer"** - Score: 34/50
4. **"Technical Concept Explainer"** - Score: 31/50
[Full analysis report with evidence, prioritization matrix, skill specifications]
**Recommended Implementation Path**:
1. Start with "Weekly Status Report Generator" (highest ROI)
2. Build "Client Proposal Framework" and "Meeting Notes Structurer" next (complementary workflows)
3. Evaluate remaining patterns after 2-4 weeks of usage
Generate complete skill packages now? [Y/N]
## When to Use This Skill
**✅ Use this skill when:**
- User requests analysis of their conversation patterns
- User wants to identify automation opportunities
- User asks what skills they should create
- User mentions repetitive tasks or workflows
- User wants evidence-based skill recommendations
- User is in web interface (can't use export-based analysis)
**❌ Don't use this skill when:**
- User has conversation export files available (use export-based plugin instead for more comprehensive analysis)
- User wants cross-platform ChatGPT + Claude analysis (requires exports)
- User has very few conversations (<10) making pattern detection unreliable
- User wants to build specific skill they already have in mind
- User is asking about existing skills or community skills
**⚡ Proactive Use:**
When you detect potential patterns during normal conversation, offer:
```
💭 Pattern detected: This is the [Xth] time you've asked me to [action].
Would you like me to analyze your conversation history for similar
patterns and recommend a Custom Skill? I can identify other automation
opportunities you might not have noticed.
[Yes, analyze] [Not now]
```
## Anti-Patterns to Avoid
See **[shared methodology anti-patterns](../../shared/analysis-methodology.md#anti-patterns-to-avoid)** for complete guidance on:
- Tasks not suitable for skills
- Red flags in patterns
- When to use MCP vs skills
- Common recommendation pitfalls