Codex JSONL Usage Parsing with Malformed Records
Design tolerant local JSONL scanning for the Codex Usage Dashboard with structured usage fields and diagnostics.
中文Install in Codex
Open the dashboard project in Codex and provide a sample fixture for the supported fields and broken rows.
- Review `.agents/skills/codex-usage-parser/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.agents/skills/codex-usage-parser/` in your project and save the reviewed file as `.agents/skills/codex-usage-parser/SKILL.md`.
- Start Codex from that project's root, then type `$codex-usage-parser` and select the matching skill.
Example task
Design a local usage-parser fixture with one malformed row.
{"format":"jsonl","lines":["{\"input_tokens\":12}","{broken","{\"input_tokens\":8}"],"metric":"input_tokens"}What to check
Assert `input_tokens=20` and `malformed_lines=1`. The output just needs structured usage and diagnostic fields.
Original SKILL.md on GitHub · Updated
Frequently asked question
What if versions have different field names?
Use the applicable adapter and fixture for each supported structure. Avoid tying a metric to one schema.