From active-skills
Use when the user says "close session", "wrap up", "end session", "done for now", "save my work", "commit and push", or when finishing a block of work with no further tasks planned to update project documentation, commit changes, and push safely to GitHub.
How this skill is triggered — by the user, by Claude, or both
Slash command
/active-skills:close-sessionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
End-of-session ritual: update docs → commit → classify changes → merge related branches to main → push or hold.
End-of-session ritual: update docs → commit → classify changes → merge related branches to main → push or hold.
Core principle: Every session ends with accurate documentation and a clean, safe git state. Breaking changes MUST NEVER push until the related work is complete — or the user explicitly overrides.
Announce at start: "I'm using the close-session skill to wrap up this session."
Invoke the managing-agent-instructions skill to update all project documentation.
Focus on changes this session introduced:
AGENTS.md / GEMINI.md / CLAUDE.mdARCH.mdAGENTS.md.agents/TODO.md (with [P1] or [P2]).agents/TODO.mdDESIGN.md and run npx @google/design.md lintIf the session made no architectural or convention changes, a brief read-and-confirm that existing docs are still accurate is sufficient — do not update for its own sake.
git status
git diff --stat HEAD
Identify two categories:
AGENTS.md, CLAUDE.md, README, TODO, etc.If the working tree is already clean (nothing to stage), skip to Step 5 — report clean state and stop.
Scan git diff HEAD (or the range of unpushed commits if commits already exist) for these signals:
Breaking — hold the push:
NOT NULL columns without a defaultNot breaking — safe to push:
When ambiguous, classify as breaking and note why. A conservative hold is recoverable; an accidental push of broken interfaces is not.
Stage all changes and commit:
git add <specific files> # prefer explicit over git add -A
git commit -m "<message>"
Commit message convention:
feat: new capabilityfix: bug fixdocs: documentation onlyrefactor: restructure, no behavior changechore: maintenanceBREAKING CHANGE: <description> in the commit footer when applicableIf commits already exist but are unpushed, skip the commit step — just classify and push or hold.
Once changes are committed and classified as not breaking, integrate this session's work into main.
Identify the branches related to this session:
mainIf the current branch is main and no other session branches exist, skip to Step 6.
If breaking changes were detected in Step 3, do NOT merge. Leave the work on its branch and go to Step 6 (hold) — merging breaking changes into main defeats the purpose of the hold.
For each related branch:
git checkout main
git pull --ff-only # sync main before merging
git merge --no-ff <branch> # bring the session branch into main
git branch -d <branch>.When it is unclear which branches belong to this session, ask the user rather than merging everything.
Push main (now holding the merged work):
git push
Report: "Session closed. Related branches merged to main and pushed to GitHub."
Do NOT merge to main and do NOT push. Leave the work on its branch.
Add a [P0] item to .agents/TODO.md:
- [ ] **[P0]** Push breaking changes from session YYYY-MM-DD — [what is breaking and what work must complete first]
Commit this TODO update if not already included, then report:
Session closed locally on branch <branch>. NOT merged to main, NOT pushed.
Breaking changes detected:
- [specific change 1]
- [specific change 2]
Added [P0] to .agents/TODO.md.
Merge to main and push when:
1. All related work is complete, OR
2. You say "push anyway"
If the user explicitly says "push anyway", "force push", or similar — merge the related branches to main (Step 5) and push immediately without further checks. Record nothing in TODO.
| Excuse | Reality |
|---|---|
| "Small change, probably not breaking" | Impact is what matters, not size. Rename a single export and every caller breaks. Classify by effect. |
| "The breaking change is intentional, so it's fine" | Intent doesn't unbreak callers. Hold until downstream work lands. |
| "I'll push the docs update even if the code is breaking" | All staged changes travel in the same push. Hold everything or push everything. |
| "Nothing to commit, nothing to do" | If the session established new conventions, docs need updating even without code changes. |
| "I already know what the docs say" | The session may have shifted implicit conventions. Read before declaring docs current. |
| "I'll skip managing-agent-instructions — the docs look fine" | "Looks fine" from memory is not the same as confirming currency. Invoke the skill. |
| Scenario | Action |
|---|---|
| Only docs changed | Update → commit → merge to main → push |
| Code changed, not breaking | Update docs → commit → merge to main → push |
| Code changed, breaking | Update docs → commit → add [P0] TODO → hold on branch, no merge |
| Nothing to commit | Confirm docs current → report clean state |
| Merge conflict on main | Stop, report conflicting files, ask the user how to proceed |
| User says "push anyway" | Merge to main → push immediately, no TODO needed |
Follows:
executing-plans — run after all plan steps complete, before declaring donesubagent-driven-development — run after all tasks completeDistinct from finishing-a-development-branch:
finishing-a-development-branch guides the merge strategy decision (merge locally / open PR / discard) when you need to deliberate how completed work should landclose-session handles session hygiene (docs + straightforward merge of related branches to main + safe push) at the end of any session, regardless of whether the feature is "done"finishing-a-development-branch first when the integration strategy is non-obvious (e.g. the work should become a PR rather than a direct merge); otherwise close-session's Step 5 merge is sufficientnpx claudepluginhub mlarkin00/active-skillsGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.