ワンクリックで
session-notes
Internal skill — not invoked directly. Use /session-status, /session-persist, or /session-handoff instead.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Internal skill — not invoked directly. Use /session-status, /session-persist, or /session-handoff instead.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | session-notes |
| description | Internal skill — not invoked directly. Use /session-status, /session-persist, or /session-handoff instead. |
This skill captures session context — discoveries, decisions, deferred work, assumptions, edge cases — and either displays a debrief summary, persists findings to plan files, or generates a resumption prompt for the next session.
When NOT to use: Quick one-off tasks with no plan file, trivial changes that produced no decisions or discoveries.
This skill operates in three modes, determined by which command invokes it:
| Mode | Command | Writes files | Shows summary | Asks permission |
|---|---|---|---|---|
status | /session-status | No | Yes | No |
persist | /session-persist or hook | Yes | Yes | Yes (manual) / No (hook) |
handoff | /session-handoff | No | No (outputs prompt) | No |
Mode detection: The invoking command or hook determines the mode. /session-status = status, /session-persist = persist (manual), /session-handoff = handoff. When invoked by the session-checkpoint hook (deny-with-feedback), the mode is persist (automatic) — skip the wizard and write directly.
CRITICAL: This phase is the same depth for all three modes. Do not take shortcuts.
Scan conversation context, git state, task lists, and plan files. Extract:
| Category | Source | What to look for |
|---|---|---|
| Progress | Commits on branch, completed tasks | What was accomplished this session |
| Discoveries | Conversation | Edge cases, surprises, learnings, things that worked unexpectedly |
| Design changes | Plan file vs. actual implementation | Where implementation diverged from the plan and why |
| Gaps | Conversation, code | Unresolved questions, untested paths, inconsistencies |
| Assumptions | Conversation | Decisions made without verified basis — flag as verified/not verified |
| Patterns | Conversation, commits | Recurring themes (e.g., "4 of 6 fixes were null guards — systemic issue?") |
| Edges left open | Conversation, code | Known unhandled scenarios in "completed" work |
| Future work | Conversation | Deferred items, out-of-scope parking lot, different sprint/ticket |
| Next steps | Conversation, plan | Ordered todo for continuing the current work |
Get branch context:
BRANCH=$(git branch --show-current)
MERGE_BASE=$(git merge-base master HEAD 2>/dev/null || git merge-base main HEAD 2>/dev/null)
Get commit history for this branch:
git log "$MERGE_BASE"..HEAD --format="%h %s" --reverse
Get changed files:
git diff --name-only "$MERGE_BASE"..HEAD
Find matching plan file(s):
docs/plans/*.md for files matching branch name or ticket IDfeature/SG-1234-user-auth, search for files containing "SG-1234" or "user-auth"Scan conversation for all categories above
Compare plan vs reality:
Don't rely on Claude memory. Don't summarize lightly. Dump every piece of relevant knowledge. If in doubt, include it.
This is context-wipe-proof documentation. Write as if the next reader has zero context and no access to this conversation.
status (Read-Only Debrief)After completing the analysis phase, display the catch-up summary to the user. Do NOT write any files.
This mode is faster than persist because it skips the file-handling leg (no need to read existing plan file structure, compose edits, or commit).
Display the summary using the format in Section 5.
persist (Write to Plan Files)After completing the analysis phase, persist the findings to files.
/session-persist)Where should I save the session findings?
○ Append to plan — Add to existing plan file: {matched file} (only show if plan file was matched)
○ New note — Create docs/plans/YYYY-MM-DD-session-notes-{branch}.md
○ Skip — Cancel without writing
docs/plans/YYYY-MM-DD-session-notes-{branch}.mdDo NOT use a fixed message. Generate the commit message from the content:
docs: Description conventiondocs: Document token refresh strategy change and SAML deferraldocs: Add session findings — null guard pattern, Redis assumptiondocs: Update plan with 3 open edge cases and deferred work itemsAfter successful persist and commit, create a marker file:
SANITIZED_BRANCH=$(echo "$BRANCH" | sed 's#/#%2F#g') # percent-encode "/" (feat/x ≠ feat-x)
mkdir -p ".claude/sessions/${SANITIZED_BRANCH}"
date -u +"%Y-%m-%dT%H:%M:%S%z" > ".claude/sessions/${SANITIZED_BRANCH}/session-persist-done"
This marker tells the session-checkpoint hook that documentation has been updated for this branch.
Display the catch-up summary using the format in Section 5.
handoff (Generate Resumption Prompt)After completing the analysis phase, generate a ready-to-paste prompt for starting a fresh session. Do NOT write files.
Output the prompt inside a code block so the user can copy it:
Here's your resumption prompt for the next session:
```
I'm continuing work on {branch}.
Read the implementation plan at {plan file path}
— it was {updated with session notes from the last session | last updated on YYYY-MM-DD}.
Status: {N}/{M} tasks complete. {summary of what's done and what remains}.
Key context:
- {deviation from plan, if any}
- {important decision made}
- {blocker or dependency, if any}
Start with: {concrete file path} — {what to do}.
Run: {exact command}
```
/session-persist)Used by both status and persist modes. Displayed to the user, NOT written to files.
## Session Debrief — {branch}
> {N}/{M} tasks done · {X} queued · {Y} blocked · Plan drift: {none|minor|significant}
### Plan vs Reality
| Task | Plan | Actual | Δ |
|------|------|--------|---|
| {task name} | {what plan said} | {what actually happened} | ✓/~/✗/· |
`✓ done` · `~ adapted` · `✗ deferred` · `· queued`
### What actually happened
**{Key change 1}** — {tight prose explaining why, not just what}
**{Key change 2}** — {explanation}
### Edges left open
- {concrete unhandled scenario in "completed" work}
### Assumptions made
1. {assumption} — **{verified|not verified}**
### Pattern noticed
{observation about recurring themes, if detected. Omit section if no pattern found.}
### Future work
- {deferred items — different sprint, different ticket, out of scope}
### Next steps
1. {ordered todo for continuing this work}
### Resume here
→ `{file path}` — {what to do}. Run: `{command}`
> block) gives a 2-second status read| Situation | Behavior |
|---|---|
| No plan file exists for this branch | status/handoff: note it in summary. persist: create new note file. |
| No commits on branch yet | Summarize conversation findings only, skip git-based analysis |
| Multiple plan files match | Show all matches, let user pick (manual) or use the most recently modified (automatic) |
Branch is main or master | Still works — just skip merge-base comparison, summarize conversation context only |
| No meaningful findings to capture | Display: "No significant findings to document from this session." Skip file writes in persist mode. |
Use before pushing a branch, opening a PR, updating an existing PR, or merging. Use when GitHub Codex review cycles feel unbounded, when AI-flagged findings include false positives, when the team is finding adjacent-file issues each push, or when a chunk of work feels finished and you're about to ask whether to push.
Use when fixing bugs, resolving issues, or addressing small improvements found in testing, user reports, or code audits
Use when any API project (Flask, FastAPI, Express, NestJS, Django, Go) needs YAML integration tests for go-runner, when test coverage is shallow or missing, or when generating CI/CD pipelines to deploy a temp instance and run those tests
Use when starting new work (feature or fix branch), or when commit message validation fails. Provides branch creation wizard and commit format reference.
Dispatch parallel reviewers to validate implementation against the plan. Use for post-implementation verification in a fresh session.
Consolidate commits into cohesive logical groups. Use ONLY when all todos are completed and you're ready to push.