session-synthesis
Skill2 starsChanged 7 months agoMITView on GitHub
Process queued Kiro sessions into wiki content. Produces weekly digests and updates self/ profile pages. Trigger: "run session synthesis", "process my sessions", "weekly synthesis", or "session digest".
In this repository26 other files it gives its agents.
- api-and-interface-designSkill
- brainstormingSkill
- ci-cd-and-automationSkill
- code-reviewSkill
- code-simplificationSkill
- context-engineeringSkill
- deprecation-and-migrationSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- grill-meSkill
- mentorSkill
- performance-optimizationSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- security-guidanceSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- verification-phaseSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Before extracting ANY content from sessions, apply these filters:
- Very specific: line 127
Read current wiki/self/*.md pages.
- Very specific: line 128
Add new entries under ## Evolution Log with the week header (### YYYY-WNN)
- Very specific: line 130
Update updated: date in frontmatter
- Distinctive: line 132
Do NOT delete existing evolution log entries — only append.
- Distinctive: line 142
Use first 8 chars of session ID for readability.
- Very specific: line 150
Add new insight pages to wiki/index.md under ## Insights
- Distinctive: line 158
When triggered by "bulk ingest sessions" or "bootstrap second brain":
- Very specific: line 176
Use dispatching-parallel-agents skill if processing multiple independent weeks
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session Synthesis Skill
Process completed Kiro CLI sessions into the wiki second brain.
Trigger
Invoke when the user says any of:
- "run session synthesis"
- "process my sessions"
- "weekly synthesis"
- "session digest"
- "bulk ingest sessions"
- "bootstrap second brain"
Prerequisites
- Queue file:
~/.kiro/session-capture-queue.txt - Processed file:
~/.kiro/session-capture-processed.txt - Sessions dir:
~/.kiro/sessions/cli/ - Wiki self/ pages:
~/wiki/self/ - Wiki insights/:
~/wiki/insights/
Privacy Rules (HARD — never override)
Before extracting ANY content from sessions, apply these filters:
NEVER include in wiki output:
- AWS credentials, access keys, secret keys, session tokens
- API keys, bearer tokens, OAuth tokens
- Passwords, connection strings with embedded credentials
- PII: client names, account numbers, email addresses, phone numbers
- Any string matching:
AKIA[A-Z0-9]{16},[A-Za-z0-9/+=]{40},Bearer [A-Za-z0-9._-]+
OK to include:
- Project names, repo names, service names, tool names
- Architecture decisions, technical approaches
- Working dynamics, professional opinions
- Error messages (with PII stripped)
- Internal business context
Process
1. Read Queue
cat ~/.kiro/session-capture-queue.txtSubtract IDs already in ~/.kiro/session-capture-processed.txt. If nothing to process, report "No new sessions to process" and stop.
For bulk ingest mode: list ALL ~/.kiro/sessions/cli/*.jsonl files, subtract already-processed, process all remaining.
2. Load Sessions
For each unprocessed session ID, read ~/.kiro/sessions/cli/<id>.jsonl.
Parse JSONL — each line is a JSON object:
{"version":"v1","kind":"Prompt","data":{"message_id":"uuid","content":[{"kind":"text","data":"user message text"}],"meta":{"timestamp":1777432077}}}Extract only lines where kind is "Prompt" (user messages). The text is at data.content[].data. The timestamp is at data.meta.timestamp.
Skip kind: "AssistantMessage" — we want the user's voice, not the assistant's.
3. Extract Signals (use subagents for batches)
For each batch of sessions, dispatch a subagent to extract:
- Decisions made — architectural choices, tool selections, approach changes
- Topics worked on — projects, features, bugs, infrastructure
- Tools & techniques — new tools adopted, techniques tried
- Frustrations — complaints, repeated issues, things that wasted time
- Learnings — "aha" moments, things discovered, corrections received
- Goals mentioned — explicit goals, progress updates, aspirations
- Voice patterns — how the user communicates (terse? detailed? emotional?)
- Values signals — what the user prioritises, rejects, or insists on
Subagent prompt should include the privacy rules and instruct: "Extract ONLY from user prompts. Do not include any credentials, tokens, API keys, or PII."
4. Produce Weekly Digest
Group sessions by ISO week (use timestamp from first prompt in each session). For each week with new sessions, create or update:
~/wiki/insights/YYYY-WNN-synthesis.md
Format:
---
title: "Week NN, YYYY — Session Synthesis"
type: insight
created: YYYY-MM-DD
week: YYYY-WNN
sessions_processed: N
---
# Week NN, YYYY
## What I Worked On
- [bullet points with [[wikilinks]] to project pages where relevant]
## Decisions Made
- [link to wiki/decisions/ pages if formal ADRs exist]
## New Tools & Techniques
- [tools discovered or adopted]
## Frustrations
- [recurring pain points, wasted time]
## Progress Toward Goals
- [movement on stated goals]
## Patterns & Shifts
- [emerging patterns, interest shifts, behaviour changes]5. Update Self Pages
Read current wiki/self/*.md pages. For each page:
- Add new entries under
## Evolution Logwith the week header (### YYYY-WNN) - Rewrite
## Current Understandingto reflect the latest synthesised state - Update
updated:date in frontmatter
Do NOT delete existing evolution log entries — only append.
6. Update Session Log
Append to wiki/insights/session-log.md table:
| YYYY-MM-DD | <session-id-short> | One-line summary |Use first 8 chars of session ID for readability.
7. Mark Processed
Append all processed session IDs to ~/.kiro/session-capture-processed.txt (one per line).
8. Update Wiki Metadata
- Add new insight pages to
wiki/index.mdunder## Insights - Append operation to
wiki/log.md:| YYYY-MM-DD | session-synthesis | Processed N sessions, created/updated M insight pages |
Bulk Ingest Mode
When triggered by "bulk ingest sessions" or "bootstrap second brain":
- List ALL
~/.kiro/sessions/cli/*.jsonlfiles - Subtract already-processed IDs
- Sort chronologically (by file mtime or first prompt timestamp)
- Process in batches of 20-30 sessions per subagent
- Produce weekly digests for all historical weeks
- Build comprehensive initial
self/pages from the full corpus - Report progress after each batch: "Processed batch N/M (sessions X-Y)"
This will take significant time for large corpora. Be patient and report progress.
Subagent Strategy
- One subagent per batch of 10-20 sessions (keeps context focused)
- Each subagent returns structured extraction (decisions, topics, tools, frustrations, learnings, goals, voice, values)
- Main agent merges extractions and writes wiki pages
- Process in chronological order so patterns emerge naturally
- Use
dispatching-parallel-agentsskill if processing multiple independent weeks
Example Invocation
User: "run session synthesis"
Agent:
- Reads queue → finds 5 unprocessed sessions
- Loads JSONL files, extracts user prompts
- Dispatches subagent with prompts for extraction
- Receives structured signals
- Groups by week → all in 2026-W18
- Creates
wiki/insights/2026-W18-synthesis.md - Updates
wiki/self/pages with new patterns - Appends to session-log.md
- Marks 5 sessions as processed
- Reports: "Synthesised 5 sessions into Week 18 digest. Updated voice.md, interests.md."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

