context-scan

Scan Claude session logs for insights after Stop hook failures.

2|1|Updated Apr 10, 2023
One-click install
npx skills add https://github.com/popoffvg/dotfiles --skill context-scan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-scan
Source: https://github.com/popoffvg/dotfiles/tree/main/harness/plugins/memory-keeper/skills/context-scan
Command: npx skills add https://github.com/popoffvg/dotfiles --skill context-scan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps recover insights from Claude session logs when the Stop hook fails, ensuring important context is not lost.

Core Features & Use Cases

  • Session discovery: scans ~/.claude/projects for recent .jsonl session files within the time window and skips the active session.
  • Conversation extraction: pulls user and assistant messages, excluding command/system/local prefixes and limiting to 4000 characters per session.
  • Entry generation & deduplication: identifies topics, assigns classifications (insight, agent_edit, task, none), writes wiki-formatted entries, and deduplicates against existing content.
  • Tracking & scheduling: marks scanned sessions in <insights_root>/.scanned_sessions to prevent reprocessing and supports cron-driven runs.

Quick Start

Run /context scan to start scanning the past hour of Claude sessions.

Frequently Asked Questions about context-scan

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

FAQPage Schema
How do I recover insights from Claude session logs when the Stop hook fails?

Recovering insights from Claude session logs involves scanning .jsonl files in ~/.claude/projects to extract conversations, classify topics, and generate wiki-formatted entries that capture missed context.

What is the best way to automate Claude session log analysis for missed context?

Automating Claude session log analysis is best done by scheduling hourly cron sweeps that scan .jsonl files, deduplicate topics, and track processed sessions to prevent reprocessing.

Does context-scan process the currently active Claude session?

No, context-scan excludes the currently active Claude session during discovery. It only scans historical .jsonl session files within the specified time window to safely extract missed insights.

How do I extract and classify topics from Claude conversation logs into a wiki format?

Extracting and classifying topics from Claude logs requires pulling user and assistant messages up to 4000 characters, assigning classifications like insight or task, and writing the output as wiki-formatted entries.

Can I limit the character extraction size when scanning Claude session logs?

Yes, conversation extraction limits pulled user and assistant messages to 4000 characters per session, ensuring the log scanning process remains efficient while capturing meaningful context.

Why does my Claude session log scanning reprocess the same files repeatedly?

Repeated processing occurs if tracking fails. The skill marks scanned sessions in a .scanned_sessions file within the insights root directory to prevent duplicate processing of previously analyzed logs.