Pacer AGENTS.md

A project guide for Pacer, a native macOS app that tracks Claude Code usage. It explains the app’s structure, data sources, correctness rules, and where important documentation lives.

In plain words
What is it for?
Use it when working on Pacer’s SwiftUI interface, data storage, widgets, parsing, cost calculations, or release setup.
Why use it?
It gives a coding agent the project context needed to make changes safely and keep usage metrics accurate.

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/ericandrechek/pacer/agents-md
Clone the repo
git clone --depth 1 https://github.com/EricAndrechek/Pacer

Made for: Codex, OpenCode.

Per session 10,285 This file is loaded in full into every session.
When invoked 10,285 The same file — it is already loaded in full.
Security scan B 1 finding. 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.10285 $0.10285
Opus 5 $0.05143 $0.05143
Sonnet 5 $0.02057 $0.02057
Haiku 4.5 $0.01029 $0.01029

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

Security

Grade B, and why

Pacer AGENTS.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **Do not auto-write to `~/.claude/settings.json`** without explicit
AGENTS.md · 749 lines

How it starts

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

Agent guide — Pacer

Native macOS Claude Code usage tracker. SwiftUI + SwiftData + Charts. Single-binary menu-bar agent shape (LSUIElement=true). Two targets (Pacer.app + PacerWidgets.appex) sharing data through an App Group. See docs/design.md for the full v1 design.

Where to look first

  • docs/design.md — full architecture, data sources, schema, IPC, scope.
  • docs/research/ccusage-reference.md — ground-truth analysis of ccusage internals: path discovery, JSONL schema, cost modes, dedup correctness, pricing source. Read before touching parsing or cost code.
  • docs/research/realtime-mechanisms.md — analysis of statusline, hooks, OTel, MCP for live Claude Code data.
  • docs/research/tcc-app-management.md — investigation of the every-launch "would like to access data from other apps" prompt, what was tried, current signing/notarization state, and the open SMAppService verification question for v1 release.
  • docs/research/ccusage-outputs/ — captured bun x ccusage JSON outputs for the local dataset. Use these as ground-truth in tests — every metric Pacer surfaces should match ccusage's number for the same range, with exactly two deliberate deviations:
    1. the cache 5m/1h split (we track them separately, ccusage flattens);
    2. output tokens on streamed messages — ccusage dedups first-wins, which keeps the mid-stream snapshot instead of the finished message and under-counts output by ~63% on a real corpus (correctness rule §7). Pacer is deliberately higher here. If a ccusage comparison shows us reporting more output than ccusage, that is the fix working — do not "correct" it back.
  • AGENTS.md → "Performance — invariants and patterns" (below) — read before adding ANY @Query, FetchDescriptor, computed view property, widget provider, or new rollup table. Codifies hard-won rules from five rounds of read-path optimization. The rules look nitpicky in isolation; in aggregate they're what keeps the app responsive while the in-process scan loop is firing every 5–60s.
  • docs/perf-tuning.md — current cycle-time / CPU state, the measurement tooling (phase-timed scan log, make perf-snapshot), every perf commit's mechanism + measured win, and the open refactors that are deferred. Read before reintroducing animations, per-cycle SwiftData fetches, or adding any new always-running background work.

Read the full file on GitHub · 749 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 · 749 lines · 10,285 tokens per session scan B 4e15019f2364

Subscribe to this mod's changes

Pacer AGENTS.md is an instructions file published in the GitHub repository EricAndrechek/Pacer (8 stars, last pushed 21d ago), licensed MIT. It adds 10,285 tokens to every session, about $0.0514 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.