From ctx
Ingest an AI coding session transcript (JSONL) into the ctx context graph. Extracts metadata, topics, highlights, artifacts, and relationships, then creates/updates nodes and edges. Use when the user provides a session file path or session ID to ingest.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ctx:ingest-sessionThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Parse a session transcript and build the corresponding graph.
Parse a session transcript and build the corresponding graph.
The user provides one of:
.jsonl)~/.claude/projects/*/SESSION_ID.jsonl or ~/.codex/sessions/**/*SESSION_ID*.jsonlctx search to find candidatesctx find Session "session_id^=SESSION_ID_PREFIX"
If found, enrich it (add highlights, update summary). If not, create it.
Session JSONL has one JSON object per line. Relevant line types:
type: "user" — has sessionId, gitBranch, cwd, message.contenttype: "assistant" — has message.model, message.content (text and tool_use)type: "system" / type: "file-history-snapshot" — skip theseExtract from the first user message: sessionId, gitBranch, cwd, message.content (first prompt).
Extract from assistant messages: message.model.
For large files, use an Agent to read in chunks and extract: title, summary, detail, topics, highlights, artifacts.
Before creating, check what already exists:
ctx find Project "path=THE_CWD"
ctx find Branch "name=THE_BRANCH"
ctx find Topic "name=THE_TOPIC"
Reuse existing nodes. Only create when no match exists.
# Session
ctx add Session session_id=UUID title="Short title" summary="1-2 sentences" \
detail="Narrative" tool=claude model=opus project_path=/path git_branch=branch \
filepath=/path/to/file.jsonl first_prompt="First message"
# Topics (reuse existing)
ctx add Topic name=topic-name description="What this means"
ctx link Session:ID HAS_TOPIC Topic:ID
# Highlights
ctx add Highlight content="One sentence" kind=discovery detail="Full context"
ctx link Session:ID HAS_HIGHLIGHT Highlight:ID
# Artifacts
ctx add Artifact name="groups_finder.rb" kind=file path=app/finders/groups_finder.rb
ctx link Session:ID PRODUCED Artifact:ID
# Cross-references
ctx link Session:ID CONTINUES Session:OTHER reason="Why"
ctx link Highlight:ID REFERENCES Session:OTHER context="What aspect"
ctx link Session:ID IN_PROJECT Project:ID
ctx link Session:ID ON_BRANCH Branch:ID
When reading a transcript, map signals to highlight kinds:
| Signal | Kind |
|---|---|
| "I found that...", surprising measurement, root cause | discovery |
| "Let's go with...", explicit choice between options | decision |
| Dead end, irreducible constraint, "can't because..." | blocker |
| "This means...", pattern recognition, useful connection | insight |
| "We should...", "TODO", future work identified | todo |
Prefer fewer high-quality highlights. A short session might have 2-3. A deep research session might have 8-15.
ctx get Session:ID
$ARGUMENTS
npx claudepluginhub michaelangeloio/ctx --plugin ctxIngests a coding session JSONL into an AKB vault as structured notes, drafting session reports, TILs, tasks, ideas, and decisions.
Analyzes AI coding session transcripts from Claude or Codex to generate structured insights on prompt quality, strategy critique, key decisions, and takeaways for improvement.
Creates session notes from JSONL transcripts and git history when automatic capture failed. Useful for backfilling missing notes.