Skip to content
Back to skills

End Session

ASecurity

Captures this session's learnings — preferences, corrections, what worked, what to avoid — by merging them into feedback.md + project memory for future sessions. Utility/persistence skill: it records, it does not review or grade output. Trigger on /end-session or "end session".

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 28, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add shashankreddy509/claude-tdd-kit --skill end-session --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of End Session?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for End Session
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shashankreddy509-end-session/badge)](https://www.skillsdirectory.com/skills/shashankreddy509-end-session)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: end-session
description: Captures this session's learnings — preferences, corrections, what worked, what to avoid — by merging them into feedback.md + project memory for future sessions. Utility/persistence skill: it records, it does not review or grade output. Trigger on /end-session or "end session".
---

# End Session

Read the entire conversation from this session. Extract and synthesize everything the user revealed about how they want to work.

## Output — four artifacts

1. **`tasks/feedback.md` — DELEGATE to the `merge-feedback` skill.** Invoke it. It owns the synthesis
   of this session's preferences/corrections into the five sections and the never-delete / superset
   merge rules (with its own SUPERSET-CHECK). Do NOT reimplement that merge logic here — call the
   skill. (This is the single source of truth for the feedback merge, shared with start-session's
   auto-capture.)
2. **The project memory vault** — update the persistent memory for the **current** project, never a
   hardcoded path. Derive the path from cwd: replace every `/` with `-`, write under
   `~/.claude/projects/<that-slug>/memory/` (create if absent). One durable fact per file with
   frontmatter + a one-line `MEMORY.md` pointer. Merge, don't replace: read the existing file first,
   preserve prior facts, only correct one if this session proved it wrong (and say so). Save only
   durable, non-obvious facts — not what git/the repo records, and not behavioral preferences (those
   go to feedback via `merge-feedback`).
3. **`tasks/session-notes.md`** — this session's 2-line "Left off" block plus `## Open points` (see below).
4. **Optional task inbox** — see "Optional task-inbox hook" below; skipped silently when absent.

### session-notes.md detail

Several sessions can share one checkout, so the file holds one "Left off" block per session plus
one shared Open points list. `/start-session` reads all of it:

```markdown
## Left off
### <YYYY-MM-DD> · <branch> · <topic, a few words>
- <the task that was mid-progress when the session ended>
- <the next concrete step to take>
### <an older block from another session, kept as is>

## Open points
- <each thing left undone, one line, with its next action>
```

Synthesize from the actual work done this session. Task tracking itself stays in Jira — this is
only the "where I stopped" pointer, not a backlog. Merge into the file, never replace it:

- Re-read the file right before writing, never from what was loaded at session start: another
  session may have written since.
- Replace only this session's own block (the heading it wrote earlier this session), else add a
  new block at the top of `## Left off`. Never edit another session's block; drop only blocks
  dated more than 7 days ago.
- Merge `## Open points`: keep every existing point, add this session's undone, unproven or parked
  items, and remove a point only when this session verified against live state that it is closed.
  Write `- none` only when the merged list is empty. A point left out of this file is lost.
- No substantive work this session: add no block, and leave `## Left off` and `## Open points` as
  they are.
- An old-format file (bare 2-line note, no `## Left off` heading): turn those two lines into one
  block dated by the file's last-modified time, then merge as above.

### Optional task-inbox hook

If `TASK_INBOX_URL` names a local task-inbox service, push this session's unfinished points
(concrete, with a next action; no duplicates of open ones) there so they outlive the session-notes
file, and propose closing finished ones only on live-state evidence and the user's explicit
picks. When it is unset or nothing answers, skip silently. Either way the points also go under
`## Open points` in `tasks/session-notes.md`, since `/start-session` reads only that file.

## Compact-aware (the session may have been compacted)

This runs at session close, after work that may have been `/compact`-ed. A compaction summary is
LOSSY — a correction made hours ago may be vague or gone in it. Because `start-session`'s auto-capture
rule appends corrections/preferences to disk AT THE MOMENT they happen:

- Treat the already-written `tasks/feedback.md` and the project memory vault as the SOURCE OF TRUTH.
  The conversation/summary is SUPPLEMENTARY — use it to ADD what's not yet on disk, not to re-derive
  everything from scratch.
- Do NOT overwrite or contradict an on-disk feedback/memory entry just because the summary doesn't
  mention it — absence in a lossy summary is not evidence it didn't happen.
- If auto-capture was working, end-session is mostly RECONCILIATION: confirm the day's captures
  landed, add anything missed, write the session-notes handoff. Don't duplicate what's already there.

## Rules

- Scan the FULL conversation — don't summarize only recent turns. This is the input to all four
  artifacts.
- The feedback merge rules (never-delete, superset, ≤20 words, behavioral-only, no code snippets)
  live in `merge-feedback` — don't restate or reimplement them here; just invoke it.
- After all four updates, report a one-line summary: how many feedback rules captured (from
  merge-feedback's output), any memory files added/updated, and the "Left off" note (plus inbox
  counts only when an inbox was reachable).

## Dashboard review (OPTIONAL — only if the repo ships a dashboard tool; if it does not, skip this step SILENTLY with no message)

Some setups render the captured learnings as keep/drop rows on a local page before they are written.
If the repo defines such a tool (its CLAUDE.md names the command), render the learnings as toggle
rows, then drain the user's picks: a reject applies to that line only, keeping the rest; a commit
proceeds with the current keep/drop set.

If nothing is rendered, nothing is drained, or the user did not interact, write ALL learnings as
normal. This is an optional review layer, never a gate — a dead server must not block the write.

## Self-check (report PASS/FAIL; don't block)

The four artifacts are the deliverable, so verify they LANDED — a session-close that reports
success while nothing reached disk is the failure this gate exists to catch. Re-read each file
after writing; do not assert from the fact that a write was attempted.

- **Feedback merge:** `merge-feedback` owns the superset rule and reports its own
  `SUPERSET-CHECK`. Carry that verdict through verbatim — do NOT re-derive or re-grade it here.
  If it reported FAIL, this gate FAILs too.
- **Memory vault:** every memory file written this session resolves on disk under
  `~/.claude/projects/<slug>/memory/`, and each new file has a matching one-line pointer in
  that vault's `MEMORY.md`. A file with no pointer is an orphan — it will not be recalled.
- **Session-notes:** `tasks/session-notes.md` has a `## Left off` block dated to THIS session
  (unless no substantive work happened), every other session's block from the pre-write re-read
  that is under 7 days old, and an `## Open points` section (`- none` counts). A lost block or a
  dropped open point is a FAIL.

Report `END-SESSION SELF-CHECK: PASS` or `FAIL — <what did not land>`. A FAIL means write the
missing artifact before finishing; it does not mean re-running the whole skill.

## Gotchas

- When a status/triage document exists for work this session touched, UPDATE IT IN PLACE in the same turn the state changes (merged, deployed, ticket transitioned) and re-render every format it ships in — a board the user reads to know where things stand is worse than useless once stale. Never create a v2 file; the path is what the user returns to.
- A memory file this session DISPROVED must be corrected before writing anything else — amend it in place, say so explicitly, and fix its MEMORY.md pointer line too (a corrected file behind a stale one-line hook still gets recalled wrongly).
- A test suite that was KILLED (memory pressure, timeout, interrupt) can exit 0 and print no "N passed" summary line, so require the summary line itself as evidence; when it is absent, say the run proves nothing.
- A carried-forward item's factual claims describe what the filer BELIEVED, not current state — verify each claim against live state before judging the item closed.
- A carried item with a verified diagnosis is a spec: it is closable only when the fix covers every instance it names; a fix for fewer leaves it open.
- Before a verification step that destroys state (clearing app data, deleting a model, resetting a store), offer a preserve-then-restore path first.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.