Team Retro

Engineering retrospective analyzing commit history, work patterns, and code quality metrics. Supports configurable time windows (24h, 7d, 14d, 30d) and comparison mode. Per-contributor analysis with praise and growth suggestions. Streak tracking, focus scores, and trend comparison. Use this skill when a retrospective is requested or at the end of a sprint/week.

5 stars

Best use case

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

Engineering retrospective analyzing commit history, work patterns, and code quality metrics. Supports configurable time windows (24h, 7d, 14d, 30d) and comparison mode. Per-contributor analysis with praise and growth suggestions. Streak tracking, focus scores, and trend comparison. Use this skill when a retrospective is requested or at the end of a sprint/week.

Teams using Team 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/BasharAmso/Bashi/main/.claude/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 Team Retro Compares

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

Frequently Asked Questions

What does this skill do?

Engineering retrospective analyzing commit history, work patterns, and code quality metrics. Supports configurable time windows (24h, 7d, 14d, 30d) and comparison mode. Per-contributor analysis with praise and growth suggestions. Streak tracking, focus scores, and trend comparison. Use this skill when a retrospective is requested or at the end of a sprint/week.

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

# Skill: Team Retro

## Metadata

| Field | Value |
|-------|-------|
| **Skill ID** | SKL-0026 |
| **Version** | 2.0 |
| **Owner** | orchestrator |
| **Inputs** | Git history, TODOS.md, previous retros, DECISIONS.md |
| **Outputs** | Retro narrative, JSON snapshot, STATE.md updated |
| **Triggers** | `RETRO_REQUESTED` |

---

## Purpose

Generate a comprehensive engineering retrospective analyzing commit history, work patterns, and code quality. Designed for builders using Claude Code as a force multiplier — track velocity, celebrate wins, identify growth areas.

---

## Cognitive Mode

**Encouraging Coach.** Be candid but kind. Anchor every observation in actual commits — no vague praise, no generic criticism. Frame improvements as investments, not failures.

---

## Arguments

- `/retro` — default: last 7 days
- `/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

---

## Procedure

### Step 1 — Gather Raw Data

Fetch origin and identify the current user:

```bash
git fetch origin main --quiet
git config user.name
git config user.email
```

The name returned is **"you"** — the person reading this retro. All other authors are teammates.

Run these git commands (all independent, run in parallel where possible):

```bash
# Commits with stats
git log origin/main --since="<window>" --format="%H|%aN|%ae|%ai|%s" --shortstat

# Per-commit test vs production LOC
git log origin/main --since="<window>" --format="COMMIT:%H|%aN" --numstat

# Timestamps for session detection
git log origin/main --since="<window>" --format="%at|%aN|%ai|%s" | sort -n

# File hotspots
git log origin/main --since="<window>" --format="" --name-only | sort | uniq -c | sort -rn

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

# TODOS.md
cat TODOS.md 2>/dev/null || true
```

---

### Step 2 — Compute Metrics

Calculate metrics and present using the summary table, per-author leaderboard, and backlog health formats. Read `SCHEMA.md` in this skill folder for the metrics schema and report format.

---

### Step 3 — Commit Time Distribution

Show hourly commit histogram. Call out: peak hours, dead zones, late-night coding clusters. See `SCHEMA.md` for histogram format.

---

### Step 4 — Work Session Detection

Detect sessions using **45-minute gap** between consecutive commits. Classify into deep/medium/micro sessions and calculate active coding time. See `SCHEMA.md` for session classification thresholds.

---

### Step 5 — Commit Type Breakdown

Categorize by conventional commit prefix (feat/fix/refactor/test/chore/docs). Flag if fix ratio exceeds 50%. See `SCHEMA.md` for histogram format.

---

### Step 6 — Hotspot Analysis

Top 10 most-changed files. Flag:
- Files changed 5+ times (churn hotspots)
- Test files vs production files in the hotspot list

---

### Step 7 — Focus Score

Calculate the percentage of commits touching the single most-changed top-level directory. Higher = deeper focused work, lower = scattered context-switching.

Report: `Focus score: 62% (src/components/)`

---

### Step 8 — Ship of the Week

Auto-identify the single highest-LOC PR or commit set in the window. Highlight it:
- What it was
- LOC changed
- Why it matters (infer from commit messages)

---

### Step 9 — Per-Contributor Analysis

Analyze each contributor's commits, focus areas, commit type mix, session patterns, and test discipline. Give the current user the deepest treatment. For teammates, provide specific praise and one growth opportunity anchored in data. See `SCHEMA.md` for per-contributor analysis fields and formatting rules.

---

### Step 10 — Streak Tracking

Count consecutive days with at least 1 commit:

```bash
git log origin/main --format="%ad" --date=format:"%Y-%m-%d" | sort -u
```

Count backward from today. Report:
- Team shipping streak: N consecutive days
- Your shipping streak: N consecutive days

---

### Step 11 — Week-over-Week Trends (if window >= 14d)

Split into weekly buckets and show trends:
- Commits per week
- LOC per week
- Test ratio per week
- Fix ratio per week

---

### Step 12 — Load History & Compare

Check for prior retros:
```bash
ls -t .claude/project/retros/*.json 2>/dev/null
```

**If prior retros exist:** Load the most recent and calculate deltas. See `SCHEMA.md` for trend comparison format.

**If no prior retros:** Skip comparison. Note: "First retro — run again next week to see trends."

---

### Step 13 — Save Snapshot

```bash
mkdir -p .context/retros
```

Write JSON snapshot with metrics, per-author data, and streak info. Filename: `.claude/project/retros/<YYYY-MM-DD>-<N>.json` (N = sequence number for today).

---

### Step 14 — Write the Narrative

Structure the output using the narrative report structure in `SCHEMA.md`: tweetable summary first, then 11 sections from summary table through habits for next week.

---

### Step 15 — Update STATE.md

Record: retro completed, window, health metrics summary.

---

## Compare Mode

When the user runs `/retro compare`:
1. Compute metrics for current window using `--since`
2. Compute metrics for prior same-length window using `--since` and `--until`
3. Show side-by-side comparison with deltas
4. 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
- Never compare teammates negatively
- Keep total output around 2000-3500 words
- Use markdown tables for data, prose for narrative
- Output directly to conversation — only file written is the JSON snapshot

---

## Constraints

- Use `origin/main` for all git queries (not local main)
- If the window has zero commits, say so and suggest a different window
- Round LOC/hour to nearest 50
- Do not read CLAUDE.md or other framework docs — this skill is self-contained
- All narrative output goes to the conversation, NOT to files (except the JSON snapshot)
- Never modify source code or project files (except `.claude/project/retros/`)

---

## Primary Agent

orchestrator

---

## Definition of Done

- [ ] Raw data gathered from git history
- [ ] Metrics computed and summary table produced
- [ ] Time distribution and session analysis completed
- [ ] Commit type breakdown completed
- [ ] Hotspot analysis completed
- [ ] Focus score and Ship of the Week identified
- [ ] Per-contributor analysis completed (if team)
- [ ] Streak tracked
- [ ] Prior retro loaded and compared (if exists)
- [ ] JSON snapshot saved to `.claude/project/retros/`
- [ ] Narrative written to conversation
- [ ] STATE.md updated

## Output Contract

| Field | Value |
|-------|-------|
| **Artifacts** | Retro narrative (output to conversation), `.claude/project/retros/<date>.json` (snapshot) |
| **State Update** | `.claude/project/STATE.md` — mark task complete, log retro window and health metrics |
| **Handoff Event** | `TASK_COMPLETED` (retrospective complete) |

Related Skills

Supply Chain Audit

5
from BasharAmso/Bashi

Audit the dependency supply chain for security risks beyond what `npm audit` or `pip audit` catches. Analyzes dependency health, maintainer trust signals, typosquatting risk, and transitive dependency exposure.

SEO Audit

5
from BasharAmso/Bashi

Audit web pages for search engine optimization: meta tags, heading hierarchy, structured data, image optimization, mobile-friendliness, and content quality. Complements SKL-0013 (Growth & Distribution) by validating what was built.

Pitch Deck

5
from BasharAmso/Bashi

Create a structured pitch deck outline for investors, stakeholders, or partners. Covers problem, solution, market, traction, team, and ask. Natural output after PRD + Problem Stress Test validation.

Launch Checklist

5
from BasharAmso/Bashi

Pre-launch validation covering everything deployment (SKL-0021) doesn't: analytics, error tracking, social meta, legal pages, email setup, DNS, SSL, and go-live readiness. Produces a launch readiness report with pass/fail checklist. Use this skill before going live on any project.

Insecure Defaults Detection

5
from BasharAmso/Bashi

Detect insecure default configurations, hardcoded credentials, fail-open security patterns, and dangerous default values in application code and configuration files. Complements SKL-0015 (Security Audit) by focusing on configuration-level vulnerabilities that dependency scanners miss.

Differential Security Review

5
from BasharAmso/Bashi

Security-focused review of code changes using git diff analysis. Identifies security implications of recent modifications — new attack surfaces, removed protections, changed auth logic, and risky refactors. Complements SKL-0016 (Code Review) with a security lens on diffs.

Copywriting

5
from BasharAmso/Bashi

Write conversion-focused copy using proven frameworks (AIDA, PAS, BAB). Produces headlines, CTAs, landing page copy, email sequences, and micro-copy. Ensures copy matches brand voice and target audience.

Competitor Analysis

5
from BasharAmso/Bashi

Structured competitor research: features, pricing, positioning, gaps, and differentiation strategy. Feeds into PRD Writing (SKL-0004) and Problem Stress Test (SKL-0027) with better market context.

UX Design

5
from BasharAmso/Bashi

Design user experiences including wireframes, flows, and interaction patterns. Use this skill when UX design work is requested, including onboarding flows and interface layouts.

User Acceptance Testing

5
from BasharAmso/Bashi

Structured QA testing with four modes: diff-aware (auto-scoped to branch changes), full (systematic exploration), quick (30-second smoke test), and regression (compare against baseline). Produces health score, structured reports, and actionable bug lists. Use this skill when UAT is requested or a feature is ready for acceptance testing.

Token Audit

5
from BasharAmso/Bashi

Audit the current project for token waste patterns. Produces a Token Health Report with scored findings and actionable fixes. Use this skill when token usage feels high, sessions are hitting limits, or before optimizing costs.

Test Writing

5
from BasharAmso/Bashi

Write automated tests for existing or new functionality. Use this skill when tests are requested, including unit tests, integration tests, and end-to-end tests.