closing
Skill19 starsChanged 37 days agoMITView on GitHub
Close a working session so a fresh session with empty context can continue from the files alone — audit the artifacts, update project memory, commit, push, and say whether it is safe to close. Use when the developer is about to stop, switch tasks, compact, or hand the work to someone else.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- nate2022-ai/nate-ai-skillstheir own version, first seen Sep 21, 2026
- donatassimkus/claude-ai-skillstheir own version, first seen Jul 23, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- nate2022-ai/nate-ai-skills★ 8same name
- donatassimkus/claude-ai-skills★ 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 repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- broSkill
- context-auditSkill
- decision-logSkill
- dependency-freshnessSkill
- documentation-updateSkill
- failure-learningSkill
- git-disciplineSkill
- goblin-modeSkill
- project-mapSkill
- run-and-verifySkill
- spec-from-screenshotSkill
- ui-qaSkill
- sdd-updateSkill
- sdd-workflowSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
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
- could be automatic: a setting could enforce it
- Distinctive: line 15
If a new session with empty context opened this repo, could it continue from here?
- Distinctive: line 45
Write only facts that happened in this session or are visible in the repo.
- Distinctive: line 46
Update subtask markers, spec text, open questions, assumptions and review notes directly.
- Very specific: line 53
Use the project's session-handoff location if AGENTS.md or decisions/answers.md names one.
- Very specific: line 66
Keep it short: it points at artifacts, it does not duplicate them.
- Very specific: line 92
If a commit hook fails, fix the cause and commit again.
- Distinctive: line 93
If the git policy forbids committing on the current branch (for example the default or a protected branch), do not commit: report it and …
- Distinctive: line 98
Never stash, reset, rebase, delete branches or discard changes.
- Distinctive: line 99
If the push is rejected (remote ahead, no remote, no permission), stop: do not pull, merge or rebase on your own.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Closing — leave the repo resumable
Purpose
Answer three questions before the session ends:
- Is everything important written down?
- Are the durable artifacts and memory files up to date with what actually happened?
- If a new session with empty context opened this repo, could it continue from here?
Chat history is lost; the artifacts are the record (reference/session-recovery.md, and the "Session recovery" rule in AGENTS.md). This skill closes the gap between the two.
Invoking this skill is the developer's approval to update project memory, commit the session's work and push it, as described in steps 3, 7 and 8. Do not ask again whether to commit, push or update memory; do it and report. The developer can narrow this in the invocation (no push, no commit); the project's git policy and the limits below still apply.
Procedure
1. Gather what happened
- This conversation: tasks touched, decisions settled, questions answered, assumptions confirmed or rejected, approvals given, problems hit, what was left half-done.
- The repo:
git status,git diff --stat(staged and unstaged),git log --oneline -10.
2. Audit the artifacts against reality
For each item, compare what the file says with what happened:
tasks.json— status,approval,documentation_status,updated_atof every task touched.specs/<slug>/tasks.md— subtask markers ([ ],[>],[x],[!]) match the work actually done.specs/<slug>/requirements.md/design.md— changes agreed in chat but not written into the spec.specs/<slug>/open-questions.mdandassumptions.md— questions answered, assumptions confirmed or rejected.specs/<slug>/review.md— findings raised or resolved this session.specs/**/feedback.md— pending review feedback not yet applied (apply it or list it as the next action).- Decision logs (
decisions/) — significant decisions settled this session. history.md— tasks that reacheddonewithout an entry.- Project memory per
reference/memory-policy.md:AGENTS.md,decisions/, and the harness's own memory if the project uses one. - Project map /
AGENTS.md— commands, structure or conventions that changed.
3. Fix the gaps
- Write only facts that happened in this session or are visible in the repo. Never invent progress, results or decisions.
- Update subtask markers, spec text, open questions, assumptions and review notes directly.
- Task state transitions follow the SDD workflow: never set
human_approvedordonehere unless the developer approved it in this session; if the record lags behind a real approval, update it and cite the approval. - Memory writes and decision-log entries: the invocation counts as the developer's choice of project memory under the memory policy (
reference/memory-policy.md§ Closing). Write project-scoped entries (decision logs,AGENTS.mdfacts that changed, the harness's project memory if the project uses one) without asking, and list the exact text of each in the report. Never write global memory from this skill: list a project-independent lesson as a proposal instead. - Re-render any spec whose markdown changed (render command in
AGENTS.md).
4. Write the handoff
Use the project's session-handoff location if AGENTS.md or decisions/answers.md names one. Otherwise keep a single ## Resume here block at the top of history.md, above ## Entries — replace it on each close, never append a new one:
## Resume here
- **Updated:** YYYY-MM-DD
- **Current task:** TASK-NNN — <slug> (`<status in tasks.json>`)
- **Next action:** <one concrete step, e.g. "implement T3 in specs/<slug>/tasks.md">
- **Blockers / waiting on:** <approval, open question Qn, failing test…, or "none">
- **Uncommitted work:** <summary of git status, or "none">
- **Notes:** <anything a fresh session would otherwise rediscover the hard way>Keep it short: it points at artifacts, it does not duplicate them. When no task is active, say so and name the next candidate from tasks.json.
5. Cold-start test
Using only the files (not this conversation), answer: what is the current task, its status, the next action, and any blockers? If any answer needs chat context, fix the artifact and test again.
6. Report
Closing checklist
✓/✗ tasks.json matches the work done
✓/✗ spec subtask markers, open questions, assumptions, review up to date
✓/✗ decisions and project memory recorded (exact entries listed; global-memory proposals listed, not written)
✓/✗ no pending feedback.md
✓/✗ handoff written
✓/✗ cold-start test passed
A fresh session can resume from: <file and section>Explain every ✗ in one line.
7. Commit
Show git status and a short summary of the diff, then commit the session's work following the project's git policy (AGENTS.md, and the git-discipline skill if installed): its branch rules, message convention and attribution. Use one commit per logical change when the policy asks for it; otherwise one commit.
- Stage only files this session produced or changed. Leave out anything that looks like a secret or credential (
.env, keys, tokens), large generated or binary files, and unrelated changes that were already there before the session; list them in the report. - If a commit hook fails, fix the cause and commit again; never bypass hooks (
--no-verifyor equivalent). - If the git policy forbids committing on the current branch (for example the default or a protected branch), do not commit: report it and leave the work uncommitted.
8. Push and finish
- Push the current branch to its upstream (set the upstream on first push if the policy allows it). Never force-push, and never push a branch the git policy says not to push directly.
- Never stash, reset, rebase, delete branches or discard changes.
- If the push is rejected (remote ahead, no remote, no permission), stop: do not pull, merge or rebase on your own. Report the reason.
- Re-check
git statusand the branch's ahead/behind count against its upstream after pushing.
End the report with one line:
✓ Safe to close the session.— the checklist is all ✓ (or every ✗ is explained and recorded in the handoff), memory is written, the work is committed and pushed, and the working tree is clean apart from files deliberately left out.✗ Not safe to close yet: <reason>— and what the developer needs to do or decide.
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
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.

