session-story
Generate a self-contained HTML "session story" that links each prompt in a vibe coding session to the file edits it caused, with a review timeline, a GitHub-style diff view, and a plain-language narrative. Use when the user asks for a session recap, changelog, review artifact, "what did Claude change", or wants to share a summary of a Claude Code session with a teammate or stakeholder.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
실행 점수 미검증
설치 방법 보기포함된 파일(38)
- SKILL.md10.1 KB
- .claude-plugin/icon.png10.8 KB
- .claude-plugin/marketplace.json1013 B
- .claude-plugin/plugin.json582 B
- bin/story.mjs19.1 KB
- LICENSE1.0 KB
- package.json390 B
- schemas/story.schema.json43.9 KB
- src/ir/commands.mjs3.6 KB
- src/ir/cross-index.mjs2.0 KB
- src/ir/dependencies.mjs5.6 KB
- src/ir/disk-base.mjs2.4 KB
- src/ir/file-state.mjs3.3 KB
- src/ir/git-edits.mjs16.0 KB
- src/ir/git-state.mjs3.4 KB
- src/ir/metrics.mjs13.6 KB
- src/ir/selectors.mjs1.4 KB
- src/ir/trace.mjs8.9 KB
- src/ir/validate.mjs6.0 KB
- src/render/diff.mjs7.8 KB
- src/render/full-view.mjs1.9 KB
- src/render/hunk-html.mjs4.2 KB
- src/render/icons.mjs3.6 KB
- src/render/inert.mjs984 B
- src/render/lenses.mjs29.6 KB
- src/render/library.mjs35.1 KB
- src/render/markdown.mjs8.5 KB
- src/render/metrics-blocks.mjs12.3 KB
- src/render/report.mjs10.4 KB
- src/render/story-data.mjs4.8 KB
- src/render/template.mjs56.2 KB
- src/render/theme.mjs5.5 KB
- src/transcript/bash-edits.mjs5.8 KB
- src/transcript/claude-code.mjs30.4 KB
- src/transcript/live.mjs1.5 KB
- src/transcript/locate.mjs7.8 KB
- src/transcript/parse.mjs903 B
- src/transcript/paths.mjs1.2 KB
SKILL.md(원문)
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Session Story
Turn the current (or a named) Claude Code session transcript into one shareable HTML file: git tells you what changed, this tells you what happened.
<skill-dir> below is the directory that contains this SKILL.md (where the
skill was installed). Run every command from the user's project directory,
not from <skill-dir>, so the session is found by the project's cwd.
When to use
The user asks for a session recap, a changelog of what Claude did, a review artifact for a teammate, or literally "make a story of this session" / "/session-story".
Steps
-
Extract. Run the CLI to pull the session transcript (and any subagent transcripts) into a Story IR JSON file:
node <skill-dir>/bin/story.mjs extract -o <scratch>/story.json --briefUse
--session <id>for a specific session or omit it (defaults to--latest) for the current one. Pass--cwd <dir>if the project differs from the current working directory. Sessions split by/clearare joined into one story automatically (--no-chainopts out), so the brief may carry turns from before the clear —session.chainlists the session ids included, oldest first. The--briefflag also prints a projection to stdout — read only this projection, never the full story.json's hunks. It carries, per turn:prompt,edits[].{rel, kind, stats},commands[].{command, category, ok, exit_code},replies(Claude's text replies, the last one longest),errors[].{tool, target, message}, andplan.{approved, excerpt}when a plan was proposed. An edit carryingcombined_into: Nis a file this turn changed through the shell whose diff git could only keep as the session's net change, shown on turn N — the turn did change code, so summarize it as a change, with zero stats rather than no edit. At the top level the brief carriesreport.git(branch and commit range, already extracted) andreport.dependencies(manifest/install/config changes, already extracted), plushints— a roughoutcomeguess from the last test/lint/build command andfailed_validationsexcerpts to help you write resolutions. The brief also carriesmetrics(execution, code, validation, reads, usage — deterministic counts withnullfor anything the transcript did not record),environment(agent version and model ids) and, per turn,duration_ms,tool_calls,output_tokens,share(the turn's fraction of the session's output tokens, input tokens and duration, subagents included),skills(the skills the turn loaded) andcache_breaks(API calls that re-sent over 100k input tokens without the prompt cache).metrics.execution.active_msis the session's time without idle gaps over five minutes;metrics.usageaddscache_read_shareandcache_breaks. Use them to informreport.outcomeandoutcome_note; never restate or recompute them, and never write a number the brief shows asnull. When one turn clearly dominated, you may say so in words ("most of the session went into the redesign"), never as a number or a cost. The same goes for skills and cache breaks: a turn summary may say "brainstormed the design first" or "re-read the whole context after a compaction", but the page already shows the names and counts. -
Summarize and write the report. Using the brief projection from step 1, write directly into
<scratch>/story.jsonwith the Edit tool (touch nothing else in the file):session.title: a short, plain-language name for the session — at most 60 characters, no trailing period. Name what the session did ("Session library for stories", "Fix flaky auth test"); never paste or truncate the first prompt. This is the page heading. The brief'ssession.ai_titleis the harness's own name for the session — good source material, but rewrite it when it is vague or off.session.summary: one or two sentences, at most 240 characters — the description under the heading, also shown in the Report lens and the library index. Lead with the outcome ("X now does Y"), name what was left out if anything, and don't restate the intent; the longer framing belongs inreport.plan.turns[N].summary: one sentence of intent per turn, in the same order as the brief output.turns[N].answer: for every turn whose briefrepliesis not empty, a short summary (1-3 sentences, at most 400 characters) of what Claude answered or reported back to that prompt — the findings, the result, or the question it asked — written fromreplies. Review and Story show it as Claude's output and fold the original replies away, so it must stand on its own. Report only what the replies say; leave it out for turns with no replies.report.plan: 2-4 sentences on what the session set out to do. Use anyturns[N].plan.excerptas source material when present.report.decisions: notable technical decisions worth calling out (e.g. "used the existing service instead of a new endpoint"). Empty array if none stand out.report.outcome: one ofcompleted,partial,failed,blocked— your judgement call, informed byhints.outcomeand whether anyerrors[]or failed commands were left unresolved.report.outcome_note: optional one-liner, most useful when the outcome isn'tcompleted(what it's blocked on, what's left).errors[N].resolution(nested under each turn): fill in only for errors that mattered to the outcome — how it was fixed, or why it was left as-is. Leavenullfor noise (e.g. agrepthat found nothing).
-
Validate.
node <skill-dir>/bin/story.mjs validate <scratch>/story.json --strictIf this reports missing summaries or report fields, go back to step 2.
-
Render.
node <skill-dir>/bin/story.mjs render <scratch>/story.json --openThis writes a self-contained HTML file (no server, no dependencies) with four switchable views — Review (timeline + a summary of Claude’s output, the original replies folded + diff, for you), Diff (file tree, GitHub-style, for a teammate), Story (narrative cards with Claude's output, for a stakeholder), Report (plan, commands, tests, errors, decisions, dependencies, git state, outcome, and the session metrics with token usage) — and opens it.
The page lands in the project's
.session-stories/library as<date>-<session-id>-<slug>.html, so each session keeps its own file instead of overwriting the last one, and a regenerated.session-stories/index.htmllists every session with a search box, time period filters, and token and cost totals. Each page also gets a session switcher in its nav. Re-rendering the same session overwrites its file and refreshes its index entry. Pass--library <dir>for another folder, or-o <file>/--no-libraryfor a single standalone page with no library around it. On the index page, each card's hide button takes a session out of the list and the switcher in that browser; the page stays on disk, and "Hidden (N)" brings it back. A session that is still running shows as Live and can't be hidden. Only when the user asks you to delete sessions for real, runnode <skill-dir>/bin/story.mjs delete <session-id>...(or--all). It deletes their pages and rewrites the index; an id prefix of 4 or more characters is enough. It refuses a running session unless--forceis passed, and--allkeeps running sessions. -
Report both paths — the story page and
.session-stories/index.html— and the header numbers (turns, files, lines added/removed, outcome) to the user. If the story has token usage, report output tokens, the cost when recorded, and which turn used the most output tokens (the Report tab's "Where it went" ranks them). -
Optional: markdown. If the user asks for a PR description or a handoff for a fresh session, run
node <skill-dir>/bin/story.mjs export <scratch>/story.json [--template handoff]and give them the output (or pipe it to
pbcopy). Every line comes from story.json; paste it as is and add no claims of your own. Files outside the project are left out unless--all-filesis passed.
Limits
- Claude Code sessions only (v1). Codex/Cursor/OpenCode are out of scope.
Edit,Write, andNotebookEditcalls are read from the transcript. Changes made throughBash(sed -i, a heredoc script, a formatter) carry no diff there, so they are recovered from git instead: the tree is compared from the commit the session started on through to the working tree, and each change is credited to the turn whose commands account for it. Those edits are labelled on the page, and come with git's limits — a file edited again after the session shows both changes, and a commit made during the session by someone else looks like the session's own. Pass--no-gittoextractto skip the git pass entirely (this also skipsreport.git;report.dependenciesis still extracted).report.plan,report.decisions,report.outcome,report.outcome_note, anderrors[].resolutionare Claude's judgement calls, not something the extractor can verify — write them honestly from what the brief shows, including when the outcome isn't a clean success.- A story page copied out of
.session-stories/loses only the "All sessions" link and the switcher (they stay hidden when the siblingsessions.jsis missing); everything else still works fromfile://. - Requires Node.js 18.18+ and no other dependencies.
리뷰
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
댓글
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.