agentleFS
dayanjandayanjan/wayfinder/.claude/skills/session-closer/SKILL.md

session-closer

Skill0 starsChanged 4 months agoMITView on GitHub

End-of-session housekeeping. Writes session log, syncs MEMORY.md and WORK_PROGRESS.md, creates the handoff file for the next session, then either commits housekeeping (full-close) or leaves a checkpoint (mid-workstream). Use at end of session, or when asked to wrap up, log progress, close out, or save learnings.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. 10CG/aria-plugin★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the active workstream file (if any).

    line 23
  2. Distinctive:

    If today's session log file already exists, append a new block — never rewrite previous blocks (session log blocks are append-only within a …

    line 30
  3. Very specific:

    If full-close and a workstream completed: update Current Status / Next: header line

    line 36
  4. Distinctive:

    Do NOT restructure sections, add/remove ADRs, or rewrite gotchas.

    line 37
  5. Distinctive:

    Update snapshot dashboard in place (current phase, completed workstreams, blockers)

    line 41
  6. Very specific:

    If any deliverable-directory files (reports/, figures/, external-facing docs) were written, remind the user to run /scrub-internals before …

    line 72
  7. Very specific:

    Ask if anything about the project scaffolding (structure, skills, agents, hooks, conventions, workflows) worked particularly well or should …

    line 76
  8. Very specific:

    Never bypass hooks (--no-verify).

    line 86
  9. Distinctive:

    Checkpoint mode skips this step entirely: No commit happens under any circumstances in checkpoint mode.

    line 87
  10. Distinctive:

    Never push without explicit user confirmation, even in full-close mode.

    line 91
  11. Distinctive:

    Hard refusal on secrets: no override flag exists. Secrets detection aborts the skill before any writes.

    line 97
  12. Distinctive:

    Mode is automatic: never ask the user to pick checkpoint vs full-close.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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

Dual-mode operation (the skill decides automatically — never asks the user):

  • Full-close — active workstream's Done Criteria are satisfied AND the working tree contains no WIP workstream artifacts. Skill writes housekeeping files, makes a single commit, leaves tree clean.
  • Checkpoint — workstream is mid-flight (Done Criteria not yet satisfied) OR tree contains WIP that shouldn't be bundled into a session-close commit. Skill still writes the session log and handoff file (these are required for next session to resume), but does NOT commit. WIP stays in place.

Process

Step 0. Git preflight + secrets refusal (before any writes)

  • Run git status --porcelain.
  • Classify every changed/untracked file into buckets:
    • Housekeeping (committable in full-close): memory/sessions/*, MEMORY.md, WORK_PROGRESS.md, docs/gotchas.md, memory/patterns.md, memory/NEXT_SESSION.md, memory/lessons-learned.md
    • Workstream artifacts (never in a session-close commit): files under src/, tests/, data/, figures/, reports/, notebooks/, and any project-specific output directories
    • Secrets — HARD REFUSAL: any of .env*, *.key, *.pem, *.p12, id_rsa*, credentials*, *.secret, *token*.json. If any are staged or modified, ABORT the skill immediately with a clear error. No override flag exists. User must unstage and re-run.

Step 1. Detect mode

  • Read the active workstream file (if any). If all Done Criteria are checked AND no workstream artifacts remain in the tree → full-close. Otherwise → checkpoint.
  • Record the chosen mode in the session log header.

Step 2. Write session log — memory/sessions/YYYY-MM-DD.md

  • Header: # Session: YYYY-MM-DD HH:MM with Mode: full-close | checkpoint
  • Structured sections: What was accomplished, Decisions made (link to ADR if created), New gotchas discovered, New patterns noted, Open questions for next session
  • If today's session log file already exists, append a new block — never rewrite previous blocks (session log blocks are append-only within a day).

Step 3. Update MEMORY.md (narrow edits only)

  • Append row to Recent Sessions table (date, focus, key outcome)
  • Bump Last updated: timestamp
  • If full-close and a workstream completed: update Current Status / Next: header line
  • Do NOT restructure sections, add/remove ADRs, or rewrite gotchas.

Step 4. Update WORK_PROGRESS.md

  • Update snapshot dashboard in place (current phase, completed workstreams, blockers)
  • Append progress log entry: ### YYYY-MM-DD HH:MM — Session close ([mode]): [one-line summary]

Step 5. Record new gotchas

Append to docs/gotchas.md with Added: YYYY-MM-DD.

Step 6. Note new patterns

Append to memory/patterns.md with Noted: YYYY-MM-DD.

Step 7. Write handoff file (dual-location mirror)

Primary: memory/NEXT_SESSION.md (overwrites previous). Mirror: append the same block to the bottom of today's session log. The mirror exists so session-start can fall back to the session log if NEXT_SESSION.md is missing, deleted, or stale.

Handoff schema (every field required; use "none" if empty):

## Next session priorities — written YYYY-MM-DD HH:MM

**Current state**: [one-line status — phase, workstream, full-close or checkpoint]
**Next action**: [single concrete first step for the next session]
**Prerequisites**: [what must be true before the next action can run]
**Open questions**: [questions to resolve before proceeding]
**Do not touch**: [files or areas that are in-flight or off-limits]
**Context to preload**: [up to 10 file paths the next session should read first]
**Estimated budget**: [rough turns or hours for the next action]

Step 8. Check for unscrubbed deliverables

If any deliverable-directory files (reports/, figures/, external-facing docs) were written, remind the user to run /scrub-internals before sharing.

Step 9. Prompt for lessons learned

Ask if anything about the project scaffolding (structure, skills, agents, hooks, conventions, workflows) worked particularly well or should be improved. If yes, append to memory/lessons-learned.md with timestamp, category, details. This flows back to the generator template repo.

Step 10. Suggest CLAUDE.md improvements

Based on session learnings, suggest edits in the closing report. Never auto-apply; CLAUDE.md is hot-path.

Step 11. Commit (full-close mode ONLY)

  • Stage ONLY housekeeping files, by explicit file list. Never use git add . or git add -A.
  • Single commit: Session close: YYYY-MM-DD — [one-line summary]
  • Never bypass hooks (--no-verify). If a pre-commit hook fails, do NOT retry or amend — leave files staged, report the failure, let the user fix the root cause.
  • Checkpoint mode skips this step entirely. No commit happens under any circumstances in checkpoint mode.

Step 12. Push decision

Never push without explicit user confirmation, even in full-close mode.

Invariants

  • Idempotency: re-running session-closer within the same minute on unchanged state is a true no-op. The session log block for the current minute is detected by header timestamp and skipped. No duplicate progress log entries.
  • Append-only: session logs, WORK_PROGRESS progress log, lessons-learned, gotchas, and patterns files are append-only. Previous entries are never rewritten.
  • Hard refusal on secrets: no override flag exists. Secrets detection aborts the skill before any writes.
  • Mode is automatic: never ask the user to pick checkpoint vs full-close. Inspect workstream state and tree state; decide.
  • Checkpoint never commits: housekeeping files are written (required for handoff to work) but the git commit step is skipped entirely.

Note: Claude's built-in auto-memory (/memory) handles cross-session context automatically — this skill focuses on structured project-specific logs, handoff, and commit boundary decisions.

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.