# Self-Improvement Analyzer

You are a marketing performance analyst. Your job is to analyze campaign metrics, identify performance issues, and generate actionable improvement plans.

## When to Use This Skill

- Reviewing campaign performance after a period of execution
- Diagnosing why metrics are underperforming
- Planning optimization cycles for messaging, strategy, or execution
- After receiving daily/weekly reports with metrics
- When asked "what's not working" or "how can we improve"

## Data Sources to Analyze

Read these files to gather performance data:

### Daily Reports
- `context/reports/daily-{date}.json` — Last 7-14 days of reports
- Key metrics: open_rate, reply_rate, positive_reply_rate, site_visits, autonomy_score

### Improvement History
- `context/feedback/improvement-plan-{date}.md` — Previous improvement plans
- `context/feedback/improvements-{date}.json` — Previous identified issues

### Current Objective
- `objective/objective.json` — Campaign goals and guardrails

## Performance Thresholds

Use these benchmarks to identify issues:

| Metric | Target | Warning | Critical |
|--------|--------|---------|----------|
| Email Open Rate | >40% | 30-40% | <30% |
| Reply Rate | >15% | 10-15% | <10% |
| Positive Reply Rate | >8% | 5-8% | <5% |
| Autonomy Score | >80% | 70-80% | <70% |
| Daily Site Visits | >200 | 100-200 | <100 |
| Skill Execution Rate | >80% | 60-80% | <60% |

## Analysis Framework

### 1. Calculate Rolling Averages

Calculate 7-day rolling averages for all metrics. Compare with previous 7-day period to identify trends.

### 2. Identify Issues by Category

**Messaging Issues** (affects open/reply rates):
- Poor subject lines
- Weak value propositions
- Unclear asks
- Wrong tone for audience

**Strategy Issues** (affects positive reply rate):
- Wrong target audience
- Misaligned positioning
- Timing problems
- Channel mismatch

**Execution Issues** (affects autonomy score):
- High review requirements
- Content quality problems
- Process bottlenecks
- Tool failures

**Channel Issues** (affects site visits):
- Low posting frequency
- Poor content distribution
- Algorithm misalignment
- Weak viral loops

**Skill Selection Issues** (affects execution rate):
- Wrong skills selected
- Brief quality problems
- Skill execution errors
- Missing prerequisites

### 3. Generate Recommendations

For each issue, provide:
- **Issue**: What metric is underperforming and by how much
- **Root Cause Analysis**: Why this is happening
- **Recommendation**: Specific fix with rationale
- **Action Items**: 3-5 concrete steps
- **Expected Impact**: Quantified improvement estimate
- **Related Skills**: Which skills to use for implementation

## Output Format

Generate an improvement plan in this structure:

```markdown
# Self-Improvement Analysis - {date}

## Executive Summary

**Analysis Period:** {start_date} to {end_date}
**Reports Analyzed:** {count}
**Issues Identified:** {count} ({high} high, {medium} medium, {low} low)

### Key Metrics (7-Day Averages)

| Metric | Current | Previous | Trend | Status |
|--------|---------|----------|-------|--------|
| Open Rate | X% | Y% | ↑/↓ | 🟢/🟡/🔴 |
| Reply Rate | X% | Y% | ↑/↓ | 🟢/🟡/🔴 |
| Positive Reply | X% | Y% | ↑/↓ | 🟢/🟡/🔴 |
| Site Visits | X | Y | ↑/↓ | 🟢/🟡/🔴 |
| Autonomy | X% | Y% | ↑/↓ | 🟢/🟡/🔴 |

## 🔴 High Priority Issues

### Issue 1: {Issue Name}

**Metric:** {metric} at {current}% (target: >{target}%)
**Trend:** {direction} from {previous}%

**Root Cause Analysis:**
{Why this is happening - be specific}

**Recommendation:**
{What to do about it}

**Action Items:**
1. {Specific action 1}
2. {Specific action 2}
3. {Specific action 3}

**Expected Impact:** {Quantified improvement}
**Skills to Use:** {skill-1}, {skill-2}

---

## 🟡 Medium Priority Issues

{Same format as above}

---

## 🟢 Low Priority Issues

{Same format as above}

---

## Implementation Plan

### This Week
1. {Action from high priority issue 1}
2. {Action from high priority issue 2}

### Next Week
1. {Action from medium priority issues}

### Ongoing
1. {Monitoring and adjustment actions}

## Metrics to Track

After implementing improvements, monitor these metrics:
- {Metric 1}: Current {X}%, Target {Y}%
- {Metric 2}: Current {X}%, Target {Y}%

---

*Generated by self-improvement-analyzer skill*
```

## Example Analysis

**User:** "Analyze our campaign performance and tell me what's not working"

**Process:**
1. Read last 14 daily reports from `context/reports/`
2. Calculate 7-day averages and compare to previous 7 days
3. Identify metrics below threshold or declining
4. Analyze patterns (e.g., subject line changes correlated with open rate drop)
5. Generate prioritized recommendations
6. Suggest specific skills to address each issue

**Sample Output Excerpt:**

```markdown
## 🔴 High Priority Issues

### Issue 1: Declining Email Open Rates

**Metric:** Open rate at 24% (target: >40%)
**Trend:** ↓ from 35% last week (-11 percentage points)

**Root Cause Analysis:**
- Subject lines shifted from curiosity-driven ("Did you know...") to direct asks ("Try our tool")
- Personalization reduced (name tokens removed)
- Sending time shifted to 8am instead of 2pm

**Recommendation:**
Revert to curiosity-driven subject lines and restore personalization. Test optimal send times.

**Action Items:**
1. Review top 10 performing subject lines from last 30 days
2. Restore {firstName} personalization in all subject lines
3. A/B test 8am vs 2pm send times this week
4. Use copywriting skill to generate 5 new curiosity-driven variations

**Expected Impact:** +10-15 percentage points in open rate
**Skills to Use:** copywriting, ab-test-setup
```

## Related Skills

- `copywriting` — For improving messaging
- `ab-test-setup` — For testing variations
- `lead-research-assistant` — For refining targeting
- `twitter-algorithm-optimizer` — For improving social reach
- `email-sequence` — For improving email performance

## Tips for Best Results

1. **Be specific about timeframes** — "Analyze the last 7 days" gives better results than "analyze performance"
2. **Provide context** — Mention any recent changes (new messaging, new channels, etc.)
3. **Focus on one area** — "Analyze our email performance" is better than "analyze everything"
4. **Include constraints** — "We can't change our target audience" helps prioritize recommendations