dotfiles/dot_config/opencode/skills/ce-session-extract/SKILL.md
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.
npx skillsauth add pkking/dotfiles ce-session-extractInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 scripts/ own the JSONL shape knowledge and emit a narrative-readable digest.
Space-separated positional args:
<file> — absolute path to a session JSONL file (typically a file value returned by ce-session-inventory).<mode> — skeleton or errors.<limit> (optional) — head:N or tail:N to cap output at N lines (e.g., head:200). Omit to return full extraction.Skeleton mode — narrative of user messages, assistant text, and collapsed tool-call summaries:
cat <file> | python3 scripts/extract-skeleton.py
Errors mode — just error signals:
cat <file> | python3 scripts/extract-errors.py
If <limit> is head:N, pipe through head -n N. If tail:N, pipe through tail -n N. Apply the limit after the Python script, never before — the _meta line is emitted last and a head cap may drop it; that is acceptable when the caller asks for a head cap.
Return the raw stdout verbatim. Do not paraphrase, annotate, or synthesize — the caller does synthesis across multiple sessions.
Narrative output with one logical event per block, separated by ---:
[tools] 5x Read (file1, file2, +3 more) -> all ok)Ends with a _meta line: {"_meta": true, "lines": N, "parse_errors": N, "user": N, "assistant": N, "tool": N}.
One line per error, separated by ---:
is_error: trueexec_command_end events with non-zero exit or non-empty stderrEnds with a _meta line: {"_meta": true, "lines": N, "parse_errors": N, "errors_found": N}.
If the file cannot be read, let the error surface to the caller. If _meta reports parse_errors > 0, return the output as-is — partial extraction is still useful and the caller decides whether to widen the search or deep-dive further.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
data-ai
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
development
Run the full autonomous engineering pipeline end-to-end (plan, work, code review, test, commit, push, open PR, watch CI, fix CI failures until green). Use only when the user explicitly requests hands-off execution of a software task and provides a feature description; do not auto-route casual conversation here.
development
Create an isolated git worktree for parallel feature work or PR review. Use when starting work that should not disturb the current checkout, or when `ce-work` or `ce-code-review` offers a worktree option.