agent-usage-plus: Instructions file for Codex

AGENTS.md

agent-usage-plus AGENTS.md is an instructions file for Codex, OpenCode from viganogabriele/agent-usage-plus. It costs 1,622 tokens per session, scanned A, original, MIT.

Project instructions for an Omarchy/Quickshell bar widget that displays local AI-subscription usage. They describe the project structure, safe data handling, testing, and visual checks.

In plain words
What is it for?
Use them when editing the widget’s QML interface, JavaScript logic, or Python collectors, especially when changing settings, provider records, tests, or the live panel.
Why use it?
They give a coding agent the rules needed to change the widget without exposing credentials, breaking its data format, or skipping required checks.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is viganogabriele/agent-usage-plus's own configuration. It tells Codex and OpenCode how to work on agent-usage-plus itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-usage-plus configures →

Reuse

Borrowing it

Nothing to install: this file belongs to viganogabriele/agent-usage-plus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/viganogabriele/agent-usage-plus/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/viganogabriele/agent-usage-plus

Made for: Codex, OpenCode.

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 agent-usage-plus AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/viganogabriele/agent-usage-plus/agents-md/github.svg)](https://agentmods.dev/instructions/viganogabriele/agent-usage-plus/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/viganogabriele/agent-usage-plus/agents-md"><img src="https://agentmods.dev/badge/instructions/viganogabriele/agent-usage-plus/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-usage-plus AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/viganogabriele/agent-usage-plus/agents-md"><img src="https://agentmods.dev/badge/instructions/viganogabriele/agent-usage-plus/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,622 This file is loaded in full into every session.
When invoked 1,622 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.01622 $0.01622
Opus 5.5 $0.00649 $0.00649
Sonnet 5.5 $0.00324 $0.00324
Haiku 4.5 $0.00162 $0.00162

Measured 2mo ago against content hash 1cfab5bdf710, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-usage-plus 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 2mo 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 · 125 lines

How it starts

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

Agent Usage Plus

Omarchy/Quickshell bar widget for local AI-subscription usage. Keep changes small, data-safe, and visually verified; a plausible QML diff is not enough.

Map

  • Agent.qml: widget entry point and plugin metadata bridge.
  • Main.qml: settings, records, refresh and bar-layout state.
  • Panel.qml: bar and panel UI.
  • logic/: pure JS, covered by Node tests in test/.
  • collectors/: bundled collectors, with their own Python tests in collectors/tests/. Read collectors/README.md and docs/collector-contract.md before changing their output.

Working rules

  • Never read or write API keys, OAuth tokens, transcripts, or shell settings directly. Collectors emit records; settings changes go through the existing spawned omarchy bar set path.
  • Preserve user worktree changes. Do not push or open PRs unless explicitly requested.
  • Add or adjust a test in logic/ for logic changes. Keep collector output compliant with docs/collector-contract.md, including useful auth-missing and endpoint-down states.
  • Use bundled SVGs for provider marks. Set sourceSize on every mark Image (width * Screen.devicePixelRatio, matching Tray.qml/Menu.qml elsewhere in the shell) — without it marks read as soft/blurry, worse the smaller the box or the higher the output's pixel density. Do not replace SVGs with scaled raster assets; check bar-scale and panel-scale rendering separately.
  • Follow the theme contract: surfaces, foregrounds, tracks, fonts, and the critical state come from Omarchy's live colors; Warn is intentionally fixed amber (#F2B705) for a stable, distinct warning state. Bar marks must choose their default/light asset from the bar's live foreground, including hover or transparent-bar states, so the bar and panel stay visually consistent.
  • Treat provider responses as untrusted too: keep collector JSON reads bounded before parsing, preserve explicit auth/endpoint error states, and never put an upstream response body or credential into a record or log.
  • omarchy bar set <id> <key> <value> --json cannot take a top-level JSON array value with more than one element — it miscounts its own arguments and fails every time ("Too many arguments provided"), silently, with no QML-side error beyond a console.warn line in the shell's own log (nothing surfaces in the panel). A single-element array, and any JSON object no matter how many keys, both write fine — only a bare multi-element array is affected. Reproduce/verify directly: omarchy bar set <id> <key> '["a","b"]' --json fails, omarchy bar set <id> <key> '"[\"a\",\"b\"]"' --json (the array double-JSON-encoded into a string) succeeds. Any new array-valued setting must be written double-encoded (JSON.stringify(JSON.stringify(arr))) and unwrapped with a guarded JSON.parse on read — see providerOrder in Main.qml for the pattern.
  • Do not add a hardcoded cap on how many providers can show in the bar (no "3 fixed + cycle slots" style budget). The only real ceiling is however many providers the person has actually configured (Fixed count + Cycle slots), which is itself already bounded by how many providers exist to configure. selectBarLayout's own Math.min(10, ...) — the number of bundled collectors — is the one non-arbitrary safety clamp; barSlotLimit (Main.qml) and maxBarProviderSlots (Panel.qml) exist only so selectBarLayout/the "+N" affordance have a number to work with and should stay far above anything a real configuration would hit.
  • A notification not appearing is not necessarily a code bug: Omarchy's own Do Not Disturb state lives in ~/.local/state/omarchy/notifications.json ("dnd": true suppresses the popup even though notify-send still succeeds), and every notification actually delivered is logged under ~/.local/state/omarchy/notifications/history/*.json regardless of DND — check that history before assuming the panel's own notify-send dispatch is broken.
  • Reordering draggable items (the panel's provider switcher) does not move a real Grid/Row/Column child and rely on the positioner "leaving a Drag.active item alone" to snap it back afterward — that did not reliably reposition the item once dropped, leaving marks stranded wherever they were released. Use a separate, non-positioned ghost item (parented at the panel's top level, positioned via mapToItem) that follows the pointer; the real grid children never move and the model is only reordered once, on drop — see providerSwitch/dragGhost in Panel.qml.

Read the full file on GitHub · 125 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. 2mo ago First seen · 125 lines · 1,622 tokens per session scan A 1cfab5bdf710

Subscribe to this mod's changes

agent-usage-plus AGENTS.md is an instructions file published in the GitHub repository viganogabriele/agent-usage-plus (4 stars, last pushed 18d ago), licensed MIT. It adds 1,622 tokens to every session, about $0.0065 per session on Opus 5.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

agent-usage-plus AGENTS.md compared with instructions from other repositories

agent-usage-plus AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-usage-plus AGENTS.mdviganogabriele/agent-usage-plusInstructions file418d agoMITA1,622Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot