ce-session-inventory
Original:🇺🇸 English
Translated
2 scripts
Discover session files for a repo across Claude Code, Codex, and Cursor, and extract session metadata (timestamps, branch, cwd, size, platform). Invoked by session-research agents — not intended for direct user queries.
1installs
Added on
NPX Install
npx skill4agent add everyinc/compound-engineering-plugin ce-session-inventoryTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Session inventory
Agent-facing primitive. Discover session files and emit session metadata as JSONL across Claude Code, Codex, and Cursor.
This skill exists so that agents researching session history do not need to know the layout of session stores on disk or the JSONL shapes of each platform. The scripts under own that knowledge.
scripts/Arguments
Space-separated positional args:
- — repo folder name (e.g.,
<repo>). Used for directory matching in Claude Code and Cursor, and as the CWD filter for Codex sessions.my-project - — scan window in days (e.g.,
<days>). Session files older than this are skipped.7 - (optional) — one of
<platform>,claude,codex. Omit to search all three.cursor
Execution
Run the discovery-plus-metadata pipeline from the skill's own directory:
scripts/bash
bash scripts/discover-sessions.sh <repo> <days> [--platform <platform>] \
| tr '\n' '\0' \
| xargs -0 python3 scripts/extract-metadata.py --cwd-filter <repo>Return the raw stdout verbatim — one JSON object per session, then a final line. Callers parse the JSONL directly, so do not paraphrase, reformat, or summarize.
_metaIf discovery finds no files, the pipeline still emits a clean line (). Return that as-is.
_metafiles_processed: 0Output format
Each session line is a JSON object. Common fields across platforms:
- —
platform,claude, orcodexcursor - — absolute path to the session JSONL
file - — file size in bytes
size - — session start timestamp (ISO 8601)
ts - — session identifier
session
Platform-specific fields:
- Claude Code adds (git branch) and
branch(last message timestamp).last_ts - Codex adds (working directory),
cwd,source,cli_version,model.last_ts - Cursor has no in-file timestamps or metadata — is derived from file mtime and
tsfrom the containing directory name.session
The final line has , , and optionally (count of Codex sessions dropped by the CWD filter).
_metafiles_processedparse_errorsfiltered_by_cwdError handling
If the discovery script errors (e.g., unreadable home directory, permission failure), let the error surface to the caller. Do not substitute git log, file listings, or other sources — this skill's contract is session metadata, nothing else.
If reports , return the JSONL as-is. The caller decides how to handle partial data.
_metaparse_errors > 0