ce-session-inventory

Discover AI coding session files and extract metadata as JSONL across Claude Code, Codex, and Cursor.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Norfolk-Group/marcela-norfolk-ai --skill ce-session-inventory-norfolk-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-session-inventory
Source: https://github.com/Norfolk-Group/marcela-norfolk-ai/tree/main/skills/compound-engineering/skills/ce-session-inventory
Command: npx skills add https://github.com/Norfolk-Group/marcela-norfolk-ai --skill ce-session-inventory-norfolk-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Agents researching past AI coding sessions need to know where Claude Code, Codex, and Cursor store session files on disk and how each platform's JSONL format is structured. This Skill hides that platform-specific knowledge behind a single discovery-and-metadata pipeline. ## Core Features & Use Cases - Cross-Platform Discovery: Finds session JSONL files for a given repo across Claude Code, Codex, and Cursor within a configurable day window. - Metadata Extraction: Emits one JSON object per session with platform, timestamps, branch, cwd, model, size, and session ID, plus a final _meta summary line. - Keyword Ranking: Optionally filters and ranks sessions by case-insensitive keyword matches in actual user/assistant text, excluding tool calls and metadata fields. - Use Case: A session-research agent needs all Claude Code and Codex sessions from the last 7 days for repo 'my-project' mentioning 'auth' — it runs the pipeline with --keyword auth and parses the JSONL output directly. ## Quick Start Ask the agent to inventory all coding sessions for your repo from the past week across Claude Code, Codex, and Cursor, optionally filtered by a topic keyword.

Frequently Asked Questions about ce-session-inventory

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

FAQPage Schema
How do I find past Claude Code, Codex, and Cursor sessions for a repo?

Run the discover-sessions.sh script with the repo folder name and a day window, then pipe the file list into extract-metadata.py. It searches ~/.claude/projects, ~/.codex/sessions, ~/.agents/sessions, and ~/.cursor/projects for JSONL files modified within the window.

How to filter coding session history by keyword?

Pass --keyword with comma-separated terms to extract-metadata.py. It counts case-insensitive matches only in user and assistant message text, skipping tool calls, tool outputs, and JSONL metadata fields, and excludes sessions with zero matches.

What metadata is extracted from each session JSONL file?

Each session line includes platform, file path, size, start timestamp, and session ID. Claude Code adds git branch and last timestamp; Codex adds cwd, source, CLI version, and model; Cursor derives timestamps from file mtime since its transcripts lack in-file metadata.

Why do Codex sessions from other repos appear in results?

Codex session discovery is not repo-scoped on disk, so it returns sessions across all repos. The --cwd-filter option drops sessions whose recorded working directory does not contain the repo name, and the count is reported as filtered_by_cwd in the _meta line.

What happens when no session files are found?

The pipeline still emits a clean _meta line with files_processed set to 0 and parse_errors set to 0. Callers can rely on this consistent JSONL shape instead of handling an empty or error result.