From claude-retrospective
Performs comprehensive analysis of Claude Code sessions, examining git history, conversation logs, code changes, and gathering user feedback to generate actionable retrospective reports with insights for continuous improvement.
npx claudepluginhub bitwarden/ai-plugins --plugin claude-retrospectiveThis skill uses the workspace's default tool permissions.
**Session Analytics**: [`contexts/session-analytics.md`](contexts/session-analytics.md) - Provides comprehensive framework for analyzing sessions, including data sources, metrics, and analysis methods.
Analyzes Antigravity AI coding sessions for root causes, scope deltas, rework patterns, hotspots, and prompt/repo health improvements with evidence-based reports.
Analyzes Claude Code session logs to extract tool usage stats, thinking blocks, error patterns, debug trajectories, and generate actionable productivity recommendations. Provides cc-session CLI for overviews, timelines, searches.
Analyzes Claude Code sessions to improve CLAUDE.md instructions and capture learnings. Quick mode suggests CLAUDE.md tweaks; deep mode reviews problems, patterns, preferences, and gaps.
Share bugs, ideas, or general feedback.
Session Analytics: contexts/session-analytics.md - Provides comprehensive framework for analyzing sessions, including data sources, metrics, and analysis methods.
Retrospective Templates: templates/retrospective-templates.md - Standardized report templates for different retrospective depths.
Systematically gather data from all available sources:
Calculate measurable metrics:
Identify patterns and insights:
Create structured retrospective report using appropriate template:
Before gathering data, determine the appropriate analysis depth:
Check session size:
# Count recent commits
git log --oneline --since="1 hour ago" | wc -l
# List session log files with metadata
${CLAUDE_PROJECT_DIR}/.claude/skills/extracting-session-data/scripts/list-sessions.sh --sort date | head -5
Suggest depth to user based on metrics:
Let user override: "Based on [X commits, Y MB logs], I recommend a [MODE] retrospective (~Z minutes). Does this work for you, or would you prefer a different depth?"
Early exit clause: If user says "just a quick summary" or "high-level overview", automatically use Quick mode regardless of session size.
Execute data collection based on confirmed depth mode:
Quick Mode:
git diff <start>..<end> --stat only (no full diffs)extracting-session-data skillStandard Mode:
extracting-session-data skillComprehensive Mode:
extracting-session-data skill, may read full logs if <500 linesUse the analyzing-git-sessions skill to collect git data:
Quick Mode: Request "concise" output (stats only, no diffs) Standard Mode: Request "detailed" output for key files Comprehensive Mode: Request "code review" format for full analysis
Invoke skill with session timeframe:
Skill: analyzing-git-sessions
Input: "<start-time> to <end-time>" or "<start-commit>..<end-commit>"
Depth: [concise|detailed|code-review] based on retrospective mode
The skill will return structured git metrics needed for retrospective analysis.
Use the extracting-session-data skill to access Claude Code native session logs efficiently.
List Available Sessions:
# List all sessions with metadata (size, lines, date, branch)
${CLAUDE_PROJECT_DIR}/.claude/skills/extracting-session-data/scripts/list-sessions.sh
Check Session Size:
# Get statistics for specific session
${CLAUDE_PROJECT_DIR}/.claude/skills/extracting-session-data/scripts/extract-data.sh \
--type statistics --session SESSION_ID
Extract Data Based on Session Size and Mode:
Quick Mode (or any session >2000 lines):
# Extract only statistics and errors
extract-data.sh --type statistics --session SESSION_ID
extract-data.sh --type errors --session SESSION_ID --limit 10
Standard Mode (sessions 500-2000 lines):
# Extract metadata, statistics, tool usage, and errors
extract-data.sh --type metadata --session SESSION_ID
extract-data.sh --type statistics --session SESSION_ID
extract-data.sh --type tool-usage --session SESSION_ID
extract-data.sh --type errors --session SESSION_ID
Comprehensive Mode (sessions <500 lines):
# Extract all available data
extract-data.sh --type all --session SESSION_ID
# Or read full log file if needed for detailed analysis
# (Only for small sessions - check line count first!)
Multi-Session Analysis:
# Filter sessions by criteria
filter-sessions.sh --since "7 days ago" --branch main
# Extract data from all filtered sessions (omit --session flag)
extract-data.sh --type statistics # Runs on all sessions
Synthesize Extracted Data: After extraction, synthesize data into compact summary (max 200 lines) before continuing to analysis.
Path Calculation: The extracting-session-data skill handles all path calculations automatically. Session logs are stored in ~/.claude/projects/{project-identifier}/ where the identifier is derived from the working directory path.
Examine changed files, tests, documentation (depth-appropriate)
Prompt for direct feedback on session experience (question count based on depth mode)
If sub-agents were used, invoke them to gather their perspective (Standard/Comprehensive modes only)
Apply session-analytics.md framework:
Synthesize analysis into actionable insights:
Use appropriate template from retrospective-templates.md:
Present report and ask:
If the retrospective identifies areas for improvement in Claude or Agent interactions:
After the retrospective report is created and validated:
~/.claude/projects/{project-dir}/{session-id}.jsonl"${CLAUDE_PROJECT_DIR}/.claude/skills/retrospecting/reports/Use file:line_number format when referencing specific code locations.
Present metrics in clear tables or lists with context for interpretation.
Each recommendation should include:
When sub-agents were used during the session:
Invoke each sub-agent that participated with prompts like:
Incorporate sub-agent feedback into retrospective:
Monitor context usage throughout retrospective to prevent overflow:
High Budget (>100K tokens remaining):
Medium Budget (50-100K tokens remaining):
Low Budget (<50K tokens remaining):
If approaching context limit during analysis:
Don't:
Do:
When sibling Bitwarden plugins are installed, retrospectives gain specialist analysis:
After collecting git diffs from the session:
Skill(detecting-secrets) against the session's git diffs to warn if secrets were inadvertently committedSkill(analyzing-code-security) to flag potential vulnerabilities in the retrospective reportSkill(classifying-review-findings) to categorize the session's changes using the CRITICAL/IMPORTANT/DEBT/SUGGESTED framework, giving users a clear picture of what needs attentionThese skills are optional. If unavailable, proceed with standard retrospective analysis.
A good retrospective should:
Directory: ${CLAUDE_PROJECT_DIR}/.claude/skills/retrospecting/reports/
Filename format: YYYY-MM-DD-session-description-SESSION_ID.md
Example path: ${CLAUDE_PROJECT_DIR}/.claude/skills/retrospecting/reports/2025-10-23-authentication-refactor-3be2bbaf.md