splitrail AGENTS.md

A project guide for Splitrail, a Rust program that reads local data from AI coding assistants and turns it into usage statistics and live terminal displays.

In plain words
What is it for?
Use it when adding or changing data analyzers, parsing assistant conversations, calculating usage totals, updating the terminal interface, or checking changes against the project’s Rust style.
Why use it?
It gives coding agents the project’s architecture, data flow, and coding conventions so changes fit the existing codebase.

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/piebald-ai/splitrail/agents-md
Clone the repo
git clone --depth 1 https://github.com/Piebald-AI/splitrail

Made for: Codex, OpenCode.

Per session 359 This file is loaded in full into every session.
When invoked 359 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.00359 $0.00359
Opus 5 $0.00179 $0.00179
Sonnet 5 $0.00072 $0.00072
Haiku 4.5 $0.00036 $0.00036

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

Security

Grade A, and why

splitrail 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 · 40 lines

What it actually says

Project Overview

Splitrail is a high-performance, cross-platform usage tracker for AI coding assistants (Claude Code, Copilot, Cline, Pi Agent, etc.). It analyzes local data files from these tools, aggregates usage statistics, and provides real-time TUI monitoring with optional cloud upload capabilities.

Architecture

Analyzer System

Pluggable architecture with the Analyzer trait. Registry in src/analyzer.rs, individual analyzers in src/analyzers/. Each analyzer discovers data sources, parses conversations, and normalizes to a common format.

Data Flow

  1. Discovery: Analyzers find data files using platform-specific paths (src/analyzers/)
  2. Parsing: Parse JSON/JSONL into normalized messages (src/types.rs)
  3. Deduplication: Hash-based dedup using global hash field
  4. Aggregation: Group by date, compute token counts, costs, file ops (src/utils.rs)
  5. Display: TUI renders daily stats + real-time updates (src/tui.rs, src/watcher.rs)

Code Style

  • Follow Rust 2024 edition conventions
  • Use anyhow::Result for error handling
  • Prefer async/await over raw futures
  • Use parking_lot locks over std::sync for performance

Post-Change Verification

Run after code changes:

cargo build --quiet
cargo test --quiet
cargo clippy --quiet -- -D warnings
cargo doc --quiet
cargo fmt --all --quiet

Additional Context

Skills provide task-specific guidance. Use the skill tool to load one when needed - available skills are listed in its description.

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 · 40 lines · 359 tokens per session scan A 28d5e2fcc57b

Subscribe to this mod's changes

splitrail AGENTS.md is an instructions file published in the GitHub repository Piebald-AI/splitrail (218 stars, last pushed 11d ago), licensed MIT. It adds 359 tokens to every session, about $0.0018 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-30.