agentleFS
puritysbpuritysb/AgentDeck/.agents/skills/session-end/SKILL.md

session-end

Skill288 starsChanged 12 days agoMITView on GitHub

Use when the user asks to end, wrap up, clear, hand off, or prepare continuity for a Codex/AgentDeck session. Closes out in-flight work (uncommitted changes, worktrees, open PRs), records only what the next reader cannot get from git, and writes a concise handoff for the next session.

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

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

  • 0

    Common

    Most of the 21 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. Very specific:

    Do not read DEVELOPMENT_LOG.md or the devlog entries here.

    line 18
  2. Distinctive:

    Uncommitted changes: Commit them on the task branch, or name them in the handoff as deliberately left uncommitted.

    line 22
  3. Distinctive:

    Worktrees this session created: Remove one only when its branch is pushed, its tree is clean, and no other session owns it (AGENTS.md § …

    line 23
  4. Very specific:

    Update AGENTS.md only for a project-wide workflow or invariant change, and stay inside its byte budget (pnpm docs:check).

    line 36
  5. Distinctive:

    Keep it short enough to paste into a new prompt.

    line 51

“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

Use this skill at the end of a work session, before /clear, /new, switching tasks, or handing work to another Codex/Claude session. Its job is a handoff the next session can act on without the transcript. It does not create a record of everything that happened; git, the PRs and the issues already hold that.

1. Read the state (cheap commands only)

git status -sb
git worktree list
gh pr list --author @me --state open --json number,title,headRefName,mergeable

Do not read DEVELOPMENT_LOG.md or the devlog entries here. Nothing in the handoff depends on them.

2. Close out what this session started

  • Uncommitted changes. Commit them on the task branch, or name them in the handoff as deliberately left uncommitted. Never revert, stash, or restore another session's changes in a shared tree.
  • Worktrees this session created. Remove one only when its branch is pushed, its tree is clean, and no other session owns it (AGENTS.md § Agent working agreements). Otherwise list it with the reason it stays.
  • PRs this session opened. List each with its state: CI, mergeable, review, and what blocks it.
  • Background agents or long commands. Say whether each is still running. Never report a result you have not received.

3. Record only what git cannot

What you learnedWhere it goes
A domain invariant (a rule future edits must keep)the matching .claude/rules/<domain>.md. Move the rule body there verbatim; never paraphrase it
A measurement, incident, pitfall, or decision with its rejected alternativesone new file docs/devlog/entries/YYYY-MM-DD-<slug>.md (line 1 # YYYY-MM-DD — title, ### sections, links relative to the repo root), committed with the change. Nothing to regenerate
A personal preference or dated retrieval hintagent memory (local, not the repo)
What changed and whynothing: the diff and the PR body already say it

Update AGENTS.md only for a project-wide workflow or invariant change, and stay inside its byte budget (pnpm docs:check). Never write secrets, tokens, device passcodes, or raw transcripts into any of these.

4. Handoff

**Session Handoff**
- Goal:
- Current state: (merged / open PRs with blockers / uncommitted work)
- Worktrees and branches left:
- Verification: (what ran, result)
- Open issues / risks:
- Next action: (one concrete step)
- Records written: (devlog entry / rule / memory, or "none — git holds it")

Keep it short enough to paste into a new prompt. Give file paths and PR numbers, not diffs.

Notes

  • Codex: use /compact to keep going with compressed context, and /new to start fresh after the handoff.
  • Claude Code: use /clear to start fresh after the handoff.
  • Link to a canonical rule rather than copying it. An old approval or release condition is a dated fact, not a permanent gate.

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.