Usage4Claude CLAUDE.md

Usage4Claude CLAUDE.md is an instructions file for Claude Code from f-is-h/Usage4Claude. It costs 753 tokens per session, scanned A, original, MIT.

A project guide for Usage4Claude, a macOS menu bar app that tracks Claude and Codex subscription usage. It documents the app’s code layout, build and test commands, conventions, and known problems.

In plain words
What is it for?
Use it when working on this Swift and SwiftUI app, especially when building, running tests, checking translations, or locating services, models, and authentication code.
Why use it?
It gives coding agents the project context needed to make changes without guessing how the app is organised or built.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions Codex.

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/f-is-h/usage4claude/claude-md
Clone the repo
git clone --depth 1 https://github.com/f-is-h/Usage4Claude

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Usage4Claude CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/f-is-h/usage4claude/claude-md.svg)](https://agentmods.dev/instructions/f-is-h/usage4claude/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/f-is-h/usage4claude/claude-md"><img src="https://agentmods.dev/badge/instructions/f-is-h/usage4claude/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 753 This file is loaded in full into every session.
When invoked 753 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.1 $0.00753 $0.00753
Opus 5 $0.00377 $0.00377
Sonnet 5 $0.00151 $0.00151
Haiku 4.5 $0.00075 $0.00075

Measured 6d ago against content hash bfda22493739, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

Usage4Claude CLAUDE.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 6d 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.

CLAUDE.md · 41 lines

How it starts

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

Usage4Claude — Project Overview

A macOS menu bar app that monitors Claude / Codex subscription usage. Swift + SwiftUI + AppKit, targeting macOS 13+.

Build & Test

  • Unit tests: swift test (SwiftPM only tests pure functions, runs in seconds; Package.swift uses a sources allowlist — newly extracted pure-function files must be added manually before they're testable)
  • Full build: ./scripts/build.sh --config Debug (.xcodeproj is the authoritative build; SwiftPM exists only for testing)
  • Localization consistency: python3 scripts/check_l10n.py (checks key sync across 7 languages; enforced in CI)

Architecture Map

  • App/: entry point, MenuBarManager (coordinates UI and data), icon rendering (MenuBarIconRenderer/ShapeIconRenderer)
  • Services/: ClaudeAPIService (cookie and OAuth dual paths), CodexAPIService (two-step auth), OAuthTokenCache (actor: token caching + refresh single-flight), KeychainManager (uses UserDefaults in DEBUG!), *OAuth/ (PKCE + local callback server)
  • Models/: UserSettings is the settings facade; accounts/refresh policy/launch-at-login/appearance have been split out into AccountStore/SmartRefreshPolicy/LaunchAtLoginManager/AppearanceManager
  • Helpers/DataRefreshManager.swift: scheduled refresh, Codex's three-tier token refresh chain, reset verification
  • Localization: L.xxx accessors (Helpers/LocalizationHelper.swift) → Resources/*.lproj/Localizable.strings; new keys must be synced across all 7 languages (de/en/fr/ja/ko/zh-Hans/zh-Hant)
  • Tests/: SwiftPM test target, only covers pure-function files listed in Package.swift's sources
  • .agents/skills/: ready-made skills exist for release and screenshot capture (capture-usage4claude-screenshots)

Key Conventions

  • Commits: English, no emoji, no Co-Authored-By — see docs/COMMIT_MESSAGE_GUIDELINES.md (release commits are hand-written by the owner)
  • Releases: CHANGELOG.md is the authoritative version source and technical record; docs/RELEASE_NOTES.md is the user-facing text for the Sparkle popup/Release body. A commit message with a [release] prefix pushed to main triggers a fully automated CI release — see docs/DAILY_RELEASE_WORKFLOW.md
  • Service-layer public completions must always be called back on the main thread
  • Config/Info.plist is a static file (Xcode's auto-generation mode drops Sparkle keys) — edit it directly to change keys
  • Outdated docs go into docs/archive/, not left in the docs/ root

Read the full file on GitHub · 41 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. 6d ago First seen · 41 lines · 753 tokens per session scan A bfda22493739

Subscribe to this mod's changes

Usage4Claude CLAUDE.md is an instructions file published in the GitHub repository f-is-h/Usage4Claude (381 stars, last pushed yesterday), licensed MIT. It adds 753 tokens to every session, about $0.0038 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.

Related

Other instructions, from other repositories

Applite CLAUDE.md

Instructions for milanvarady/Applite, covering claude.md, project overview, build & run, architecture and data flow.

milanvarady/Applite · 2,572 tokens

scarf AGENTS.md

AGENTS.md instructions for awizemann/scarf: This repo carries its own agent memory — plain files in git, served by the in-repo memophant-mcp MCP server, managed by the Memophant macOS app. It works the same for every agent (Claude Code, Codex, Cursor, Gemini, Copilot). This block is regenerated between the memophant…

awizemann/scarf · 1,827 tokens

scarf copilot-instructions.md

Copilot instructions for awizemann/scarf: File memory notes under one of six folders (architecture/conventions/decisions/operations/project/roadmap), never the root. When a note is grounded in code, pass sourcepaths (the repo files it depends on) so Memory Health can drift-check it — an unanchored code note can't be…

awizemann/scarf · 571 tokens

mectrics AGENTS.md

AGENTS.md instructions for farukkamcici/mectrics, covering agents.md — working agreement for mectrics, 0. golden rule: english-only repository, 1. project shape, 2. internationalization (i18n) and 3. menu bar rendering rules.

farukkamcici/mectrics · 4,487 tokens

mectrics CLAUDE.md

Claude Code instructions for farukkamcici/mectrics, covering claude.md, absolute must-knows (see agents.md for detail), fast local loop (no xcode ui), build & run the app and notes.

farukkamcici/mectrics · 515 tokens

SkillDeck CLAUDE.md

Instructions for crossoverJie/SkillDeck, covering claude.md, code style: comments required, build & run commands, architecture and key data patterns.

crossoverJie/SkillDeck · 1,986 tokens