Loading...
Loading...
Ingest GitHub Copilot CLI session history into an Obsidian wiki as distilled knowledge pages. Use this skill when the user wants to capture their Copilot CLI sessions into a personal wiki — extracting architecture decisions, debug notes, and patterns into searchable Obsidian pages. Triggers on phrases like "ingest my copilot sessions into obsidian", "add my copilot history to my wiki", "pull my copilot session history into the vault", "capture what I've learned from copilot into obsidian", "just the new sessions since last time", or "mine patterns across my copilot sessions". Also triggers when the user mentions session-store.db, ~/.copilot/session-state, or VS Code copilot-chat transcripts in the context of building a wiki or knowledge base. Does NOT trigger for general copilot usage questions, searching sessions, or backing up history.
npx skill4agent add ar9av/obsidian-wiki copilot-history-ingestwiki-history-ingest/wiki-history-ingest copilot.envOBSIDIAN_VAULT_PATHCOPILOT_HISTORY_PATH~/.copilot/session-stateCOPILOT_VSCODE_STORAGE_PATHworkspaceStorage.env.manifest.jsonindex.md.manifest.jsonupdated_atingested_atwiki-rebuild~/.copilot/session-state/~/.copilot/session-state/
├── <session-uuid>/
│ ├── workspace.yaml # Session metadata (id, cwd, summary_count, created_at, updated_at)
│ ├── vscode.metadata.json # VS Code context (workspaceFolder, repositoryProperties, customTitle)
│ ├── events.jsonl # Full event log — all turns, tool calls, reasoning
│ ├── session.db # Per-session SQLite (todos/todo_deps only — skip for ingestion)
│ ├── index.md # Session summary written at session end
│ ├── checkpoints/ # Checkpoint JSON files (mid-session summaries)
│ │ └── <uuid>.json # title, overview, history, work_done, technical_details,
│ │ # important_files, next_steps
│ ├── files/ # Artifacts produced during session (plans, diagrams, etc.)
│ └── research/ # Research artifacts
└── ...~/.copilot/session-store.dbsessions — id, cwd, repository, branch, summary, created_at, updated_at, host_type
turns — session_id, turn_index, user_message, assistant_response, timestamp
checkpoints — session_id, checkpoint_number, title, overview, history, work_done,
technical_details, important_files, next_steps, created_at
session_files — session_id, file_path, tool_name, turn_index, first_seen_at
session_refs — session_id, ref_type (commit/pr/issue), ref_value, turn_index, created_at
search_index — FTS5 virtual table (content, session_id, source_type, source_id)<workspaceStorage>/<hash>/GitHub.copilot-chat/.env<hash>/GitHub.copilot-chat/
├── transcripts/
│ └── <session-uuid>.jsonl # Conversation transcripts (same JSONL format as events.jsonl)
├── memory-tool/
│ └── memories/
│ └── <base64-session-id>/ # Per-session saved artifacts (plan.md, etc.)
│ └── plan.md
└── codebase-external.sqlite # Codebase index (skip — no conversation knowledge)session-store.dbcheckpointscheckpoints/*.jsonoverviewwork_donetechnical_detailsimportant_filesnext_stepssession-store.dbsessions.summaryindex.mdsession-store.dbturnsevents.jsonlmemory-tool/memories/<id>/plan.mdsession_filestool.execution_*session_refsvscode.metadata.jsoncustomTitle.manifest.json# --- Source 1: per-session directories ---
# Find all session directories (each has workspace.yaml)
ls ~/.copilot/session-state/
# For each session, read workspace.yaml for id/cwd/updated_at
# and vscode.metadata.json for customTitle / repositoryProperties
# --- Source 2: global database ---
# Query session-store.db with sqlite3 (or Python sqlite3)
SELECT s.id, s.cwd, s.repository, s.branch, s.summary, s.updated_at,
COUNT(DISTINCT t.turn_index) AS turn_count,
COUNT(DISTINCT c.id) AS checkpoint_count
FROM sessions s
LEFT JOIN turns t ON t.session_id = s.id
LEFT JOIN checkpoints c ON c.session_id = s.id
GROUP BY s.id
ORDER BY s.updated_at DESC;
# --- Source 3: VS Code workspace storage ---
# For each <hash> directory under workspaceStorage, check for GitHub.copilot-chat/
# Find transcript files
ls <workspaceStorage>/<hash>/GitHub.copilot-chat/transcripts/updated_atsession-store.dbSELECT s.id, s.cwd, s.repository, s.branch, s.summary,
c.checkpoint_number, c.title, c.overview, c.work_done,
c.technical_details, c.important_files, c.next_steps,
c.created_at
FROM checkpoints c
JOIN sessions s ON c.session_id = s.id
ORDER BY s.updated_at DESC, c.checkpoint_number ASC;checkpoints/*.jsontitleoverviewhistorywork_donetechnical_detailsimportant_filesnext_stepsindex.mdoverviewwork_donetechnical_detailsimportant_filesnext_stepssession-store.dbevents.jsonlsession-store.dbSELECT turn_index, user_message, assistant_response, timestamp
FROM turns
WHERE session_id = '<uuid>'
ORDER BY turn_index ASC;events.jsonlreferences/copilot-data-format.md | What it is | Worth reading? |
|---|---|---|
| Session metadata (cwd, branch, version) | Yes — establishes project context |
| User turn | Yes — |
| Assistant turn | Yes — |
| Tool call | Skim — reveals what files/commands were used |
| Tool result | No — usually noise |
assistant.messagedata.contentdata.reasoningTextreasoningOpaquedata.toolRequeststype: "tool.execution_end"memory-tool/memories/<base64-id>/plan.mdimport base64
session_id = base64.b64decode(dir_name).decode('utf-8')skills/concepts/session-store.db-- Most-touched files per project
SELECT repository, file_path, COUNT(*) AS touch_count
FROM session_files
GROUP BY repository, file_path
ORDER BY touch_count DESC;
-- Linked commits/PRs/issues per session
SELECT session_id, ref_type, ref_value, turn_index
FROM session_refs
ORDER BY session_id, turn_index;cwdrepositoryvscode.metadata.jsoncustomTitlecwdrepositoryC:\Users\name\git\my-project → my-project
/Users/name/code/another-app → another-apprepositoryowner/reposession-store.dbcwd| What you found | Where it goes | Example |
|---|---|---|
| Project architecture decisions | | |
| Project-specific debugging patterns | | |
| General concept the user learned | | |
| Recurring problem across projects | | |
| A tool/service used | | |
| Patterns across many sessions | | |
projects/<name>/<name>.md_project.md_project.md_project<name>.mdsummary:wiki-queryllm-wiki^[inferred]^[ambiguous]provenance:.manifest.jsoningested_atsession_idupdated_atsource_type"copilot_session""copilot_checkpoint""copilot_transcript""copilot_memory_artifact"projectpages_createdpages_updatedprojects{
"project-name": {
"repository": "owner/repo",
"cwd": "C:\\Users\\name\\git\\project-name",
"vault_path": "projects/project-name",
"last_ingested": "TIMESTAMP",
"sessions_ingested": 5,
"sessions_total": 8,
"checkpoints_ingested": 12,
"memory_artifacts_ingested": 3
}
}index.mdlog.md- [TIMESTAMP] COPILOT_HISTORY_INGEST projects=N sessions=M checkpoints=C pages_updated=X pages_created=Y mode=append|fullhot.md$OBSIDIAN_VAULT_PATH/hot.mdwiki-ingestupdateddata.reasoningOpaquedata.reasoningTextreferences/copilot-data-format.md