Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Magic-Man-usv0.1.0MIT
Typed Claude Code session parser + MCP tools (list / summarize / tool_calls / export / audit sessions).
You run one by typing its /name in Claude Code.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 caution to review before installing
A command runs shell commands (! syntax) when you invoke it
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Typed, lossless parser for both Claude Code transcripts
(~/.claude/projects/**/*.jsonl) and Codex rollout transcripts
($CODEX_HOME/sessions/**/*.jsonl, normally ~/.codex/sessions), plus a
provider-neutral session-analysis layer (timeline, tool-call pairing, usage/cost)
and a context-map tool built on it.
TRANSCRIPT_RECORD_ADAPTER is a shared Pydantic discriminated union. Its callable
discriminator routes Claude record types (assistant, user, system, …) and
Codex rollout types (session_meta, turn_context, response_item, event_msg,
…) without a format flag. Each provider then has nested discriminated unions for
its own content: Claude message blocks/attachments, and Codex response items/events.
Provider-specific adapters remain available when a caller deliberately wants one
format only.
Parsing is lossless: models keep unknown fields (extra="allow"), and an
unmodeled record/block/attachment/event/response-item type lands in an
Unknown* carrier that still holds its payload—nothing is silently dropped.
This matters especially for Codex because its
hook documentation
explicitly says the transcript format is not a stable interface. The typed
Codex model tracks the current open-source
RolloutItem
and
ResponseItem
definitions while retaining forward-compatible fallbacks.
pip install -e . # or: uv pip install -e .
Parse either provider through one shared boundary:
from pathlib import Path
from cc_session_core import (
ParseFailure,
iter_transcript_records,
parse_transcript_line,
)
rec = parse_transcript_line(line) # -> Claude Record | CodexRecord | unknown fallback
for rec in iter_transcript_records(Path("session.jsonl")):
if isinstance(rec, ParseFailure):
... # file, line_number, error, raw
else:
print(rec.type)
The backward-compatible Claude-only parse_line() / iter_records() API and
the explicit Codex-only parse_codex_line() / iter_codex_records() API are
also available.
Per-tool input/result resolution:
from cc_session_core import parse_tool_input, parse_tool_result, tool_name_index, result_tool_name
typed_input = parse_tool_input(block.name, block.input) # model, or raw value
index = tool_name_index(records) # tool_use_id -> tool name
typed_result = parse_tool_result(result_tool_name(rec, index), rec.tool_use_result)
Analyze a whole session. Session.load() auto-detects the provider and returns
the same normalized timeline/tool/cost views:
from cc_session_core import Session
s = Session.load("session.jsonl")
s.timeline() # ordered, decomposed events (text / thinking / tool_use / tool_result / ...)
s.tool_calls() # every tool_use paired with its tool_result, plus the assistant's "why"
s.cost_summary() # token + cost rollup per model (one API request counted once)
s.label()
s.info() # human title + one-line summary
For Codex, response messages, reasoning, tool calls, tool outputs, compaction,
and usage events are normalized into the canonical view. The original typed
rollout remains available as s.codex_records when isinstance(s, CodexSession).
Codex input_tokens includes cached input, so normalization subtracts
cached_input_tokens before filling the canonical uncached-input field; totals
therefore do not double-count cache reads.
Cost uses cc_session_core.cost.pricing (published list rates in EXAMPLE_PRICING); pass your own PriceTable for a different valuation. Rates are a usage valuation, not a billed amount.
cc-session PATH [--tools] [--queries] [--audit] [--list] [--json] [--strict]
cc-session PATH --export <text|markdown|json|jsonl> [--select k=v ...] [-o OUT]
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Generated from the plugin's indexed repository (magic-man-us/cc-session-core) — no native marketplace selected
npx claudepluginhub p/magic-man-us-cc-session-corePlugins from other owners that cover similar ground