session-knowledge

Index and retrieve past Copilot/Claude session knowledge via Python scripts.

1|1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/magicpro97/copilot-session-knowledge --skill session-knowledge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-knowledge
Source: https://github.com/magicpro97/copilot-session-knowledge/tree/main/templates
Command: npx skills add https://github.com/magicpro97/copilot-session-knowledge --skill session-knowledge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Session Knowledge skill provides a persistent, cross-session memory for AI coding agents by indexing past Copilot and Claude sessions, enabling them to recall mistakes, patterns, decisions, and configurations to avoid repeating them.

Core Features & Use Cases

  • Cross-session memory by indexing all session data into SQLite FTS5 for fast search.
  • Auto-extracts knowledge into seven categories: mistakes, patterns, decisions, tools, features, refactors, and discoveries.
  • Provides search + briefing capabilities to surface relevant past experience and recommended actions.
  • Sub-agent context injection: inject compact knowledge blocks into sub-agent prompts for efficient reasoning.
  • Knowledge capture workflow: use briefing.py, query-session.py, and learn.py to build and reuse knowledge across tasks.
  • Optional semantic search via embeddings (if configured) to improve meaning-based retrieval.

Quick Start

Use the briefing mix to surface relevant past knowledge before starting a task.

Frequently Asked Questions about session-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I give my AI coding agent cross-session memory to avoid repeating past mistakes?

To give an AI coding agent cross-session memory, you can index past Copilot and Claude session data into SQLite FTS5. This allows the agent to retrieve past mistakes, patterns, and decisions before starting a new task.

Can I inject past session knowledge into sub-agent prompts for complex debugging tasks?

You can inject compact knowledge blocks into sub-agent prompts to provide context for complex debugging tasks. This surfaces relevant past experience and recommended actions directly into the reasoning workflow.

How does semantic search work for retrieving past AI agent decisions and patterns?

Semantic search retrieves past AI agent decisions using optional embedding-based matching. This improves meaning-based retrieval by indexing session data and extracting knowledge into categories like mistakes, patterns, and decisions.

Do I need Python scripts to extract and learn from past Copilot session data?

You need Python scripts like briefing.py, query-session.py, and learn.py located in ~/.copilot/tools to fetch, search, and inject knowledge. These scripts enable the knowledge capture workflow for reusing past task experience.

What categories of knowledge are automatically extracted from past coding sessions?

The system auto-extracts knowledge from past coding sessions into seven categories: mistakes, patterns, decisions, tools, features, refactors, and discoveries. This structured extraction enables fast and targeted retrieval of past experience.

How do I surface relevant past knowledge before starting a new software design task?

Use the briefing mix to surface relevant past knowledge before starting a new software design task. It queries the indexed SQLite FTS5 database to prevent repeating previous design errors and flawed configurations.