trace-lookup

trace-lookup is a skill for Claude Code, Codex from Prism-Shadow/penguin-harness. It costs 57 tokens per session (941 once invoked), scanned A, original, Apache-2.0.

A lookup method for finding earlier messages, commands, errors, and tool results in an agent's JSONL trace files. JSONL is a text format with one JSON record per line.

In plain words
What is it for?
It helps locate the relevant trace file, search for matching line numbers, and read only the needed records.
Why use it?
It recovers exact details that were removed when a conversation was shortened or moved between models, without reading the entire trace.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps locate the relevant trace file, search for matching line numbers, and read only the needed records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prism-shadow/penguin-harness/trace-lookup
About the project

PenguinHarness is a local-first platform in which multiple AI agents create, evaluate, optimize, and deploy agent applications. It is for people building AI software who want agents to generate applications and improve their own behavior through skills.

Prism-Shadow/penguin-harness · 3,361 stars · on GitHub · penguin.ooo

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.

Any agent
npx skills add Prism-Shadow/penguin-harness --skill trace-lookup
Clone the repo
git clone --depth 1 https://github.com/Prism-Shadow/penguin-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trace-lookup

README.md
[![agentmods](https://agentmods.dev/badge/skills/prism-shadow/penguin-harness/trace-lookup/github.svg)](https://agentmods.dev/skills/prism-shadow/penguin-harness/trace-lookup)
Your own site
<a href="https://agentmods.dev/skills/prism-shadow/penguin-harness/trace-lookup"><img src="https://agentmods.dev/badge/skills/prism-shadow/penguin-harness/trace-lookup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trace-lookup

Your own site · 80×15
<a href="https://agentmods.dev/skills/prism-shadow/penguin-harness/trace-lookup"><img src="https://agentmods.dev/badge/skills/prism-shadow/penguin-harness/trace-lookup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 941 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00057 $0.00941
Opus 5.5 $0.00023 $0.00376
Sonnet 5.5 $0.00011 $0.00188
Haiku 4.5 $0.00006 $0.00094

Measured 14d ago against content hash ffcab6c2c941, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

trace-lookup 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 14d 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.

plugins/trace-lookup/skills/trace-lookup/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trace Lookup

A Trace file is the full record of one model context: every message, tool call, tool output and harness event, one JSON record per line. Use it to recover an exact detail — a command, an error text, a path, what the user said — that is no longer in your context.

Before you start

If the user's message only invokes this skill without a concrete question, ask what they want looked up.

Where the files are

<app_data_dir>/agents/<agent_id>/traces/<yyyy-mm-dd>/<session_id>_<NNN>.jsonl

  • One file per model context. NNN counts up (_001, _002, …) each time the Session's context is compacted or its model is switched. The file a [context_summary] or [model_switch_from] block names is the context you continue from; earlier ones have the same name with a lower number, in the same or an earlier date folder.
  • The highest number under your own Session ID is the file being written now: it is this context, already in front of you.
  • The other names in traces/ are this Agent's other Sessions. A Session ID starts with the time it began: session-<yyyy-mm-dd-hh-mm-ss>-….

Rules

  • Never read or cat a whole Trace file. A record can be very long (a write_file call carries the whole file), and read_file cuts each line at 2,000 characters.
  • Two steps: list the matching line numbers with a search that prints only the match, then read those lines.
  • Read only. Never edit, move or delete a Trace file.

Step 1: find the lines

Use the form for your shell (the Environment section's Shell: line). <file> is the Trace path.

Shell Command
bash, zsh, sh rg -n -o -F '<pattern>' '<file>' (or grep -n -o -F '<pattern>' '<file>')
pwsh, powershell (Select-String -Path '<file>' -SimpleMatch -Pattern '<pattern>').LineNumber
cmd powershell -NoProfile -Command "(Select-String -Path '<file>' -Pattern '<pattern>').LineNumber", with every " of the pattern written as . (role.:.user.,.text)
To find Pattern
what the user said (the harness's own lines, such as the compaction prompt and [context_summary], are user text too) "role":"user","text"
what you replied "role":"assistant","text"
the calls of one tool "name":"exec_command","arguments" (any tool name)
tool outputs "type":"tool_call_output"
one call and its output "tool_call_id":"<id>", with the id from the call's line
where a compaction began and ended "type":"compaction_begin", "type":"compaction_end"
requests that failed "type":"request_end","status":"retryable" (or "fatal")
anything you remember a short piece of the text itself: a file name, an error word. Inside a record a " is written \" and a line break \n

Read the full file on GitHub · 55 lines

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. 14d ago First seen · 55 lines · 57 tokens per session scan A ffcab6c2c941

Subscribe to this mod's changes

trace-lookup is a skill published in the GitHub repository Prism-Shadow/penguin-harness (3,361 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 941 once invoked, about $0.0002 per session on Opus 5.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-11-17.

Related

trace-lookup compared with skills from other repositories

trace-lookup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
trace-lookupPrism-Shadow/penguin-harnessSkill3.4ktodayApache-2.0A57Claude Code, Codex
harness-creatorwalkinglabs/learn-harness-engineeringSkill27k7d agoMITA142Codex
memmy-projectMemTensor/memmy-agentSkill2.4ktodayMITA277Claude Code, Codex
computer-historyMemTensor/memmy-agentSkill2.4ktodayMITA42Claude Code, Codex
docxMemTensor/memmy-agentSkill2.4ktodayMITA40Claude Code, Codex
update-setupMemTensor/memmy-agentSkill2.4ktodayMITA0Claude Code, Codex
skill-creatorMemTensor/memmy-agentSkill2.4ktodayMITA28Claude Code, Codex