Get the FREE Ultimate OpenClaw Setup Guide →

Compare Periods

npx machina-cli add skill jackhendon/ecom-feedback-intelligence/compare-periods --openclaw
Files (1)
SKILL.md
2.4 KB

Skill: compare-periods

Reads memory/history.json and compares trends across stored snapshots. No new classification — pure analysis of historical data.

Usage

/compare-periods
/compare-periods 4        # compare last 4 snapshots
/compare-periods all      # compare all snapshots in history

Default: compare last 4 snapshots (or all if fewer than 4 exist).


Steps

Step 1: Load history

Read memory/history.json. Extract the snapshots array.

If fewer than 2 snapshots exist:

Not enough history to compare periods.
Snapshots found: N
Run /analyze-reviews at least twice to build history.

And stop.

Step 2: Select snapshots

Apply the count argument (default 4). Use the most recent N snapshots, ordered chronologically.

Step 3: Compute trends

For each metric, show direction of change across the selected window:

Sentiment trend:

  • Positive %: is it rising, falling, or flat (< 2pp change = flat)?
  • Negative %: same
  • Net sentiment score: positive% - negative% per period

Theme trends:

  • Rank each theme by frequency per period
  • Identify: themes rising in rank, themes falling in rank, themes newly appearing, themes disappearing
  • Flag any theme that has increased by > 5 mentions period-over-period as "accelerating"

Priority trends:

  • Average priority score per period
  • Count of high-priority issues (≥ 6.0) per period
  • Any themes consistently generating high-priority issues

Review volume:

  • Review count per period (context: is volume increasing/decreasing?)

Step 4: Output trend report

Compute all values directly from the JSON data — no estimation.

TREND ANALYSIS — [earliest period] to [latest period]
N snapshots | N total reviews

SENTIMENT TREND
  Period    | Positive | Neutral | Negative | Net
  ──────────────────────────────────────────────
  YYYY-WNN  |   N%    |   N%   |    N%    |  ±N

THEME MOVEMENT
  Rising:       [theme] (↑ N), ...
  Falling:      [theme] (↓ N), ...
  Stable:       [themes with < 2 mention change]
  Accelerating: [any theme up > 5 mentions period-over-period]

PRIORITY TRENDS
  Avg score:         N → N → N
  High-priority count: N → N → N

KEY SIGNALS
  • [signal 1]
  • [signal 2]
  • [signal 3]

Step 5: PM recommendation

RECOMMENDED ACTION
[One specific, evidence-based recommendation derived from the trend data]

Source

git clone https://github.com/jackhendon/ecom-feedback-intelligence/blob/main/.claude/skills/compare-periods/SKILL.mdView on GitHub

Overview

Compares stored snapshots from memory/history.json to reveal sentiment shifts, theme movement, and priority changes over time. It performs a pure historical analysis without introducing new classifications. By default, it analyzes the most recent four snapshots, or all if fewer exist.

How This Skill Works

Loads history.json, selects the last N snapshots (default 4 unless you pass all), and computes trend metrics for sentiment, themes, priorities, and review volume. It then outputs a TREND ANALYSIS report with exact values from the data and a PM recommendation. No estimation or reclassification is performed.

When to Use It

  • Spot sentiment shifts across time in customer reviews.
  • Compare how themes rise or fall in frequency across periods.
  • Detect accelerating themes with more than five mentions between periods.
  • Track changes in high-priority issues per period.
  • Obtain a data-driven PM recommendation based on historical trends.

Quick Start

  1. Step 1: Run /compare-periods with the desired window (default 4) or /compare-periods all.
  2. Step 2: Review the TREND ANALYSIS and note sentiment, theme movement, and priority trends.
  3. Step 3: Read the PM recommendation and plan data-driven actions.

Best Practices

  • Ensure memory/history.json exists and contains a valid snapshots array.
  • Run with the default 4 snapshots or specify all to include every period.
  • Interpret the TREND ANALYSIS output using the raw data, not estimates.
  • Watch for accelerating themes (more than 5 mentions) as early signals.
  • Cross-check the PM recommendation with current business context before acting.

Example Use Cases

  • Sentiment improves from 52% positive to 64% positive over four snapshots.
  • Shipping/theme climbs in rank and shows accelerating mentions across periods.
  • High-priority issues rise from 2 to 7 per period, centering on damaged items.
  • Review volume trends upward, suggesting growing customer engagement.
  • New theme eco-friendly packaging appears in the latest snapshot.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers