ng-trace

A command for recording an agent's tool calls, decisions, inputs, outputs, token use, and approval steps as a reviewable run record.

In plain words
What is it for?
Use it to support debugging, release reviews, cost or delay checks, incident reviews, and recreating an agent's actions.
Why use it?
It provides organized evidence when a raw chat transcript is not enough to understand or review how an agent reached a result.

Command

Part of the nuclear-grade plugin — 24 skills, 28 commands, 5 agents shipped together

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 commands/flyfission/nuclear-grade-context-engineering/ng-trace
Clone the repo
git clone --depth 1 https://github.com/FlyFission/nuclear-grade-context-engineering

Or install nuclear-grade, the plugin that ships this one along with the rest of its 24 skills, 28 commands, 5 agents.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 796 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.00000 $0.00796
Opus 5 $0.00000 $0.00398
Sonnet 5 $0.00000 $0.00159
Haiku 4.5 $0.00000 $0.00080

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

Security

Grade A, and why

ng-trace 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 3d 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.

commands/ng-trace.md · 68 lines

How it starts

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

ng-trace

Portable command prompt generated from skills/recording-what-an-agent-did/SKILL.md. Edit the skill, then run python tools/ng.py gen-commands; do not edit this file by hand.

Captures an agent run's tool calls, decision points, inputs, outputs, token use, and approval steps as a clear, repeatable record linked into the packet trace and verification record. Use when how the agent got there matters for debugging, auditing, cost review, or defending a release decision. Do not use for a read-only run that changes nothing, or to produce a certified compliance audit trail.

Use when

  • An agent ran tool calls that matter (file writes, API calls, command runs) and the packet needs evidence you can check.
  • A release decision turns on whether the agent followed the plan, the scope, and its power limits.
  • Token use, delay (latency), or cost is one of the things you have to verify for this change.
  • A reviewer or auditor needs to rebuild what the agent did without reading a raw chat log.
  • A review after an incident, or an OPEX review (a lessons-from-operation review), needs repeatable evidence of how the agent behaved.

Do not use when

  • The run was read-only exploring, with no real side effects and nothing riding on a release.
  • The packet mode is Quick and the proof is one simple step that always gives the same answer.
  • A full tracing platform already captures and exports this run data. Link to its output instead of copying it.

Inputs

  • The agent's run log, chat transcript, tool-call records, or trace export.
  • basis.md (the scope the run was meant to stay in, the allowed actions, and the stop conditions).
  • plan.md (the planned order of steps).
  • Token use, delay, and cost data where they matter.
  • Records of human approval steps.

Prompt text

Trace this agent run and produce clear evidence.

Inputs:
- packet: .nuclear/changes/<slug>/
- execution source: <log / transcript / tool-call export>
- authority scope: <basis.md section or inline>
- token/latency data available: <yes/no>
- approval gates exercised: <list or none>

For each consequential step (tool call, file edit, command run, API call,
approval gate):
- Name the action and the tool.
- Record the inputs (shortened) and the output or result.
- Set an evidence status: pass, gap, fail, or not applicable.
- At decision points: record the choice made, the limit applied, and the authority check.
- For approval gates: the reviewer, the date, and the decision.

Return:
- trace rows for trace.md: step, action, inputs, outputs, evidence status.
- the decision-point records.
- a summary of token use and speed (if available).
- a run summary: steps within scope, steps uncertain, and gaps.
- a link from each trace row to the claim in verification.md it supports.

Read the full file on GitHub · 68 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. 3d ago First seen · 68 lines · 0 tokens per session scan A 80fb77adcdd4

Subscribe to this mod's changes

ng-trace is a command published in the GitHub repository FlyFission/nuclear-grade-context-engineering (33 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 796 tokens. 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-30.