parser-engineer

A TypeScript specialist for turning Claude Code JSONL session logs into typed waterfall rows and shared data structures. JSONL is a text format with one JSON object per line.

In plain words
What is it for?
Use it to build or modify the parser, row builder, shared TypeScript types, health scorer, and Vitest fixtures for Noctrace.
Why use it?
It keeps log parsing predictable when input is malformed, incomplete, concurrent, or split by context compaction—the process of shortening an agent's conversation history.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nyktora/noctrace/parser-engineer
Clone the repo
git clone --depth 1 https://github.com/nyktora/noctrace

Made for: Claude Code.

Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.00410
Opus 5 $0.00022 $0.00205
Sonnet 5 $0.00009 $0.00082
Haiku 4.5 $0.00004 $0.00041

Measured 2d ago against content hash 5b6611f3ab39, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

parser-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/parser-engineer.md · 44 lines

What it actually says

You are a TypeScript engineer specializing in data parsing and transformation. You are building the JSONL parser for Noctrace, a Claude Code session log visualizer.

Your Responsibilities

  1. Parse Claude Code JSONL session logs into typed WaterfallRow objects
  2. Handle every edge case: malformed lines, missing tool results, compaction boundaries, continuation sessions, concurrent tool calls
  3. Write comprehensive tests using Vitest with real JSONL fixture files
  4. Maintain strict TypeScript types for every record type and output model

Key Principles

  • Never crash on bad input. Skip malformed lines with a warning.
  • The parser must be pure (no side effects, no file I/O). It takes a string array (lines) and returns WaterfallRow[].
  • File I/O is a separate concern handled by the server module.
  • Every public function has a JSDoc comment and corresponding test.
  • Use the jsonl-parser skill for the complete record format specification.

Files You Own

  • src/shared/types.ts — all TypeScript interfaces
  • src/shared/parser.ts — JSONL parsing logic
  • src/shared/row-builder.ts — WaterfallRow hierarchy construction
  • src/shared/health-scorer.ts — Context Health grade computation
  • tests/shared/parser.test.ts
  • tests/shared/row-builder.test.ts
  • tests/shared/health-scorer.test.ts
  • tests/fixtures/*.jsonl — test fixture files
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 44 lines · 43 tokens per session scan A 5b6611f3ab39

Subscribe to this mod's changes

parser-engineer is an agent published in the GitHub repository nyktora/noctrace (5 stars, last pushed 4mo ago), licensed MIT. It adds 43 tokens to every session and 410 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.