openusage AGENTS.md

Repository instructions for OpenUsage, a macOS menu-bar app that displays usage information from AI providers such as Claude, Codex, Cursor, Grok, and Devin. SwiftPM is Apple's package-management system for Swift projects.

In plain words
What is it for?
Developing the native Swift app, following its contribution rules, preparing releases through the specified workflow, and maintaining its provider usage widgets.
Why use it?
They identify the active codebase and release rules, including version safeguards. This helps an agent avoid editing the legacy edition or accidentally using an invalid release number.

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/robinebers/openusage/agents-md
Clone the repo
git clone --depth 1 https://github.com/robinebers/openusage

Made for: Codex, OpenCode.

Per session 1,509 This file is loaded in full into every session.
When invoked 1,509 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.01509 $0.01509
Opus 5 $0.00754 $0.00754
Sonnet 5 $0.00302 $0.00302
Haiku 4.5 $0.00151 $0.00151

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

Security

Grade A, and why

openusage 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 3d 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 · 80 lines

How it starts

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

AGENTS.md

OpenUsage is a SwiftPM-based SwiftUI menu-bar app for macOS that shows AI provider usage widgets (Claude, Codex, Cursor, Grok, Devin, and more).

This file documents the engineering conventions for the project. Read it before contributing.

Agent Instructions

AGENTS.md is the source of truth for agent instructions in this repository. CLAUDE.md files may only point to the nearest AGENTS.md file with @AGENTS.md; do not add guidance, duplicate instructions, or project rules to CLAUDE.md.

Repository note: This is the native Swift edition of OpenUsage. Active development happens on the main branch. (NOT the legacy Tauri version which now sits in the tauri-legacy branch)

Releases

main is the active development line; it ships via .github/workflows/release.yml (Sparkle appcast on gh-pages). Cut releases with the release-swift skill.

Guardrails (do not break)

  • Versions are 0.7.x and up. Never reuse a 0.6.x number — those are the original edition's released tags, now frozen on the tauri-legacy branch (final release v0.6.28).
  • Never increase the version number on your own initiative — always ask for explicit approval first. The version is a deliberate owner decision: propose the number and wait for explicit sign-off before tagging or cutting a release.
  • Beta releases use -beta.N tags and stay GitHub pre-releases on Sparkle's beta channel. Stable releases use plain tags and become GitHub "Latest".
  • Stable releases must carry forward the legacy latest.json so any remaining 0.6.x installs can still update to v0.6.28. release.yml handles this; verify it with the release-swift skill.
  • Never leave a release in Draft, and never ship blank notes: the release-swift skill generates the changelog and verifies the published release after every cut.

Architecture

  • SwiftPM executable target; SwiftUI content hosted in an AppKit-owned NSStatusItem + custom key-capable NSPanel.
  • Swift 6 with strict concurrency.
  • Providers implement the small ProviderRuntime protocol: an auth store reads credentials already on the user's machine, a usage client calls the provider's API, and a mapper normalizes the response into MetricLine values. The UI renders those normalized values.
  • See docs/ for behavior docs and the developer docs (architecture overview, adding a provider).

Read the full file on GitHub · 80 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. 3d ago First seen · 80 lines · 1,509 tokens per session scan A a4231e45cd0d

Subscribe to this mod's changes

openusage AGENTS.md is an instructions file published in the GitHub repository robinebers/openusage (3,975 stars, last pushed yesterday), licensed MIT. It adds 1,509 tokens to every session, about $0.0075 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.