agent-odometer AGENTS.md

Repository instructions for Odometer, a desktop app that reads coding-agent session files and displays task, token, subagent, and cost information.

In plain words
What is it for?
Use them before editing Odometer to find the right documentation, run reproducible checks, preserve unrelated work, and create safe test data.
Why use it?
They give coding agents the project context and rules needed to make safe changes without exposing private sessions or breaking its Rust–Svelte design.

Instructions file for CodexOpenCode

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 instructions/ekalb81/agent-odometer/agents-md
Clone the repo
git clone --depth 1 https://github.com/ekalb81/agent-odometer

Made for: Codex, OpenCode.

Per session 2,866 This file is loaded in full into every session.
When invoked 2,866 The same file — it is already loaded in full.
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.02866 $0.02866
Opus 5 $0.01433 $0.01433
Sonnet 5 $0.00573 $0.00573
Haiku 4.5 $0.00287 $0.00287

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

Security

Grade A, and why

agent-odometer AGENTS.md 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 2d 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.

AGENTS.md · 107 lines

How it starts

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

AGENTS.md

These instructions apply to the entire repository.

Project purpose

Odometer is a local Tauri companion to agent CLI harnesses: the ChatGPT desktop app's Codex experience and Claude Code. It reads each harness's session JSONL files and presents searchable task, turn, token, subagent, and estimated cost data in per-harness tabs. Rust owns filesystem access, parsing, persistence, and Tauri IPC; Svelte owns filtering, presentation, and credit calculations.

Start with README.md for commands and docs/ARCHITECTURE.md for the data flow, contracts, invariants, and known limitations.

Before changing code

  • Run git status --short and preserve unrelated work. Do not normalize or rewrite existing files as a side effect.
  • Treat src-tauri/gen/schemas/ as generated. Do not hand-edit it; commit generated changes only when an intentional Tauri capability/configuration change requires them.
  • Both lockfiles are authoritative and should stay committed. Use npm ci and Cargo's --locked flag for reproducible validation.
  • Never commit real Codex sessions, prompts, local paths, credentials, or platform config. Parser fixtures must be synthetic or thoroughly redacted.

Architecture boundaries

  • Keep filesystem access and JSONL parsing in Rust. The frontend should receive typed data through Tauri commands/events, not read session files directly.
  • Put Rust commands in src-tauri/src/commands.rs, register them in src-tauri/src/lib.rs, and expose typed frontend wrappers in src/lib/ipc.ts.
  • Keep Rust serialized structs and src/lib/types.ts synchronized. Add backward-compatible Serde defaults when persisted or historical data may omit a new field.
  • Event names are contracts: session-updated (payload: SessionSummary), session-removed, scan-progress (payload: ScanStatus), history-progress (payload: HistoryStatus), config-updated, and rates-updated. Update every producer and listener together. Full sessions travel only through get_session_details; keep SessionSummary free of turns/tokens_history — the split exists because full sessions measured ~200 MB across a real corpus.
  • history-progress (#116) mirrors scan-progress's contract for the durable-history archive: AppState starts in a third Pending state (distinct from an archive that is genuinely Unavailable) until commands::spawn_history_open resolves it on a background thread, emitting one event per migration step plus a terminal ready/unavailable event. The frontend calls get_history_status once on mount (events may have already fired) and then follows the event, matching scan-progress/get_scan_status. commands::sessions_in_ranges — the ledger accounting authority — checks AppState::history_readiness() directly and returns an explicit "still preparing" error while Pending, rather than falling back to a partial in-memory answer that would look complete.
  • Use the established Svelte 5 rune style ($state, $derived, $effect). Module-level rune state belongs in *.svelte.ts files.
  • Keep Tauri capabilities minimal. Do not add remote content, network access, shell execution, or broader capabilities without an explicit requirement and a security review. Current exceptions: updater:default and process:allow-restart exist solely for the in-app auto-updater.

Read the full file on GitHub · 107 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. 2d ago First seen · 107 lines · 2,866 tokens per session scan A 685232fbd47e

Subscribe to this mod's changes

agent-odometer AGENTS.md is an instructions file published in the GitHub repository ekalb81/agent-odometer (2 stars, last pushed 5d ago), licensed MIT. It adds 2,866 tokens to every session, about $0.0143 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-08-31.

Related

Other instructions, from other repositories

codex-usage-desktop AGENTS.md

Instructions for itvincent-git/codex-usage-desktop, covering agents.md, 1. think before coding, 2. simplicity first, 3. surgical changes and 4. goal-driven execution.

itvincent-git/codex-usage-desktop · 1,088 tokens

Token-Dashboard CLAUDE.md

Instructions for Arylmera/Token-Dashboard, covering claude.md, project overview, status, architecture and data source.

Arylmera/Token-Dashboard · 2,495 tokens

agent-usage-desktop AGENTS.md

Instructions for hongshuo-wang/agent-usage-desktop, covering agents.md, build & run, desktop app (tauri), macos arm64 example and macos x8664.

hongshuo-wang/agent-usage-desktop · 1,747 tokens

codex-usage-desktop GEMINI.md

Instructions for itvincent-git/codex-usage-desktop, a project described as: A local-first desktop dashboard for macOS and Windows that turns Codex CLI and app logs into clear insights on token usage, estimated costs, models, and projects.

itvincent-git/codex-usage-desktop · 5 tokens

agent-usage-desktop CLAUDE.md

Instructions for hongshuo-wang/agent-usage-desktop, a project described as: A desktop app for local usage, cost, throughput, and session analytics across Claude Code, Codex, OpenCode, and OpenClaw. | 在本地统一统计和分析 Claude Code、Codex、OpenCode 与 OpenClaw 的用量、费用、吞吐和会话。.

hongshuo-wang/agent-usage-desktop · 4 tokens

nextclaw AGENTS.md

Instructions for Peiiii/nextclaw, covering nextclaw ai 常驻内核, 产品愿景, 沟通与推进, 深思与目标模式 and 协作与 git 安全.

Peiiii/nextclaw · 3,095 tokens