trace-history

trace-history is a skill for Claude Code from tranhieutt/software_development_department. It costs 41 tokens per session (818 once invoked), scanned A, original, MIT.

A command-line tool for reading an agent decision log and displaying its entries as a filtered timeline.

In plain words
What is it for?
Use it to inspect recent or filtered production decisions in a readable or JSON format.
Why use it?
It makes it easier to find decisions by agent, risk level, task, result, or date instead of reading the whole log.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/trace-history.sh $ARGUMENTS.

Good fit Use it to inspect recent or filtered production decisions in a readable or JSON format.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department
agentmods
npx agentmods add skills/tranhieutt/software_development_department/trace-history

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-history

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/trace-history/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/trace-history)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/trace-history"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/trace-history/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-history

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/trace-history"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/trace-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 818 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.00041 $0.00818
Opus 5 $0.00020 $0.00409
Sonnet 5 $0.00008 $0.00164
Haiku 4.5 $0.00004 $0.00082

Measured 9d ago against content hash c73541a4ab95, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

trace-history 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 9d 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/skills/trace-history/SKILL.md · 81 lines

How it starts

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

Trace History

Read production/traces/decision_ledger.jsonl and display a filtered, human-readable timeline of agent decisions.

Execution

The rendering and filtering logic is implemented in scripts/trace-history.sh. This skill delegates to that script — do NOT re-implement parsing here.

1. Run the backing script

Invoke exactly once, passing $ARGUMENTS through unchanged:

bash scripts/trace-history.sh $ARGUMENTS

The script handles: flag parsing, filtering, rendering (pretty or JSON), empty-ledger short-circuit, and invalid-argument rejection. Return the script's stdout verbatim to the user.

2. Supported flags (all optional)

Flag Default Meaning
--agent <name> all Filter by agent_id
--risk <High|Medium|Low> all Filter by risk_tier
--task <id> all Substring match on task_id
--outcome <pass|fail|blocked|skipped> all Filter by outcome
--since <YYYY-MM-DD> no limit Only entries with ts >= date
--last <N> 20 Keep last N after other filters
--format <pretty|json> pretty Output format

3. Output format

Pretty (default): timeline with risk badges (🔴🟡🟢) and outcome emojis (✅❌⛔⏭️), grouped with separators and totals. Failed/blocked entries trigger a /resume-from hint automatically.

JSON: raw matching entries as a JSON array — use when piping to another tool.

4. Empty or no-match

The script emits 📭 messages for an empty ledger or zero-match filter. Return those messages as-is; do not fabricate data.


How decisions get into the ledger

Agents append one JSON line per significant decision to production/traces/decision_ledger.jsonl.

Append format:

{"ts":"2026-04-16T10:30:00Z","session":"main","agent_id":"backend-developer","task_id":"042","request":"Choose JWT signing algorithm","reasoning":"RS256 supports multi-service verification without sharing secrets","choice":"RS256 over HS256","outcome":"pass","risk_tier":"Medium","duration_s":18}

Read the full file on GitHub · 81 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. 9d ago First seen · 81 lines · 41 tokens per session scan A c73541a4ab95

Subscribe to this mod's changes

trace-history is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 818 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-09-03.

Related

Other skills, from other repositories