# Dstack Compare

> Period-over-period or cohort comparison. Use to understand what changed between two time periods, groups, or experiments. Breaks down the delta by key dimensions to find where the difference comes from. Trigger phrases: "last week vs prior week", "before vs after launch", "compare these two groups", "A/B results", "what changed?", "why is X different?".

- Skill: `upsolve-labs/dstack-compare` (Agent Skill)
- Install (CLI): `npx skillmds@latest add upsolve-labs/dstack-compare`
- Raw SKILL.md: https://api.skillmd.com/api/skills/upsolve-labs/dstack-compare/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: Upsolve-Labs (https://skillmd.com/u/upsolve-labs)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/upsolve-labs/dstack-compare

---


## Update Check (run first)

```bash
_UPD=$(~/.claude/skills/data-stack/bin/data-stack-update-check 2>/dev/null || .claude/skills/data-stack/bin/data-stack-update-check 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true
```

If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.claude/skills/data-stack/skills/dstack-upgrade/SKILL.md` and follow the "Inline upgrade flow". If `JUST_UPGRADED <from> <to>`: tell user "Running data-stack v{to} (just updated!)" and continue.

# /compare

You are helping the user compare two periods, cohorts, or groups.

## Before Starting

AskUserQuestion: "What are you comparing, and what metric? (e.g. 'last 7 days vs prior 7 days for revenue', 'users who saw feature A vs B on conversion rate', 'before Jan 15 vs after Jan 15 on DAU')"

## Phase 1: Top-Level Delta

Open an Upsolve thread:

```
analyze_data("Compare <metric> between <period/group A> and <period/group B>. Show the value for each, the absolute change, and the percentage change.")
```

## Phase 2: Dimension Breakdown

```
analyze_data("Break down the difference in <metric> between A and B by: [most relevant dimensions — geography, product, channel, device, user segment, etc.]. Rank dimensions by their contribution to the total delta.", thread_id=<id>)
```

Identify the 2–3 dimensions that explain the most of the gap.

## Phase 3: Statistical Significance (A/B only)

If this is an experiment or A/B test, run:

```
analyze_data("Is the difference in <metric> between group A and group B statistically significant? Show sample sizes, means, and p-value if calculable.", thread_id=<id>)
```

Skip this phase for time-period comparisons.

## Phase 4: Output Comparison Report

```
COMPARISON: <A> vs <B>
────────────────────────────────────────
Metric: <metric>

A (<label>):  <value>
B (<label>):  <value>
Δ:            <absolute change> (<pct>%)

TOP DRIVERS OF DIFFERENCE:
  1. <dimension>: <A value> vs <B value> — explains ~X% of delta
  2. <dimension>: <A value> vs <B value> — explains ~X% of delta
  3. <dimension>: <A value> vs <B value> — explains ~X% of delta

STATISTICAL NOTE:
  <significant at p<0.05 / not significant / not applicable>

INTERPRETATION:
  <2–3 sentence plain-language summary of what the data shows>
```

## Rules

- Always run Phase 1 before dimensional breakdown.
- If the user specifies one metric, don't expand to others without asking.
- Keep interpretation factual — report what the data shows, not what to do about it.
- For time comparisons, ensure the periods are the same length before comparing.

