Analyze Claude Code sessions in three expert modes — Handoff Document (exhaustive context extraction for the next developer or session), Error Forensics (complete inventory of warnings and errors Claude ignored or deferred), and Chronological Summary (dense technical timeline with key outcomes). Use when the user wants a session handoff, asks what happened, wants to know what errors were missed or ignored, requests a retrospective or debrief, mentions session history or session analysis, or wants to understand past work in the current repo. Do not use for live debugging or code review.
From devops-toolsnpx claudepluginhub terrylica/cc-skills --plugin devops-toolsThis skill is limited to using the following tools:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
You MUST use AskUserQuestion TWICE before spawning an Agent. Ask for the goal first, then the time range. Then spawn the Agent with resolved parameters.
Use AskUserQuestion to present exactly these three choices:
Which analysis mode?
- Handoff Document — Exhaustive context for the next developer or Claude session continuing this work. Extracts every decision, file, command, gotcha, incomplete item, and next step. Multiple MiniMax chunks if needed for full coverage.
- Error Forensics — Complete inventory of every warning, error, deprecation, failed command, and anomaly that occurred — especially ones Claude acknowledged but ignored or deferred. Full verbatim detail with file paths and commands.
- Chronological Summary — Dense technical timeline of everything that happened: every decision, change, problem, discovery, and outcome in turn order. As concise as possible while capturing maximum events.
Use AskUserQuestion to ask:
How far back should sessions be included?
- 48 hours (default — last 2 days)
- 1 week (168 hours)
- 1 month (720 hours)
- Custom — enter any natural language like "3 days", "2 weeks", "5 hours", "since Monday"
Convert their answer to hours for --since <N>:
723365Agent(
description: "Session analysis - Goal <N>: <name>",
prompt: "Run session analysis for the current project. Execute:
bun run $HOME/eon/cc-skills/plugins/devops-tools/scripts/session-debrief.ts \\
--goal <1|2|3> \\
--since <hours> \\
--verbose
Print all output exactly as-is. Do not filter or summarize.
If the command fails, show the full error and suggest troubleshooting.",
run_in_background: true
)
Do NOT add --shots — it only applies to legacy 50-perspectives mode.
When the Agent returns, present the output directly to the user with no additional summarization — the MiniMax output IS the result.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
The most comprehensive output mode. Extracts everything the next developer or AI session needs to continue work without asking questions.
Output structure:
If the session history spans more than MiniMax's context window (~260K tokens), the script automatically chunks by session and produces multiple parts.
Every warning, error, and anomaly — especially the ones Claude moved past.
Each finding includes:
Dense technical timeline: one bullet per significant event, in turn order.
The script automatically finds all sessions for the current project (derived from the working directory) modified within the time window:
~/.claude/projects/<project-key>/ for .jsonl files--since windowThe project key is the absolute path with / replaced by -. For example:
/Users/terryli/eon/cc-skills → -Users-terryli-eon-cc-skills
# Focused goal mode — recommended
bun run $HOME/eon/cc-skills/plugins/devops-tools/scripts/session-debrief.ts \
--goal 1 --since 48 # Handoff: last 48 hours
--goal 2 --since 168 # Error forensics: last week
--goal 3 --since 720 # Summary: last month
# Debug: show extracted payload without calling MiniMax
bun run $HOME/eon/cc-skills/plugins/devops-tools/scripts/session-debrief.ts \
--goal 1 --since 48 --dry --verbose
# Override project dir (if auto-detection fails)
bun run $HOME/eon/cc-skills/plugins/devops-tools/scripts/session-debrief.ts \
--goal 2 --since 48 --project-dir ~/.claude/projects/-Users-foo-myrepo
# Skip parent chain tracing (faster, current window only)
bun run $HOME/eon/cc-skills/plugins/devops-tools/scripts/session-debrief.ts \
--goal 3 --since 48 --no-chain
# Legacy 50-perspectives mode (single session UUID)
bun run $HOME/eon/cc-skills/plugins/devops-tools/scripts/session-debrief.ts \
<session-uuid>
| Setting | Source | Default |
|---|---|---|
| MiniMax API key | ~/.claude/.secrets/ccterrybot-telegram (MINIMAX_API_KEY=...) | Required |
| Model | MINIMAX_MODEL env var (global mise config) | MiniMax-M2.7-highspeed |
| Max output tokens | Hardcoded | 16384 per call |
| Context budget | Hardcoded | 890K chars (~243K tokens) |
| Default time window | --since | 48 hours |
| Session chaining | --no-chain to disable | Enabled |
# Sessions for current project (key = cwd with / replaced by -)
ls -lt ~/.claude/projects/$(pwd | tr '/' '-')/*.jsonl 2>/dev/null | head -10
# All projects, most recent first
ls -lt ~/.claude/projects/*/*.jsonl 2>/dev/null | head -20
| Issue | Cause | Fix |
|---|---|---|
Cannot determine project dir | CWD not a known project | Use --project-dir ~/.claude/projects/<key> |
No sessions found | No sessions in time window | Increase --since (e.g., --since 336 for 2 weeks) |
MINIMAX_API_KEY not found | Missing secrets file | Check ~/.claude/.secrets/ccterrybot-telegram |
context window exceeds | Single session too large | Use --dry --verbose to check size; try --no-chain |
| Goal 1 produces multiple parts | Sessions exceeded single budget | Expected behavior — multiple chunks = maximum coverage |
After this skill completes, reflect before closing the task:
Do NOT defer. The next invocation inherits whatever you leave behind.