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 skills add https://github.com/bitwarden/ai-plugins --skill retrospecting
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:
# 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
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 all sessions with metadata (size, lines, date, branch)
${CLAUDE_PROJECT_DIR}/.claude/skills/extracting-session-data/scripts/list-sessions.sh
# Get statistics for specific session
${CLAUDE_PROJECT_DIR}/.claude/skills/extracting-session-data/scripts/extract-data.sh \
--type statistics --session SESSION_ID
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!)
# 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
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
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.
Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.
Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.
Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits
Prompt for generating an AGENTS.md file for a repository
Take bitwarden/retrospecting from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.