close-session
Close Session
Save progress, update memory, regenerate navigation, and ensure system integrity.
Purpose
The close-session skill is the most critical system skill. It ensures nothing is ever lost by:
- Reading and updating project progress from steps.md checkboxes
- Validating workspace-map.md accuracy (auto-detect mismatches)
- Updating memory with decisions and patterns
- Cleaning temporary files from root folder
- Creating historical session reports
- Displaying comprehensive summary
CRITICAL: This skill is AUTO-TRIGGERED by all other skills and projects (not user-dependent!).
Execution Sequence
- Initialize TodoWrite with all 10 steps (MANDATORY - prevents skipped steps)
- Load workflow.md
- Execute steps 1-10 sequentially
- Mark each step complete in TodoWrite as you finish it
Critical Rules
- TodoWrite is MANDATORY: Initialize at start with all 10 steps - prevents forgetting critical steps
- PLANNING phase projects: Skip task completion (Step 2/2.5)
- IN_PROGRESS phase projects: Auto-complete if execution signals detected
- Session reports: Create in 01-memory/session-reports/
- Summary display: ≤5 lines per orchestrator.md rule
Key Features
Automatic & Interactive Task Completion
Smart task completion with automatic detection:
- Automatic Bulk Complete: If project work completed this session, auto-marks all tasks
- Manual Bulk Option: If auto-detect missed it, offers bulk-complete during review
- Interactive Review: Shows first 10 unchecked tasks for manual selection
- User selects by number ("1, 3, 5"), "all", "bulk complete", or "none"
- Updates tasks.md automatically (via Edit tool or bulk-complete script)
- Recalculates progress after any changes
Temp File Cleanup
Interactive cleanup with user choices:
- Scans root folder for temp files
- Asks what to do with each: keep, delete, or skip
- Moves preserved files to project outputs/
- Reports cleanup summary
Session Reporting
Creates historical record:
- Generates session report in 01-memory/session-reports/
- Includes work completed, progress, decisions, patterns
- Provides context for next session
Progress Tracking
Auto-calculates from checkboxes:
- Counts total tasks (all
- [ ]and- [x]) - Counts completed tasks (only
- [x]) - Determines status (PLANNING/IN_PROGRESS/COMPLETE)
- Identifies next task
Auto-Trigger Support
Called automatically by other skills:
- create-project
- validate-system
- Any skill completion
Memory Preservation
THE critical persistence mechanism:
- Creates session reports
- Cleans temp files
Without this skill, context does NOT persist across sessions!
Workflow Overview
Complete workflow with all 9 steps: See workflow.md
Steps (from workflow.md):
- Read project state (skip if no IN_PROGRESS projects)
- Review task completion (skip if PLANNING phase)
- Update maps
- Get timestamp
- Update memory
- Clean temp files (delete .md files not in system folders)
- Create session report
- Display summary (≤5 lines)
- Mark complete
- Instruct fresh session
Integration
Auto-Trigger Format
When called by other skills:
Auto-triggering close-session skill...
[Full workflow executes]
Session saved! ✅
[Summary displays]
User-Trigger Format
When user says "done for now":
Closing your session...
[Full workflow executes]
Session saved! ✅
[Summary displays]
All Skills Must End With
Every skill and project workflow should conclude with:
### Final Step: Close Session
Auto-trigger close-session skill to save progress
This ensures:
- Progress is saved
- Maps are updated
- Session is recorded
- Nothing is lost
Error Handling
For complete error scenarios and solutions, see error-handling.md
Common Scenarios:
No active project → Skip project steps, continue with maps and cleanup
Missing tasks.md → Report in summary, suggest validate-system
Corrupted memory → Rebuild from scan, report issue
Map generation fails → Keep old maps, report error, suggest retry
User doesn't respond → Default to "skip" for temp files
Critical Notes
Memory Preservation
This skill is the ONLY way to:
- Create historical session reports
- Clean temporary files from workspace
Context Persistence
Without this skill running at session end:
- Progress updates are lost
- Navigation maps become stale
- No historical record is created
- Temp files accumulate
Never skip this skill - it's the foundation of context preservation!
Workflow Philosophy
This skill embodies the Nexus philosophy:
- Memory preservation: Nothing is ever lost
- Context awareness: Full system state captured
- Progressive disclosure: Load what you need, when you need it
- User collaboration: Interactive choices for important decisions
Resources
references/
- workflow.md: Complete 9-step workflow (with TOC)
- error-handling.md: All error scenarios and solutions
Integration with bulk-complete Skill
This skill uses the bulk-complete system skill for efficient task completion:
Step 2 & 2.5: Auto-runs bulk-complete when project work is done
python 00-system/skills/bulk-complete/scripts/bulk-complete.py --project [ID] --all --no-confirm
See bulk-complete/SKILL.md for standalone usage, all options, and test coverage details.
Remember: This is THE most important system skill. Every session MUST end with close-session to preserve context!
More from abdullahbeam/nexus-design-abdullah
mental-models
Load when user says "mental model", "think through this", "structured thinking", "help me decide", "analyze this problem", "first principles", "pre-mortem", "stakeholder mapping", "what framework should I use", or any specific model name. Provides 59 thinking frameworks for decision-making, problem decomposition, and strategic analysis.
64notion-connect
Connect to any Notion database by name. Load when user mentions 'notion', 'connect notion', 'setup notion', 'query [database-name]', 'add to [database]', 'notion databases', or any database name from persistent context. Meta-skill that discovers workspace, caches schemas, and routes to appropriate operations.
24google-tasks
Manage Google Tasks and task lists. Load when user mentions 'google tasks', 'tasks', 'todo list', 'create task', 'complete task', or references task/todo management.
21google-sheets
Read and write Google Sheets data. Load when user mentions 'google sheets', 'spreadsheet', 'update sheet', 'read sheet', 'append to sheet', or references extracting data to update a tracking sheet.
20airtable-master
Shared resource library for Airtable integration skills. DO NOT load directly - provides common references (setup, API docs, error handling, field types) and scripts used by airtable-connect, airtable-query, and airtable-sync.
19google-integration
Complete Google Workspace integration (Gmail, Docs, Sheets, Calendar, Drive, Tasks, Slides). Load when user mentions 'google', 'gmail', 'email', 'google docs', 'google sheets', 'spreadsheet', 'google calendar', 'schedule meeting', 'calendar', 'google drive', 'upload file', 'download file', 'google tasks', 'todo', 'google slides', 'presentation', or any Google service operation.
18