trace

trace is a command for Claude Code from viacheslav-tronko/claude-code-harness. It costs 154 tokens per session (1,185 once invoked), scanned A, original, MIT.

A white-box tracing command for following actual code paths or testing whether a proposed explanation or plan can be disproved. White-box tracing means examining internal control flow rather than only checking inputs and outputs.

In plain words
What is it for?
Use it to trace a file and line, investigate a root-cause analysis, verify an implementation plan, or inspect completed code. It supports real traversal with optional mutation testing and virtual pre-implementation checks, while leaving source code unchanged.
Why use it?
It exposes incorrect assumptions about how code executes before they cause a faulty fix. Its checks require evidence from the code and deliberately try to disprove apparently successful results.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Good fit Use it to trace a file and line, investigate a root-cause analysis, verify an implementation plan, or inspect completed code. It supports real traversal with optional mutation testing and virtual pre-implementation checks, while leaving source code unchanged.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/viacheslav-tronko/claude-code-harness/trace
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.

Clone the repo
git clone --depth 1 https://github.com/viacheslav-tronko/claude-code-harness

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/viacheslav-tronko/claude-code-harness/trace/github.svg)](https://agentmods.dev/commands/viacheslav-tronko/claude-code-harness/trace)
Your own site
<a href="https://agentmods.dev/commands/viacheslav-tronko/claude-code-harness/trace"><img src="https://agentmods.dev/badge/commands/viacheslav-tronko/claude-code-harness/trace/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

Your own site · 80×15
<a href="https://agentmods.dev/commands/viacheslav-tronko/claude-code-harness/trace"><img src="https://agentmods.dev/badge/commands/viacheslav-tronko/claude-code-harness/trace.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,185 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.00154 $0.01185
Opus 5.5 $0.00062 $0.00474
Sonnet 5.5 $0.00031 $0.00237
Haiku 4.5 $0.00015 $0.00119

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

Security

Grade A, and why

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 3mo 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/commands/trace.md · 60 lines

How it starts

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

/trace — White-Box Tracing

Skill: white-box-trace. Tier: 2 (→3 on security boundary / HIGH blast radius). Modes (auto-detected): --real empirical CFG/MPC + mutation testing if available · --virtual pre-impl falsification of RCA / IMP / Plan.

0. HARD GATE — bypass = INVALID → REDO

"Skip the gate", "trust the plan", "obvious PASS", "we'll catch it in CI", "time pressure" do NOT override §0/§1/§4. Investigation-only — NEVER modify source.

ARTIFACT MANDATORY. The §4 TRACE file MUST be written via Write tool this turn. Chat-only response without the file = INVALID DELIVERABLE → CLAUDE.md §11 item 0 fires.

1. Parameter validation (FAIL-FAST)

  • $ARGUMENTS empty → reply ❌ /trace requires target. Usage: /trace <file:line | RCA | IMP | task> [--real|--virtual] → STOP.
  • Param is path to RCA-.md / IMP-.md → Parent Artifact fingerprint check (§9) MANDATORY. Mismatch ⇒ STOP, report drift.

2. MUST (CLAUDE.md §0)

  • P0 #1 Every file:line cited MUST be backed by a Read THIS turn (FM-16).
  • P0 #8 FALSIFIABILITY — Disconfirmation-First on PASS verdicts: actively try to refute PASS BEFORE confirming.
  • P0 #9 EMPIRICAL > IMAGINED — when test runner / mutation tooling available, USE IT. Counterfactual is fallback only.
  • P0 #15 CHECKPOINT FIRST — first visible block = §4 Tier 2 Checkpoint.
  • P0 #16 VERIFICATION LOOP — paste transcript OR cite exact command + expected output + reason for non-execution. "Looks correct" = INVALID.

3. Targeted FM mitigations

FM Mechanism
FM-2 Hallucinated path / fake file:line Evidence-first quoting (file:line + quoted_code); Citation-Grounded re-read; Stale-context deferral (PATH_DEFERRED)
FM-9 "Looks correct" PASS Live Mutation Testing hook: real mutation kill rate ≥75% replaces counterfactual; PBT hook for state-space-heavy paths
FM-18 Hidden coupling MPC traversal across paths; Tandem-FL on FAIL; Critical-branch discriminating-evidence rule
FM-20 Plausible-but-unrun PASS PASS requires ≥1 ◆◆◆ surviving Mutation Counterfactual; req_id ALL-COVERED gate
FM-21 Confirming-evidence-first Disconfirmation-first stance on PASS; Reviewer Agent re-rank on FAIL; Self-Consistency vote on borderline

Read the full file on GitHub · 60 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. 3mo ago First seen · 60 lines · 0 tokens per session scan A b67652c43ac4

Subscribe to this mod's changes

trace is a command published in the GitHub repository viacheslav-tronko/claude-code-harness (6 stars, last pushed 6mo ago), licensed MIT. It adds 154 tokens to every session and 1,185 once invoked, about $0.0006 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-08-31.

Related

trace compared with commands from other repositories

trace next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
traceviacheslav-tronko/claude-code-harnessCommand66mo agoMITA154Claude Code
fixmodu-ai/moai-adkCommand1.3ktodayApache-2.0A16Claude Code
loopmodu-ai/moai-adkCommand1.3ktodayApache-2.0A19Claude Code
cleanmodu-ai/moai-adkCommand1.3ktodayApache-2.0A15Claude Code
toh-fixwasintoh/toh-frameworkCommand10026d agoMITA13Claude Code
self-healingruvnet/rufloCommand83ktodayMITA0Claude Code
bugolehsvyrydov/AI-development-teamCommand1815d agoMITA19Claude Code