Stack-Unwind Session Review

VerifiedCaution

Generates a tree of completed tasks and open items from a conversation session, sized by the measured thread shape. Useful for reviewing long working sessions.

Sby Skills Guide Bot
ProductivityIntermediate
8/2/2026
Claude Code
#session-review#retrospective#context-management#open-loops#task-tracking

Recommended for

Automated summary

Rebuilds a past working session as a stack-unwind tree: tasks that were actually finished, struck through, and everything raised then abandoned, nested at the depth where it happened.

Strengths

  • Tree size is computed by script from the measured prompt count (1.5 × √prompts, clamped 5–30), so output stays consistent across sessions instead of defaulting to an arbitrary length
  • The reviewing instance has no access to the original conversation, so it judges from the transcript alone without assuming project context
  • The spine explicitly handles hard cases: interruptions, subagent returns, compaction summaries and dead branches (with the live thread taking precedence)
  • Tools are limited to reading and the census.sh script, so the review cannot mutate the session

Limitations

  • Tightly coupled to Claude Code: relies on CLAUDE_SESSION_ID, CLAUDE_SKILL_DIR, context fork and the general-purpose agent
  • Transcript entries are truncated (800 chars for user prompts, 400 for assistant replies), so nuance in long messages can be lost
  • The node cap (30 max) and depth limit of 3 force compression of very long sessions, losing some detail
When to use it

Use it at the end of a long working session to see what actually got done and which threads are still hanging.

When not to use it

Skip it for short linear sessions, or outside Claude Code where neither the session id nor the census script is available.

Security analysis

Caution
Quality score84/100

The skill is a read-only analysis workflow: it invokes one bundled script with a scoped Bash allowlist, reads a locally generated transcript spine, and emits markdown. Nothing in it deletes data, contacts the network, or moves secrets off-machine. The residual concern is mechanical rather than malicious: unquoted `$ARGUMENTS` injected into a shell command is a command-injection shape, so a human should glance at census.sh, but the declared intent is legitimate and low-risk.

Findings
  • •Runs a bundled shell script via Bash on every invocation; allowlist is scoped to `bash ${CLAUDE_SKILL_DIR}/census.sh:*` but the scope still permits arbitrary arguments after the script path
  • •`$ARGUMENTS` is interpolated unquoted into the shell command line (`census.sh ${CLAUDE_SESSION_ID} $ARGUMENTS`), so user-supplied text could be interpreted as shell syntax rather than a filename/session id
  • •Reads a `.jsonl` conversation transcript (possibly from a path the user supplies), which may contain sensitive session content, though it stays local with no network egress
  • •No exfiltration, no destructive commands, no obfuscation, no safety-disabling instructions in the SKILL.md itself
How this analysis is made

Examples

Review current session
/opens
Review a specific transcript
/opens ~/.claude/projects/-Users-me-app/9f3c1a2b-session.jsonl
Review by session id
/opens 9f3c1a2b-4d7e-4c11-8a55-2e6b0f1d3c90

description: Stack-unwind review of this conversation - a tree of main tasks done (struck through) and every open left behind at the depth it was abandoned, sized by the thread's measured shape, never by feel. Optional argument - a .jsonl path or session id to review a different session. argument-hint: [session.jsonl | session-id] disable-model-invocation: true context: fork agent: general-purpose background: false allowed-tools: Read, Bash(bash ${CLAUDE_SKILL_DIR}/census.sh:*)

/opens - stack-unwind review

You are a fresh instance with NO access to the conversation you are about to review. That is by design: you must not assume anything about the user, the project, or what a "normal" conversation looks like.

The concept: long working sessions are depth-first. The user starts with an objective, drills into one aspect (leaving opens behind), drills deeper inside that, and so on - a stack, not a list. Your job is to reconstruct the whole thread as a stack-unwind tree: the main tasks that actually got done, checked and struck through, and everything raised-but-never-resolved as unchecked opens, nested at the stack depth where each was abandoned.

Step 1 - census (deterministic, run exactly this)

bash ${CLAUDE_SKILL_DIR}/census.sh ${CLAUDE_SESSION_ID} $ARGUMENTS

It prints SESSION, USER_PROMPTS, SPAN, BUDGET, SPINE (a file path), SPINE_BYTES. If it prints ERROR, stop and report that error text as your final message.

BUDGET is the sizing law and it is not yours to adjust, in either direction. Why it exists: opens are created by descents, and descents happen at user prompts - not at tokens, which are dominated by tool noise. So the tree size is computed from the measured prompt count (round(1.5 * sqrt(USER_PROMPTS)), clamped 5..30) by the script, before any model is involved. A zero-knowledge instance like you would otherwise default to "about a page" no matter the thread; the computed budget is what makes a 15-prompt evening yield 6 nodes and a 5-day monster yield 25, consistently, on every run.

Step 2 - read the spine

Read the SPINE file completely (use offset/limit chunks if it is large). It is the conversation reduced to plain chronological text:

  • [USER <timestamp>] - a user prompt (truncated to 800 chars)
  • [AI] - an assistant text reply (truncated to 400 chars)
  • [INTERRUPTED] - the user cut the assistant off mid-turn; a frame likely got popped without unwinding - strong open signal nearby
  • [TASK-RESULT] - a background subagent returned; its findings may contain deferred items
  • [COMPACTED SUMMARY <date>] - condensed earlier history; treat its contents as thread events
  • [USER dead-branch <timestamp>] / [AI dead-branch] - content from an abandoned or rewound timeline: the user backtracked and the thread continued differently. Real work and real opens can live there, but the live thread wins on any conflict, and nothing from a dead branch counts as done unless the live thread confirms it

Step 3 - build the tree

  1. First enumerate ALL candidate opens internally, end to end. Their count is K.
    • An open is anything raised but never resolved later in the thread: a deferred fix or rename, a "later/TODO", a question asked and never answered, an unverified claim ("should work"), a rabbithole abandoned mid-descent, a "we should also X" nobody did, next-steps proposed at the close and never picked up.
    • NOT an open: anything resolved later in the thread (render it done or omit it), transient debugging, plans that were superseded.
  2. Rank candidates by "would the user still care today". Recency, explicit user words ("later", "don't do X now"), and blocked-on-user gates rank high; stale trivia dies.
  3. Build the tree under these hard constraints:
    • max BUDGET nodes TOTAL (done + open combined), max depth 3, one line per node
    • top level = the thread's main tasks in chronological order
    • done: - [x] ~~task~~ - 3-6 word outcome
    • open: - [ ] item (MM-DD) with the date hint when useful
    • nesting mirrors the drill-down stack: an open left while inside sub-task B of task A nests under A > B
    • telegraphic but readable - no invented codenames, no abbreviations the tree itself doesn't explain

Step 4 - output

Your final message must be EXACTLY this raw markdown and nothing else - no preamble, no closing remarks, no code fence around it:

## <invented 4-8 word thread title> - <USER_PROMPTS> prompts, <SPAN>
<the tree>
_pruned: kept <nodes-shown-as-open> of <K> candidate opens_

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/stack-unwind-session-review-msba3n5v/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/stack-unwind-session-review-msba3n5v' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/stack-unwind-session-review-msba3n5v/download' --output '.skill-downloads/stack-unwind-session-review-msba3n5v/SKILL.md.part' && mv '.skill-downloads/stack-unwind-session-review-msba3n5v/SKILL.md.part' '.skill-downloads/stack-unwind-session-review-msba3n5v/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Bash(bash ${CLAUDE_SKILL_DIR}/census.sh:*)

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/stack-unwind-session-review-msba3n5v/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills