close-session

Summarizes the active session into its notes.md and appends a closing Session history entry.

6|1|Updated Jun 6, 2026
One-click install
npx skills add https://github.com/t-mercier/ai-agents-orchestrator --skill close-session-t-mercier
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: close-session
Source: https://github.com/t-mercier/ai-agents-orchestrator/tree/main/skills/close-session
Command: npx skills add https://github.com/t-mercier/ai-agents-orchestrator --skill close-session-t-mercier

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long AI coding sessions lose their context when they end — decisions, files touched, and next steps vanish, forcing the next session to start from nothing. This Skill wraps up the active session by writing a structured summary into its registered notes.md so work can be resumed later without re-discovery. ## Core Features & Use Cases - Session summary generation: Collects decisions made, files touched, open questions, and a prioritized next-steps queue from the current conversation and updates the matching sections in notes.md. - Frontmatter refresh: Auto-attaches GitHub PR links (via gh CLI and conversation scan) and ticket IDs, recording per-ticket status without overwriting existing values. - Session history marker: Appends a dated closing entry that marks the session Closed in the dashboard, with duplicate-close protection. - Optional knowledge distillation: When a vault is configured, promotes reusable decisions through the /learn skill, and can stage skill proposals under ~/.claude/skills-pending/ when enabled. - Use Case: After finishing a feature branch, run the close command to record what was decided, link the PR and ticket, and leave a clean next-steps queue for whoever resumes the session. ## Quick Start Ask the assistant to wrap up and save this session's notes by saying "close this session and save the session notes".

Frequently Asked Questions about close-session

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save AI session notes before closing a session?▼

Run the close-session command, which summarizes the conversation into the session's notes.md: decisions made, files touched, open questions, and a rewritten next-steps queue. It also appends a dated Session history entry that marks the session as closed.

How does the skill find which notes.md belongs to the current session?▼

It resolves the session ID by walking the process ancestry against ~/.claude/sessions/*.json, then looks up notes_path in active-sessions.json. If missing, it greps category folders for a notes.md containing a matching session=<id> history line.

Does close-session work with GitHub pull requests and tickets?▼

Yes. It runs gh pr view on the current branch and scans the conversation for PR URLs, appending new links to pr_link/pr_links frontmatter without removing existing ones. Ticket IDs matching the PROJECT-123 pattern are uppercased, added to ticket/tickets, and their observed status is recorded in ticket_states.

What happens if no active session is registered for this conversation?▼

The skill stops and tells you there is no active session registered. You must first run /start-session for a new session or /restart-session <slug> to resume an existing one before closing.

Why does close-session refuse to run in plan mode?▼

Plan mode blocks file writes, and this skill edits notes.md and appends history entries. It detects the plan mode reminder, prints a warning, and instructs you to switch to auto mode before re-running.

When does close-session write knowledge notes to a vault?▼

Only when a vault is configured for the session's category via aoconfig. It then delegates to the /learn skill, writing one atomic note per decision with origin: close-session, and marks promoted bullets in notes.md so they are not promoted twice.