trajectory-audit
Audit recent Claude and Codex transcript JSONL with the first-class Go `fak trajectory audit` verb: exact token/cache buckets, source coverage, behavior…
от anthony-chaudhary★ 50 звёзд на GitHub
Установить trajectory-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
/trajectory-audit — cross-harness efficiency audit
Use the Go data path for every operational audit:
fak trajectory audit --since 7d \
--jsonl trajectory-audit-$(date +%Y%m%d).jsonl \
--md trajectory-audit-$(date +%Y%m%d).md
For a topical cohort, select only user-authored prompts; tool output and injected repository instructions cannot admit an unrelated session:
fak trajectory audit --since 4d --user-contains qwen \
--jsonl qwen-audit.jsonl --md qwen-audit.md
The report exposes discovered, matched, and scanned file counts so a topical
claim retains its denominator. --user-contains is a case-insensitive literal,
not a regular expression.
The verb discovers both supported transcript homes by default:
- Claude:
$CLAUDE_CONFIG_DIR/projects, else~/.claude/projects. - Codex:
$CODEX_HOME/sessions, else~/.codex/sessions.
Pass --claude-root or --codex-root only for an explicit alternate corpus or
a pinned fixture. The paths persisted in artifacts are relative to those roots;
machine-private absolute roots are never emitted.
Pinned private replay
Capture the selected inputs when a later audit must use the identical corpus:
fak trajectory audit --since 7d --user-contains qwen \
--snapshot-out /private/path/qwen-corpus \
--jsonl qwen-audit.jsonl --md qwen-audit.md
--snapshot-out requires a new directory, copies only selected JSONL inputs,
and reports a verified corpus digest. The snapshot contains raw transcript bytes:
keep it private, never commit or sync it, and remove it explicitly when it is no
longer needed. Replay verifies the manifest and every input before and after parsing:
fak trajectory audit --snapshot /private/path/qwen-corpus \
--jsonl replay.jsonl --md replay.md
Replay rejects --since, --user-contains, live-root overrides, and --baseline;
the snapshot already owns selection and captured output identity. A missing, extra,
changed, malformed, path-escaping, or permission-open input fails closed with
TRAJECTORY_SNAPSHOT_REFUSED.
Exact accounting contract
Every JSONL row uses schema fak-trajectory-audit/1. Claude usage is folded once
per unique message.id, matching the provider-billed turn identity. Codex
token_count records are cumulative: the parser uses the final monotonic
total_token_usage record and does not sum repeated last_token_usage snapshots.
Codex input_tokens includes its cached/cache-write subsets, so fresh input is
the exact subtraction input - cached - cache_write. The resulting input,
output, cache-create, and cache-read buckets are disjoint across both harnesses.
Codex session rows also preserve the configured session_meta.model_provider
and summarize last_token_usage.cached_input_tokens with an observed sample
count and min/max. Those bounds are transcript-producer telemetry for the
configured provider path; they do not prove physical provider cache residency,
process-local ownership, or hits in fak-owned caches.
An unknown or malformed usage shape is never estimated. The verb writes a
refusal row and the markdown diagnostic, prints
TRAJECTORY_SCHEMA_REFUSED, and exits non-zero. Treat that as a parser-version
gap, not as zero usage.
Meta-process blocker triage
For a topical cohort, rank these process signals before reading individual sessions:
- Scope contamination — compare matched with discovered files; use
--user-contains, never raw transcript grep, because tool output can echo a topic. - Token concentration —
top_ten_token_fractionshows whether a few runaway sessions dominate the aggregate; inspect those bottleneck rows first. - Tool failure burden —
tool_errors/tool_callsmeasures execution friction. - Zero-usage launches —
empty_usage_filesexposes starts that produced no billable model progress. - Fragment duplication —
duplicate_fragmentsexposes one session ID spread over multiple transcript files; do not count those as independent workers. - Repeated identical failures — use
repeated_failures; retry loops need a changed hypothesis, not another identical call. - Mutation churn — use
mutation_churn; repeated writes to one target indicate insufficient repro-first scoping. - Hook latency — use
hook_p95_ms; separate gate wait from model/kernel work. - Input amplification — use
input_output_ratio; large values warrant context paging or a narrower worker packet. - Evidence refusal — any
refused_recordsmeans the parser found an unsupported shape; fix coverage before making a broad efficiency claim.
The first five now have explicit JSON summary fields. The remaining five preserve existing exact audit fields. Treat each as a hypothesis until the corresponding session rows or refusal rows identify the concrete cause.
Baseline comparison
Use a prior versioned JSONL artifact as the baseline:
fak trajectory audit --since 7d --baseline prior.json
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Grep - 03
Glob - 04
Bash
FAQ
Что делает скилл trajectory-audit?
Audit recent Claude and Codex transcript JSONL with the first-class Go `fak trajectory audit` verb: exact token/cache buckets, source coverage, behavior, deterministic bottlenecks, semantic confusion checks, and baseline regressions. Use for cross-session cost, efficiency, repetition, reasoning-quality, and churn questions.
Как установить скилл trajectory-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл trajectory-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…