agentleFS
AN0099AN0099/toothpaste-kit/skills/session-close/SKILL.md

session-close

Skill1 starsChanged 19 days agoApache-2.0View on GitHub

Run the end-of-session capture procedure for this PKD. Sweeps the session for reasoning, decisions, and near misses that exist nowhere on disk, then updates the six files that must stay current. Invoke before ending any working session.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use session-open and handoff.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • vishnujchandranSkill

    session-open

    Restart-safe session starter that restores context, validates readiness, and creates a focused execution plan for the current development session.

    Also in 4 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read back over the session and ask, explicitly and separately for each category:

    line 25
  2. Distinctive:

    When a sweep in this phase means searching for references by name, drive the walk yourself as phase 3 does.

    line 56
  3. Very specific:

    Run these. Do not eyeball them.

    line 82
  4. Distinctive:

    Write a throwaway file containing the character, confirm the command lists it, then delete it.

    line 120
  5. Very specific:

    If anything was written into a Git working tree this session, confirm the pre-publish redaction gate actually ran against it.

    line 155

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Session Close

Adapting this skill: filenames below name roles rather than literal paths. docs/standing-documents.md describes the document set, what each file does, and how the pieces work together. db throughout means whatever your durable store is called. Substitute your own filenames freely.

db is the durable store. Anything living only in a session is gone when that session ends, including a completion claim resting on an account-level skill mount. This procedure existed as a manual prompt the human had to remember to type. The trigger is now this skill.

Work the phases in order. Do not skip phase 1 because nothing obvious comes to mind; the prompt that motivated this skill found six unrecorded items on a session where the answer felt like "nothing".

Phase 1: Sweep for unrecorded reasoning

Read back over the session and ask, explicitly and separately for each category:

  1. Decisions made. Any choice with a rationale, including ones that felt obvious at the time. Record the alternative that was rejected and why, not just the outcome.
  2. Near misses. Anything that almost went wrong, was caught by luck rather than by a control, or revealed that a control did not cover a surface. These are postmortem candidates. A near miss with no harm done is still the most valuable thing a session produces.
  3. Corrections. Any point where a stated fact turned out to be wrong, or an agent's claim did not survive checking. Record the correction and its source.
  4. Conventions. Any rule that was applied but is not written down anywhere, or any written rule that was found to be inaccurate.
  5. Open questions. Anything raised and not resolved. These belong in threads-flagged.md, not in a summary that disappears.
  6. Superseded material. Anything on disk that this session made stale. Two cases are easy to miss. A file that moved between sensitivity tiers leaves its old path behind in every document that referenced it, and a sentence describing what is in that file is content wherever it sits, not only where the file now lives. A document whose framing was overtaken still reads correctly line by line while arguing a position the session has since changed; its opening paragraph is usually where this shows.

For each item found, decide its layer before writing it. Provenance material (reasoning, decision archaeology, session residue) goes to the provenance layer your CLAUDE.md names, or to the appropriate sensitivity tier. examples/workspace/CLAUDE.md shows what that line looks like. If CLAUDE.md names no provenance layer, stop and ask rather than picking a path. Human-facing material (README, CONTRIBUTING, project state, skill files) goes to the repo, lean and without archaeology. Never mix the two in one file.

When a sweep in this phase means searching for references by name, drive the walk yourself as phase 3 does. A bare recursive grep may honor ignore files, which excludes exactly the trees a tier-move sweep most needs to reach, and returns clean.

Phase 2: Update the standing files

Your tree should name, in one place, the files that must stay current, and CLAUDE.md is where to say which place that is, since it loads into every session. examples/workspace/CLAUDE.md shows what that line looks like; it is an example, not your tree's path. Check each one and state explicitly whether it needed a change, rather than silently skipping it. Substitute your own list here. The shape that has worked:

  • The manifest naming what is authoritative versus stale
  • The task or work queue
  • The operating handoff document (roster, conventions, open items)
  • The open-threads log
  • The resolved-threads log
  • Per-project state documents for anything actively developed

Move any thread that closed this session from threads-flagged.md to threads-resolved.md, with the resolution recorded, not just the status change.

Phase 3: Mechanical checks

Run these. Do not eyeball them. Each one builds the character with printf rather than relying on grep -P, which only GNU grep has, and drives the walk with find, because some environments route grep through a wrapper that honors ignore files by default and silently skips the directories a sweep most needs to reach.

EM=$(printf '\342\200\224')
find . -name '*.md' -not -name '*em-dash*' -not -name '*banned-words*' \
  -exec grep -l -- "$EM" {} +

Any file listed is a violation of the standing dash convention and must be fixed before close. The two excluded filenames quote the character deliberately.

That command covers one of the two characters the convention bans. Run the second one too, and read its result differently:

EN=$(printf '\342\200\223')
find . -name '*.md' -not -name '*em-dash*' -not -name '*banned-words*' \
  -exec grep -l -- "$EN" {} +

The first command is a gate: an em dash is a violation wherever it appears. The second is a review prompt: an en dash is a violation when it separates clauses and correct when it joins a range, and no pattern tested here separates those two uses. A rule flagging en dashes outside digit pairs was measured against this tree and flagged Mar 15 - Aug 30 and Apr-Jun 2026, which are ranges, so it would have taught its reader to dismiss it.

So report the count and look at the hits. Do not gate on them, and do not report zero en dashes when the check was never run. A check that silently covers half its rule is the failure this phase warns about two paragraphs above.

Verify the sweep before trusting a clean result. A search that returns nothing is indistinguishable from a search that is silently broken, which is the failure mode where a check "looks like coverage" and is worse than no check. Write a throwaway file containing the character, confirm the command lists it, then delete it.

If your tree keeps an agent memory store, verify it is still contained inside the sensitivity tier its contents require. If it keeps none, say so in the report rather than skipping the check without a word. The tree this skill came from declares its store in .mcp.json and checks it with:

grep MEMORY_FILE_PATH .mcp.json

The path must resolve inside the restricted tier's directory. Substitute your own declaration file and tier path. Containment is the entire clearance for persisting restricted content, so a single edited line relocates every future write outside the tier controls, silently and with no error.

That command reads a declaration, not the running server. A memory server registered outside the declaration file, at user scope or anywhere else the harness accepts one, keeps running while the grep goes on passing against a config that no longer governs it. This is the same shape as the half-covered dash sweep earlier in this phase: the command still succeeds, and its success has stopped meaning anything. If the store was ever moved, query the live server instead and correct the check, rather than reading the file that is easy to reach.

Prefer a tool that judges each store by where it is and whether it holds data. The grep has passed while the declared file had never been written and the memory in use was the harness's own file store, which no config declares. If your tree has such a tool, run it in place of the grep.

Then read the store itself, not just its size. Aggregation is what a per-write check cannot see: individually ordinary observations can reconstruct reasoning that no single one states.

If anything was written into a Git working tree this session, confirm the pre-publish redaction gate actually ran against it. Run /redaction-gate if it did not. "It probably already happened" is the failure mode the gate exists to prevent.

Phase 4: Report, do not self-certify

Present what was recorded and what was checked. Do not claim the session is closed. No completion claim counts as fact until verified by a party other than the one making it, and self-audit is explicitly excluded as a verification method. The human makes the close call.

State plainly anything you could not complete and why, rather than leaving it implied by omission.

Scope Pointer

  • session-log: the cheap mid-session counterpart, for the compaction boundary. It records decisions and findings and touches nothing else, so a log written there does not discharge this procedure.
  • daily-dashboard: the other half of this loop, run at the start of a session rather than the end. It reads back what this procedure writes and checks it against the working trees instead of trusting it. Anything it finds unrecorded belongs to this skill, not that one.
  • redaction-gate: the pre-publish check phase 3 defers to. This procedure decides whether that gate still needs to run; it does not perform the check.
  • document-standards: governs the prose of anything phases 1 and 2 write to disk. It does not govern this procedure's own closing report, which is chat output rather than a generated document.
  • working-preferences: source of truth for the standing conventions that phase 1 item 4 asks you to test the session's unwritten rules against.
<!-- SPDX-FileCopyrightText: 2026 Aidan Naveja SPDX-License-Identifier: Apache-2.0 -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.