session-exit
Write chat log + update Productivity & Routine doc + handoff if context is low. Use when Priscila says "exit" / "closing" / "done for today" / "new chat" / "I'm gonna start a new chat". Do not use mid
Files1
View on GitHubSKILL.mdskills/shared/session-exit/SKILL.md
GitHubSession Exit Log
When to use
- User says: exit, closing, done for today, that's all, bye, new chat, I'm gonna start a new chat, context is full
- Session summary auto-generated by the harness
- Before a long break
When NOT to use
- Mid-task
- No work was done this session
Steps (run all three — Priscila's rule)
STEP 1 — Chat log to Drive
- Folder ID:
1qitnbz5_8tfZI2rnTogV1zLLLLOwFVCw(Chat Logs) - Doc name:
LOG_YYYY-MM-DD_HHMM - Content must include: date + duration estimate, what was discussed, what was implemented (files/cells/runs with IDs), what was promised but NOT done (carry-forward), Drive links.
Route A (preferred): Composio
- Create empty Doc via
mcp__claude_ai_Google_Drive__create_file(mimeType: application/vnd.google-apps.document, parents: Chat Logs folder) - Write content via Composio
GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN - IMPORTANT — no markdown tables (cause 400 INVALID_ARGUMENT). Use plain text with labels.
Route B: OAuth Docs API
from googleapiclient.discovery import build
creds = Credentials.from_authorized_user_file('~/ClaudeWorkspace/Credentials/sheets_token.json')
docs = build('docs','v1',credentials=creds)
docs.documents().batchUpdate(documentId=DOC_ID, body={'requests':[{'insertText':{'location':{'index':1},'text':CONTENT}}]}).execute()
Route C: Upload plain text file via Drive OAuth (drive.files().update with text/plain mimetype, supportsAllDrives=true).
Retention: keep last 7 days, delete older.
STEP 2 — Productivity & Routine doc
- Doc ID:
1wVBuNOuOufT8WP4KCrrlVbKWRmQZjKvqmia1soUEBZE - Read current content, then:
- Mark tasks completed this session as DONE (or remove)
- Add any NEW ongoing tasks that came up
STEP 3 — Handoff (only if context near limit OR session was long)
- Folder ID:
1b8Cfc8lJhu5unDaxDQIdo4xdN6X7n1nS(Productivity & Routine folder) - Doc name:
HANDOFF_YYYY-MM-DD - Content: What was done + what is pending (priority-ordered) + errors + fixes + key IDs + which skill to invoke next
STEP 4 — Confirm
Reply: Session log saved to Chat Logs/LOG_<date> + Drive link.
Reference scripts (reuse)
- Sheets append pattern:
~/.claude/scripts/sync_lessons.py - Drive search:
reference_active_connections.md→ "Drive Search & Access — 3 Routes"
Notes
- Never give up and tell Priscila to add it manually. Always try all 3 routes.
- The sync_lessons.py Stop hook (in settings.json) auto-pushes lesson rules to Sheets — it does NOT replace this skill.