retro

Weekly engineering retrospective. Analyzes commit history, work patterns, and code quality metrics with persistent trend tracking. Team-aware: per-person contributions with praise and growth areas. Use when asked to 'weekly retro', 'what did we ship', 'engineering retrospective', 'how was this week', or 'show me the commit stats'. Proactively suggest at the end of a work week or sprint.

5 stars

Best use case

retro is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Weekly engineering retrospective. Analyzes commit history, work patterns, and code quality metrics with persistent trend tracking. Team-aware: per-person contributions with praise and growth areas. Use when asked to 'weekly retro', 'what did we ship', 'engineering retrospective', 'how was this week', or 'show me the commit stats'. Proactively suggest at the end of a work week or sprint.

Teams using retro should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/retro/SKILL.md --create-dirs "https://raw.githubusercontent.com/vltansky/skills/main/skills/retro/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/retro/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How retro Compares

Feature / AgentretroStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Weekly engineering retrospective. Analyzes commit history, work patterns, and code quality metrics with persistent trend tracking. Team-aware: per-person contributions with praise and growth areas. Use when asked to 'weekly retro', 'what did we ship', 'engineering retrospective', 'how was this week', or 'show me the commit stats'. Proactively suggest at the end of a work week or sprint.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# /retro — Weekly Engineering Retrospective

Generates a comprehensive engineering retrospective from commit history. Team-aware: identifies you, then analyzes every contributor with per-person praise and growth opportunities.

## Arguments
- `/retro` — last 7 days (default)
- `/retro 24h` — last 24 hours
- `/retro 14d` — last 14 days
- `/retro 30d` — last 30 days
- `/retro compare` — compare current window vs prior same-length window
- `/retro compare 14d` — compare with explicit window

## Instructions

Parse the argument to determine the time window. Default to 7 days.

**Midnight-aligned windows:** For `d`/`w` units, compute an absolute start date at local midnight. Example: if today is 2026-03-18 and window is 7 days, start = 2026-03-11. Use `--since="2026-03-11T00:00:00"` — without `T00:00:00`, git uses the current wall-clock time.

**Invalid argument:** Show usage and stop:
```
Usage: /retro [window | compare]
  /retro              — last 7 days (default)
  /retro 24h          — last 24 hours
  /retro 14d          — last 14 days
  /retro 30d          — last 30 days
  /retro compare      — compare this period vs prior period
  /retro compare 14d  — compare with explicit window
```

---

### Step 1: Gather Raw Data

Identify the current user and default branch, then fetch:
```bash
git config user.name
git config user.email
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||' || echo "main"
git fetch origin --quiet 2>/dev/null || true
```

The name from `git config user.name` is **"you"**. All others are teammates.

Run ALL of these in parallel (independent):

```bash
# 1. All commits with stats
git log origin/<default> --since="<window>" --format="%H|%aN|%ae|%ai|%s" --shortstat

# 2. Per-commit test vs total LOC breakdown
git log origin/<default> --since="<window>" --format="COMMIT:%H|%aN" --numstat

# 3. Commit timestamps for session detection
git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n

# 4. Files most frequently changed
git log origin/<default> --since="<window>" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -20

# 5. PR numbers from commit messages
git log origin/<default> --since="<window>" --format="%s" | grep -oE '[#!][0-9]+' | sort -u

# 6. Per-author file hotspots
git log origin/<default> --since="<window>" --format="AUTHOR:%aN" --name-only

# 7. Per-author commit counts
git shortlog origin/<default> --since="<window>" -sn --no-merges

# 8. TODOS.md backlog (if exists)
cat TODOS.md 2>/dev/null || true

# 9. Total test file count
find . -name '*.test.*' -o -name '*.spec.*' -o -name '*_test.*' -o -name '*_spec.*' 2>/dev/null | grep -v node_modules | wc -l

# 10. Regression test commits in window
git log origin/<default> --since="<window>" --oneline --grep="test(qa):" --grep="test(design):" --grep="test: coverage"

# 11. Test files changed in window
git log origin/<default> --since="<window>" --format="" --name-only | grep -E '\.(test|spec)\.' | sort -u | wc -l

# 12. Skill usage analytics (if exists)
cat ~/.context/analytics/skill-usage.jsonl 2>/dev/null | tail -200 || true
```

---

### Step 2: Compute Metrics

| Metric | Value |
|--------|-------|
| Commits to main | N |
| Contributors | N |
| PRs merged | N |
| Total insertions | N |
| Total deletions | N |
| Net LOC added | N |
| Test LOC (insertions) | N |
| Test LOC ratio | N% |
| Active days | N |
| Detected sessions | N |
| Avg LOC/session-hour | N |
| Test Health | N total tests · M added · K regression commits |

Then show **per-author leaderboard** immediately below:

```
Contributor         Commits   +/-          Top area
You (vlad)               32   +2400/-300   src/
alice                    12   +800/-150    lib/
bob                       3   +120/-40     tests/
```

Sort by commits descending. Current user always first, labeled "You (name)".

**Backlog Health (if TODOS.md exists):**
- Total open TODOs (exclude `## Completed` section)
- P0/P1 count, P2 count
- Items completed this period (in Completed section with dates in window)

Include in metrics table:
```
| Backlog Health | N open (X P0/P1, Y P2) · Z completed this period |
```

**Skill Usage (if `~/.context/analytics/skill-usage.jsonl` exists):**
Filter entries by `ts` within window. Aggregate by skill name. Present as:
```
| Skill Usage | /qa(8) /design-review(3) /retro(2) |
```

---

### Step 3: Commit Time Distribution

Show hourly histogram in local time:

```
Hour  Commits
 00:    4      ████
 07:    5      █████
 10:    8      ████████
 22:   12      ████████████
```

Identify: peak hours, dead zones, bimodal vs continuous, late-night clusters (after 10pm).

---

### Step 4: Work Session Detection

Detect sessions using **45-minute gap** threshold between consecutive commits.

Classify:
- **Deep sessions** (50+ min)
- **Medium sessions** (20-50 min)
- **Micro sessions** (<20 min — single-commit fire-and-forget)

Calculate: total active coding time, average session length, LOC per hour of active time.

---

### Step 5: Commit Type Breakdown

Categorize by conventional commit prefix (feat/fix/refactor/test/chore/docs). Show as percentage bar:

```
feat:     20  (40%)  ████████████████████
fix:      27  (54%)  ███████████████████████████
refactor:  2  ( 4%)  ██
```

Flag if fix ratio exceeds 50% — signals "ship fast, fix fast" that may indicate review gaps.

---

### Step 6: Hotspot Analysis

Top 10 most-changed files. Flag:
- Files changed 5+ times (churn hotspots)
- Test vs production files in hotspot list
- VERSION/CHANGELOG frequency (version discipline)

---

### Step 7: PR Size Distribution

Bucket by LOC:
- **Small** (<100)
- **Medium** (100-500)
- **Large** (500-1500)
- **XL** (1500+)

---

### Step 8: Focus Score + Ship of the Week

**Focus score:** % of commits touching the single most-changed top-level directory. Higher = deeper focused work. Report: "Focus score: 62% (src/auth/)"

**Ship of the week:** Highest-LOC PR in the window. PR number, title, LOC changed, why it matters.

---

### Step 9: Team Member Analysis

For each contributor compute: commits/LOC, areas of focus (top 3 directories), commit type mix, session patterns, test discipline, biggest ship.

**For you:** Deepest treatment — session analysis, time patterns, focus score. First person framing.

**For each teammate:** 2-3 sentences on what they worked on, then:
- **Praise** (1-2 specific things): Anchor in actual commits. Not "great work" — say exactly what was good.
- **Opportunity for growth** (1 specific thing): Frame as leveling up, not criticism. Anchor in data.

**If only one contributor:** Skip team breakdown. Retro is personal.

**Co-Authored-By trailers:** Parse them. Credit co-authors. Track AI co-authors (noreply@anthropic.com, etc.) as "AI-assisted commits" — separate metric, not a team member.

---

### Step 10: Week-over-Week Trends (if window ≥ 14d)

Split into weekly buckets: commits/week, LOC/week, test ratio/week, fix ratio/week, session count/week.

---

### Step 11: Streak Tracking

```bash
# Team streak
git log origin/<default> --format="%ad" --date=format:"%Y-%m-%d" | sort -u

# Personal streak (filter by user name)
git log origin/<default> --author="<user_name>" --format="%ad" --date=format:"%Y-%m-%d" | sort -u
```

Count backward from today — consecutive days with ≥1 commit. Display:
- "Team shipping streak: 47 consecutive days"
- "Your shipping streak: 32 consecutive days"

---

### Step 12: Load History & Compare

```bash
ls -t .context/retros/*.json 2>/dev/null | head -5
```

If prior retros exist: load most recent. Show **Trends vs Last Retro**:
```
                    Last        Now         Delta
Test ratio:         22%    →    41%         ↑19pp
Sessions:           10     →    14          ↑4
LOC/hour:          200     →   350          ↑75%
Fix ratio:          54%    →    30%         ↓24pp (improving)
```

If no prior retros: skip comparison, append "First retro recorded — run again next week to see trends."

---

### Step 13: Save Retro Snapshot

```bash
mkdir -p .context/retros
today=$(date +%Y-%m-%d)
existing=$(ls .context/retros/${today}-*.json 2>/dev/null | wc -l | tr -d ' ')
next=$((existing + 1))
# Save to .context/retros/${today}-${next}.json
```

Write JSON with Write tool:
```json
{
  "date": "YYYY-MM-DD",
  "window": "7d",
  "metrics": {
    "commits": 47,
    "contributors": 3,
    "prs_merged": 12,
    "insertions": 3200,
    "deletions": 800,
    "net_loc": 2400,
    "test_loc": 1300,
    "test_ratio": 0.41,
    "active_days": 6,
    "sessions": 14,
    "deep_sessions": 5,
    "avg_session_minutes": 42,
    "loc_per_session_hour": 350,
    "feat_pct": 0.40,
    "fix_pct": 0.30,
    "peak_hour": 22,
    "ai_assisted_commits": 32
  },
  "authors": {
    "Vlad": { "commits": 32, "insertions": 2400, "deletions": 300, "test_ratio": 0.41, "top_area": "src/" }
  },
  "streak_days": 47,
  "tweetable": "Week of Mar 22: 47 commits (2 contributors), 3.2k LOC, 41% tests, 12 PRs, peak: 10pm | Streak: 47d"
}
```

Include `test_health` only if test files exist. Include `backlog` only if TODOS.md exists.

---

### Step 14: Write the Narrative

**Tweetable summary** (first line, before everything else):
```
Week of Mar 22: 47 commits (2 contributors), 3.2k LOC, 41% tests, 12 PRs, peak: 10pm | Streak: 47d
```

Then structure:

## Engineering Retro: [date range]

### Summary Table
(from Step 2)

### Trends vs Last Retro
(from Step 12 — skip if first retro)

### Time & Session Patterns
(from Steps 3-4)
Narrative: when most productive hours are, whether sessions are getting longer/shorter, notable patterns.

### Shipping Velocity
(from Steps 5-7)
Commit type mix, PR size distribution, fix-chain detection, version bump discipline.

### Code Quality Signals
Test LOC ratio trend, hotspot analysis (same files churning?).

### Test Health
- Total test files, tests added this period, regression test commits
- If test ratio <20%: flag as growth area — "100% coverage is the goal. Tests make fast iteration safe."

### Focus & Highlights
(from Step 8)
Focus score with interpretation, Ship of the Week callout.

### Your Week
(from Step 9, personal deep-dive)
- Your commit count, LOC, test ratio, session patterns, focus areas, biggest ship
- **What you did well** (2-3 specific things anchored in commits)
- **Where to level up** (1-2 specific, actionable suggestions)

### Team Breakdown
(from Step 9, for each teammate — skip if solo repo)
Per-person: what they shipped, **Praise**, **Opportunity for growth**.

### Top 3 Team Wins
Highest-impact things shipped. For each: what, who, why it matters.

### 3 Things to Improve
Specific, actionable, anchored in actual commits. Mix personal and team-level.

### 3 Habits for Next Week
Small, practical, realistic. Each must take <5 minutes to adopt.

---

## Compare Mode

When the user runs `/retro compare [window]`:
1. Compute metrics for current window (midnight-aligned)
2. Compute metrics for prior same-length window (use `--since` + `--until` with midnight-aligned dates to avoid overlap)
3. Show side-by-side comparison table with deltas and arrows
4. Brief narrative: biggest improvements and regressions
5. Save only the current-window snapshot

---

## Tone

- Encouraging but candid, no coddling
- Specific and concrete — always anchor in actual commits
- Skip generic praise ("great job!") — say exactly what was good and why
- Frame improvements as leveling up, not criticism
- **Praise should feel like something you'd say in a 1:1** — specific, earned, genuine
- **Growth suggestions should feel like investment advice** — "this is worth your time because..."
- Never compare teammates against each other negatively
- Keep total output ~3000-4500 words
- Use markdown tables and code blocks for data, prose for narrative

## Important Rules

- ALL narrative output goes directly to the conversation. The ONLY file written is the `.context/retros/` JSON snapshot.
- Use `origin/<default>` for all git queries (not local main which may be stale)
- Display all timestamps in the user's local timezone (do not override `TZ`)
- If window has zero commits, say so and suggest a different window
- Round LOC/hour to nearest 50
- Treat merge commits as PR boundaries
- On first run (no prior retros), skip comparison gracefully

Related Skills

ship-it

5
from vltansky/skills

Create a GitHub PR with conventional format and AI session context. Use when user says 'create PR', 'open PR', 'submit changes', 'send to dev', 'ship it', or is done with their task.

roast-my-code

5
from vltansky/skills

Brutally honest code review with comedic flair. Roasts the sins, then redeems the sinner. Use when the user says "roast my code", "roast this", "tear this apart", "be brutal", "savage review", "destroy my code", "flame this", or wants entertaining but actionable code feedback. Also triggers on "what's wrong with this code" with a casual tone, "how bad is this", or "rate my code".

roast-my-agents-md

5
from vltansky/skills

Brutally honest AGENTS.md/CLAUDE.md review backed by real A/B test evidence. Not just opinions — actual proof that your rules are dead weight. Roasts instruction files for bloat, slop, and redundancy, then proves it by running evals. Use when user says "roast my agents.md", "roast my CLAUDE.md", "prove my rules are useless", "eval roast", or wants entertaining evidence-based feedback on their AI config files. Also triggers on "audit my instructions" or "are my rules helping".

rfc-research

5
from vltansky/skills

Research a technical topic and produce an RFC document backed by real code evidence from GitHub. Use when user says 'write an RFC', 'RFC research', 'create RFC for', 'technical proposal', 'design doc', 'investigate X', 'research X and write a proposal', 'architecture decision record', 'ADR', or needs a structured technical decision document with prior art analysis.

hetzner-codex-remote

5
from vltansky/skills

Prepare a Hetzner Cloud VPS for secure Codex remote SSH access. Use when the user wants to create or configure a Hetzner server for Codex remote control, fix "No codex found in PATH" on a remote machine, install agent development tooling on a VPS, harden SSH access to a Hetzner server, or connect the server through Codex Settings, Connections, Add SSH.

grill-me

5
from vltansky/skills

Structured adversarial review that pushes back on a plan, challenges the premise, compares alternatives, and stress-tests the design until the main risks are explicit. Use when the user asks to "grill me", stress-test a plan, poke holes in an approach, challenge assumptions, pressure-test a design, or validate an early-stage idea before building ("I have an idea", "is this worth building", "grill me on this idea").

fix-pr-comments

5
from vltansky/skills

Handle feedback from PR reviewers. For each inline thread: reply on-thread and resolve after user approves. Use when developers left comments on your PR and you need to address them. Triggers on 'address comments', 'fix PR feedback', 'what did the reviewer say', 'handle review', 'resolve comments', 'comments from dev', 'dev feedback'.

design-review

5
from vltansky/skills

Designer's eye visual audit of a live site — finds typography issues, spacing violations, AI slop patterns, hierarchy problems, interaction state gaps — then fixes them with atomic commits and before/after screenshots. Use when asked to 'audit the design', 'visual QA', 'design polish', 'does this look good', 'check the UI', or 'fix the design'. Proactively suggest when the user mentions visual inconsistencies or wants to polish a live site before shipping.

debug

5
from vltansky/skills

Systematic root-cause debugging for any bug — backend, frontend, logic, integration. Hypothesis-driven investigation with evidence collection. Use when the user says 'debug', 'investigate', 'why is this broken', 'root cause', 'trace this bug', 'figure out why', 'this doesn't work', or 'unexpected behavior'. For frontend-specific runtime debugging with a log server, use /debug-mode instead.

debug-mode

5
from vltansky/skills

This skill should be used when debugging frontend/UI bugs that need runtime evidence. USE THIS SKILL (instead of adding console.log) when you're about to say "add console.log and ask user to check", "open DevTools and tell me what you see", "reproduce the bug and share the output", "check the browser console". Triggers: "debug this", "fix this bug", "why isn't this working", "investigate this issue", "trace the problem", "figure out why X happens", "UI not updating", "state is wrong", "value is null/undefined", "click doesn't work", "modal not showing". Automates log collection server-side - you read logs directly, no user copy-paste needed.

chat-history

5
from vltansky/skills

Search previous AI chat conversations from Cursor IDE and Claude Code by content, affected file, or project. Use when the user asks about previous conversations, wants to find how they solved something before, or needs to recall past AI interactions.

batch

5
from vltansky/skills

Parallel work orchestration — decompose large changes into 5-30 worktree agents that each open a PR. Use when the user says 'batch', 'do this in parallel', 'split into PRs', 'bulk change', 'mass refactor', or wants a sweeping mechanical change across many files.