TAKEOFF69/codex-skills-kit / skills/session-close
session-close
UnverifiedClose a coding-agent session with durable repository state, proportional verification, documentation reconciliation, and a useful handoff. Use when the user says close out, wrap up, end session, session report, doc sync, preserve work, or asks for a final commit and push before stopping.
Session Close
Turn active session into recoverable, reviewable handoff without absorbing unrelated work.
This is lightweight closeout. Use retro-distill for deeper pattern mining after major chunks or failures.
Authority order
- Read repository
AGENTS.mdand nested instructions governing changed paths. - Use repository-native closeout, worktree, documentation, and verification commands when defined.
- Apply generic workflow below only where repository has no stronger rule.
Workflow
1. Inventory live state
Capture:
git rev-parse --show-toplevel
git branch --show-current
git rev-parse HEAD
git status --porcelain
git diff --name-only
git diff --cached --name-only
git log --oneline -10
Identify owned paths, unrelated dirty paths, commits made this session, and unpushed commits. Do not clean or stage yet.
2. Map changes to obligations
For each owned change, identify:
- tests or probes required by affected surface
- documentation that describes changed behavior
- generated artifacts needing repository-native regeneration
- release or deployment boundary
- session log or handoff format required by repository
Use live paths and current code. Prior plans record intent, not necessarily final state.
3. Reconcile documentation
Update canonical docs when behavior, architecture, commands, data contracts, or operator workflows changed. Avoid documentation churn for implementation details with no durable effect.
If required doc cannot be updated, record explicit exception with reason and follow-up owner. Do not silently leave known drift.
4. Verify proportionally
Use verify-honestly:
- run cheapest probe capable of catching likely failure
- cite existing green deterministic gates instead of repeating them
- verify UI in browser when UI behavior changed
- name live or production gaps instead of implying coverage
- record exact commands and results
5. Write handoff
Use repository session-log format when present. Otherwise record concise Markdown with:
## Scope
## Changes
## Files touched
## Decisions
## Verification
## Residual risks
## Next-session context
## Transferable lessons
Include only reusable lessons supported by session evidence. Do not turn routine closeout into speculative retrospective.
6. Make work durable
Follow repository's Git workflow. Under contention, use git-under-contention.
- Stage explicit owned paths only.
- Review cached diff and staged filenames.
- Commit complete logical unit, or labeled WIP when unfinished and repository permits it.
- Push authorized branch and confirm remote tip.
- Leave unrelated dirty paths untouched.
- Do not deploy unless user explicitly requested deployment.
If commits or pushes are not authorized, preserve files and report exact uncommitted or unpushed state.
7. Final state check
Re-run status and compare current HEAD with captured state. If HEAD moved during closeout, recheck generated files and documentation against new tip.
Final response contract
Report:
- outcome
- commit and pushed branch, when applicable
- owned files changed
- highest verification level and evidence
- documentation reconciled or exceptions
- residual risks and deploy-gated checks
- single next action, only when work remains
Checklist
- Current branch, root, and HEAD captured.
- Owned and unrelated changes separated.
- Durable behavior changes reflected in canonical docs.
- Generated artifacts refreshed by canonical command.
- Verification level named with exact evidence.
- Explicit paths staged and cached diff reviewed.
- Commit pushed or exact preservation gap reported.
- Final status checked without deleting unrelated work.
Stop conditions
- Ownership of dirty or staged paths is unclear.
- Repository requires destructive cleanup or force operation.
- Required verification or docs sync exposes unresolved correctness issue.
- Push or merge would include unreviewed work from another session.
Preserve current state and report blocker instead of manufacturing clean closeout.
Related skills
git-under-contentionprotects shared repository state.verify-honestlydefines verification claims.retro-distillperforms deeper learning loop after closeout.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file). | Stars: 196k | Updated | Claude CodeCodex | Unverified | Install |
| doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |