Agent skill
session-to-brain
Archive a Copilot CLI session to the brain. Creates a daily project file with the session transcript and adds a resume link to the weekly note. Use when ending a significant work session to preserve context for future reference.
Install this agent skill to your Project
npx add-skill https://github.com/jonmagic/skills/tree/main/skills/session-to-brain
SKILL.md
Session to Brain
Archive Copilot CLI sessions to your brain for future reference.
Overview
This skill captures a Copilot session and saves it to your brain in two places:
- Daily Projects - A markdown file with the full session transcript
- Weekly Note - A bullet with the session focus and resume command
When to Use
- At the end of a significant work session you want to preserve
- When switching contexts and want to capture what you accomplished
- Before closing a session you might want to resume later
Inputs
The skill needs:
- Session ID - Available from the session context (look for the session folder path)
- Focus - A brief description of what the session was about (1-5 words)
Detailed Instructions
Step 1: Gather Information
Ask the user for the focus (what was this session about?). The session ID is available from the session context - look for the path like ~/.copilot/session-state/UUID/.
Step 2: Extract Transcript
Run the transcript extraction script:
~/.copilot/skills/session-to-brain/scripts/extract-transcript \
--session-id "SESSION_ID" \
--output "/tmp/session-transcript.md"
Step 3: Create Daily Project File
Run the daily project creation script:
~/.copilot/skills/session-to-brain/scripts/create-daily-project \
--focus "FOCUS" \
--session-id "SESSION_ID" \
--transcript "/tmp/session-transcript.md"
This outputs the path to the created file.
Step 3b: Add Frontmatter
The create-daily-project script does not currently add frontmatter. After the file is created, add frontmatter to it:
node ~/.copilot/skills/frontmatter-add/scripts/add-frontmatter.js "PATH_FROM_STEP_3"
Or generate a TID and add it manually:
node ~/.copilot/skills/frontmatter-add/scripts/generate-tid.js
---
uid: <TID>
type: daily.project
created: <today ISO 8601>
tags: []
links:
related: []
---
Step 4: Update Weekly Note
Run the weekly note update script with the path from step 3:
~/.copilot/skills/session-to-brain/scripts/update-weekly-note \
--focus "FOCUS" \
--session-id "SESSION_ID" \
--daily-project-path "PATH_FROM_STEP_3"
Step 5: Confirm Completion
Report what was created:
- The daily project file path
- The weekly note that was updated
Scripts
All scripts are in ~/.copilot/skills/session-to-brain/scripts/:
| Script | Purpose |
|---|---|
extract-transcript |
Parse events.jsonl into readable markdown |
create-daily-project |
Create numbered file in Daily Projects folder |
update-weekly-note |
Add wikilink + resume command to today's section |
Example Prompts
Archive current session
Archive this session to my brain. The focus was "Proxima abuse research"
Quick archive
Save this session as "OKR pivot planning"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
markdown-to-standalone-html
Convert Markdown documents (*.md files) to self-contained HTML files with embedded images. Use when you need a portable, offline-friendly single HTML file from Markdown—ideal for blog posts, essays, reports, or any content that should work without external dependencies.
brain-operating-system
Quick reference for operating within jonmagic's second-brain workspace. Use when working with files in the brain repository—provides directory structure, naming conventions, append-only norms, wikilink patterns, frontmatter requirements, project conventions, and file organization rules. Essential for understanding where to create files, how to name them, and how to maintain continuity with existing structures.
semantic-commit
Generate semantic commit messages from staged changes. Use when committing code to produce consistent, well-structured commit messages following conventional commit format.
archive-meeting
Archive one or more meetings into the brain repo by importing Zoom transcript folders (~/Documents/Zoom/*) and/or downloaded Teams .vtt files (~/Downloads/*.vtt), then generating a transcript markdown file, an executive summary, and creating meeting notes. Use when the user says "archive meeting", "archive my last meeting", "process these transcripts", or similar.
brain-commit
Analyze changes in the Brain repo and create semantic commits. Use when the user wants to commit their brain changes with meaningful, organized commit messages. Analyzes staged/unstaged changes, groups related files, creates appropriate commits, and pushes without user interaction.
create-bookmark
Save a URL as a bookmark with frontmatter and a blurb or AI summary. Use when the user says "bookmark this", "save this link", or shares a URL they want to remember.
Didn't find tool you were looking for?