github-copilot-sessions
Skill4 starsChanged 3 months agoMITView on GitHub
Find a past GitHub Copilot CLI agent session on this machine by project or topic via BM25 search, then summarize what was done. Use when the user asks "which Copilot session did I do X in", "find the Copilot CLI session where I worked on Y", or wants to locate/recall a previous GitHub Copilot conversation. Reads local ~/.copilot session stores. Not for searching code, git history, or the current live session.
In this repository38 other files it gives its agents.
- skills/take-ownership/AGENTS.mdAGENTS.md
- bitwarden-cliSkill
- blogpostSkill
- build-in-public-reelSkill
- chrome-devtools-remoteSkill
- chrome-useSkill
- claude-maxSkill
- claude-sessionsSkill
- dev-stackSkill
- dev-workflowSkill
- dev-workflow-supervisorSkill
- duckdns-domainSkill
- flutter-android-releaseSkill
- git-worktreeSkill
- google-workspace-cliSkill
- hyperagent-eval-skillSkill
- macro-panelSkill
- mermaid2excalidrawSkill
- naste-slaste-styleSkill
- no-github-backlogSkill
- no-pr-backlogSkill
- opencode-apiSkill
- opencodeSkill
- overflowSkill
- prompt-hermes-aiSkill
- reportSkill
- retrospectiveSkill
- secretsmctlSkill
- solo-founder-meta-agentSkill
- solo-founderSkill
- spaceship-dnsSkill
- take-ownership-meta-agentSkill
- take-ownershipSkill
- telegram-cliSkill
- vercel-lfsSkill
- write-agents-mdSkill
- write-skillSkill
- yc-pitch-deckSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Default path uses FTS5 (fast, already indexed).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
GitHub Copilot Sessions
Locate past GitHub Copilot CLI sessions matching a project and/or topic, then summarize them. Session event logs reach tens of MB. Never read a full events.jsonl into the main context — rank cheaply with the bundled script, then dispatch one subagent per top candidate to grep just the relevant lines.
Storage facts
Two complementary stores live under ~/.copilot/:
1. ~/.copilot/session-store.db (SQLite WAL) — the fast BM25 path.
search_indexis an FTS5 virtual table; its built-inrankcolumn is BM25 (lower = better).- ~15 k indexed rows.
source_type∈{turn, checkpoint_overview, checkpoint_history, checkpoint_work_done, checkpoint_technical_details, checkpoint_files, checkpoint_next_steps, workspace_artifact}. sessions(id, cwd, repository, branch, summary, created_at, updated_at, host_type).turns(session_id, turn_index, user_message, assistant_response, timestamp).
2. ~/.copilot/session-state/<UUID>/events.jsonl — per-session raw event log (one JSON obj/line).
- Each dir also has
workspace.yamlwithsummary:,created_at:,cwd:,repository:. - High-value event types:
session.task_complete→data.summary(markdown recap);session.compaction_complete→data.summaryContent(~9 KB XML);user.message,assistant.message,tool.execution_complete. - Session id = the UUID directory name.
- Used as BM25 fallback (
--no-db) and for the deep-read step.
Procedure
1. Rank candidates cheaply — run the bundled script. Never grep raw event logs yourself first.
python3 <skill-dir>/scripts/search_copilot_sessions.py [--project PATH] [--days N] [--limit N] [--no-db] KEYWORD...
# typical installed path:
python3 ~/.claude/skills/github-copilot-sessions/scripts/search_copilot_sessions.py "docker compose" "deployment"
# with project filter:
python3 ~/.claude/skills/github-copilot-sessions/scripts/search_copilot_sessions.py --project ~/workspace/OpenClawBot "provisioning"
# fallback to pure-Python BM25 over jsonl:
python3 ~/.claude/skills/github-copilot-sessions/scripts/search_copilot_sessions.py --no-db "provisioning"- Default path uses FTS5 (fast, already indexed). Falls through to jsonl BM25 if DB is absent or returns nothing.
- Pass
--no-dbto force the Okapi BM25 path overevents.jsonlfiles (stdlib, k1=1.5, b=0.75). - Pass multiple keyword variants to increase recall (
"merge gate" "PR gate" enforce testing). - Output is JSON:
{"query", "project", "source":"fts5"|"jsonl-bm25", "candidates":[…], "count"}. - No-results case: JSON with empty
candidatesand alooked_fornote. - Browse mode (no keywords): returns most-recent N sessions — use when the user is vague ("what was I doing in X lately").
2. Deep-read the top 2–4 candidates with subagents — in parallel. Send all Task calls in a single message so they run concurrently. Each subagent must:
- Know the exact
session_idand itsevents.jsonlpath:~/.copilot/session-state/<UUID>/events.jsonl. - Grep within the file for the topic keywords; read only the surrounding lines. Forbid reading the whole file.
- Extract the nearby
user.messagecontent and anysession.task_complete.data.summarytext. - Return a compact report: MATCH yes/no + confidence, 3–6 sentence summary of what was done, key files/commands/PRs, session date.
<example>
Subagent prompt:
"Read the Copilot session at ~/.copilot/session-state/4bb4cd86-ab8b-4d6e-9f60-d5d4d16f7237/events.jsonl (JSONL, possibly tens of MB — do NOT read it whole). The user is looking for the session where they worked on **VM provisioning timeouts**. Use `grep -n -i` for 'provisioning', 'timeout', 'hetzner', 'tenant' to find relevant lines, then read only those line ranges (use `sed -n 'START,ENDp'`). Focus on `user.message` content and any `session.task_complete` summary. Report: MATCH yes/no + confidence; 3–6 sentence summary of what was done; key files/PRs/commands; session date. Under 200 words."
</example><example>
User: "find the Copilot session where I fixed the AKS managed identity issue"- Run the script:
python3 ~/.claude/skills/github-copilot-sessions/scripts/search_copilot_sessions.py "AKS managed identity" "azure" --limit 6 - Script returns top 3 candidates via FTS5. Spawn 3 parallel subagents, one per candidate, each grepping for 'managed.identity', 'AKS', 'azure', 'workload.identity'.
- Subagent for session
5c73286dreports MATCH high — foundsession.task_completesummary: "Fixed AKS workload identity binding by patching the federated credential in Terraform." - Present: session
5c73286d, repo VibeTechnologies/OpenClawBot, date 2026-04-18, summary above. Runner-ups: sessiona3f1...(weak match, only 2 keyword hits in turns).</example>
<example>
User: "what was I doing in ~/workspace/paperclip last week?"Browse mode — no specific keywords:
python3 ~/.claude/skills/github-copilot-sessions/scripts/search_copilot_sessions.py --project ~/workspace/paperclip --days 7Returns the 8 most recent sessions for that project. Present titles + dates; ask the user which one to dive into.
</example>
3. Present the best match. Lead with the winning session: session_id, cwd/repository, date, and a summary of what was done. List runner-up candidates as one line each (id, date, why weaker). If nothing matches, show the most recent sessions for the project so the user can redirect.
Notes
session.task_complete.data.summaryis the highest-value ranking signal — it is a markdown recap of the full session. Prioritize it in subagent reads.- GitHub Copilot CLI has no
--resumeequivalent; tell the user the session id and cwd so they can reconstruct context manually. - Browse mode (no keywords): run the script without
KEYWORDargs, optionally with--days N. - The jsonl BM25 path also covers sessions where
assistant.messagecontent is encrypted (blank) — it still scores on user messages, tool outputs, and task summaries.
Done when
The user has the matching session's session_id, cwd/repository, date, and a clear summary of what was accomplished — produced via targeted subagent greps, with the main context never having ingested a full transcript.
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.

