ce-session-extract
Original:🇺🇸 English
Translated
2 scripts
Extract conversation skeleton or error signals from a single session file at a given path. Invoked by session-research agents after they have selected which sessions to deep-dive — not intended for direct user queries.
5installs
Added on
NPX Install
npx skill4agent add everyinc/compound-engineering-plugin ce-session-extractTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Session extract
Agent-facing primitive. Extract filtered content from a single Claude Code, Codex, or Cursor session file — either a conversation skeleton or error signals.
This skill exists so that agents do not read multi-megabyte session files into context. The scripts under own the JSONL shape knowledge and emit a narrative-readable digest.
scripts/Arguments
Space-separated positional args:
- — absolute path to a session JSONL file (typically a
<file>value returned byfile).ce-session-inventory - —
<mode>orskeleton.errors - (optional) —
<limit>orhead:Nto cap output at N lines (e.g.,tail:N). Omit to return full extraction.head:200
Execution
Skeleton mode — narrative of user messages, assistant text, and collapsed tool-call summaries:
bash
cat <file> | python3 scripts/extract-skeleton.pyErrors mode — just error signals:
bash
cat <file> | python3 scripts/extract-errors.pyIf is , pipe through . If , pipe through . Apply the limit after the Python script, never before — the line is emitted last and a head cap may drop it; that is acceptable when the caller asks for a head cap.
<limit>head:Nhead -n Ntail:Ntail -n N_metaReturn the raw stdout verbatim. Do not paraphrase, annotate, or synthesize — the caller does synthesis across multiple sessions.
What each mode returns
Skeleton
Narrative output with one logical event per block, separated by :
---- User messages (text only, no tool results, framework wrapper tags stripped)
- Assistant text (no thinking/reasoning blocks — those are internal or encrypted)
- Tool call summaries; 3+ consecutive same-name calls are collapsed (e.g., )
[tools] 5x Read (file1, file2, +3 more) -> all ok
Ends with a line: .
_meta{"_meta": true, "lines": N, "parse_errors": N, "user": N, "assistant": N, "tool": N}Errors
One line per error, separated by :
---- Claude Code: tool results with
is_error: true - Codex: events with non-zero exit or non-empty stderr
exec_command_end - Cursor: always empty — Cursor agent transcripts do not log tool results
Ends with a line: .
_meta{"_meta": true, "lines": N, "parse_errors": N, "errors_found": N}Error handling
If the file cannot be read, let the error surface to the caller. If reports , return the output as-is — partial extraction is still useful and the caller decides whether to widen the search or deep-dive further.
_metaparse_errors > 0