agentleFS
spizganedspizganed/skills/session-end/SKILL.md

session-end

Skill0 starsChanged 20 days agoMITView on GitHub

Close a work session with the docs right. Update the handoff and status, cut stale and long text, run the docs lint, write the marker. Run only when the user types /session-end.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use session-start and ship.

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.
  • bitwize-music-studioSkill

    session-start

    Runs the session startup procedure - verifies setup, loads config and state, checks skill models, and reports project status. Use at the beginning of a fresh session.

    Also in 11 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run this when the user ends a session.

    line 9
  2. Distinctive:

    Put a short "Done" list of this session first (one line for each item), then the open work in the order to do it.

    line 16
  3. Distinctive:

    Delete every item that is done.

    line 17
  4. Distinctive:

    Keep the rules and the facts that stay true.

    line 18
  5. Distinctive:

    If the project keeps notes for the agent (a memory folder), delete the ones that are now wrong and update the ones that changed.

    line 22
  6. Very specific:

    Run sh <this skill folder>/scripts/docs-lint.sh from the repo root.

    line 23
  7. Distinctive:

    Commit the docs: "Session end YYYY-MM-DD".

    line 24
  8. Distinctive:

    Do not add a section for one fact.

    line 30
  9. Very specific:

    Default limits (the lint checks them): docs/HANDOFF.md 12 KB, docs/STATUS.md 6 KB, README.md 12 KB, any other doc 16 KB.

    line 32

“Common” is measured: kept by at least 6 in 10 of the 21 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 end

Run this when the user ends a session. It keeps the docs true, short and ready for the next session. The next session starts a hook (scripts/session-start-check.sh). It reads the marker docs/SESSION-END. If code changed after the marker, the new session runs this procedure first.

Procedure

  1. Find what changed. Read docs/SESSION-END (line 1: a commit hash and a date). Run git log --oneline <hash>..HEAD and git diff --stat <hash>..HEAD. With no marker, use the commits of this session.
  2. docs/HANDOFF.md: say what is true now and what the next session must do.
    • Put a short "Done" list of this session first (one line for each item), then the open work in the order to do it.
    • Delete every item that is done. Do not keep history: git log has it. For a change of design write one line: "Was: X. Is: Y."
    • Keep the rules and the facts that stay true. Cut the rest.
  3. docs/STATUS.md (if the repo has it): move each changed feature to the right list (works and seen, needs work, not seen yet, not built).
  4. Fix stale facts. For each file that changed, search the docs for its name and path (grep -rn). Check each fact against the code, never against memory. Fix what is wrong. A path in backticks must exist.
  5. docs/ARCHITECTURE.md (if the repo has it): update it when a part, a flow or a reason changed.
  6. If the project keeps notes for the agent (a memory folder), delete the ones that are now wrong and update the ones that changed. Do not save what the code or git log already says.
  7. Run sh <this skill folder>/scripts/docs-lint.sh from the repo root. Fix every finding. To fix a size finding, cut text. Do not move text into a new file.
  8. Commit the docs: "Session end YYYY-MM-DD". Write the marker: line 1 is git rev-parse HEAD and the date. Commit the marker alone. Push only when the project rules or the user say so.
  9. Tell the user in 3 lines: what changed in the docs, what is open, what the next session does first.

How long a doc is

  • A doc is long enough to say what is true now, and not longer. Cut history, repeated facts, finished plans and lists of done work.
  • Do not add a section for one fact. Do not copy what the code says (names, line numbers, option lists) unless the reader needs it to act.
  • One topic lives in one file. Link to it. Do not write it twice.
  • Default limits (the lint checks them): docs/HANDOFF.md 12 KB, docs/STATUS.md 6 KB, README.md 12 KB, any other doc 16 KB. A repo can set its own in docs/.docs-limits (one line each: path bytes).
  • A reference doc (a protocol, an API) can be longer on purpose. Give it its own limit in docs/.docs-limits.

The lint

scripts/docs-lint.sh checks, in the current git repo:

  • the size of each .md file against its limit;
  • each path in backticks (a file name or a path with a slash) names a tracked file;
  • the handoff has no "Older" or "History" section. It prints one line for each problem and exits 1 when it finds one. It changes no file.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.