claudebar CLAUDE.md

claudebar CLAUDE.md is an instructions file for coding agents from mryll/claudebar. It costs 684 tokens per session, scanned A, original, MIT.

Project instructions for Claudebar, a desktop widget that runs inside Omarchy Shell. They document its build and test commands, command-start detection, fallback behaviour, URL decoding, and version rules.

In plain words
What is it for?
Use them when changing Claudebar's installation, bundled-script fallback, shell process handling, file-URL parsing, schema version, or tests.
Why use it?
They capture implementation details that are easy to get wrong, especially the difference between a program failing to start and a program running unsuccessfully. This keeps related code and tests consistent.

Instructions file

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/mryll/claudebar/claude-md
Clone the repo
git clone --depth 1 https://github.com/mryll/claudebar

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 claudebar CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mryll/claudebar/claude-md.svg)](https://agentmods.dev/instructions/mryll/claudebar/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mryll/claudebar/claude-md"><img src="https://agentmods.dev/badge/instructions/mryll/claudebar/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 684 This file is loaded in full into every session.
When invoked 684 The same file — it is already loaded in full.
Security scan A 3 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.00684 $0.00684
Opus 5 $0.00342 $0.00342
Sonnet 5 $0.00137 $0.00137
Haiku 4.5 $0.00068 $0.00068

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

Security

Grade A, and why

claudebar CLAUDE.md scanned grade A with 3 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 today.

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.

Sends data to an external URLlowData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

- Secrets never go in argv — stdin for curl (`--config -`, `--data @-`), the environment for jq.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Install: `make install PREFIX=~/.local` (or `sudo make install`); no build step

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Every `curl` starts with `-q` as the FIRST argument. `curl_auth_cfg` is the only place a curl config is built, and it REJECTS tokens that could inject config lines.
CLAUDE.md · 27 lines

How it starts

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

CLAUDE.md

  • Install: make install PREFIX=~/.local (or sudo make install); no build step
  • Tests: bash tests/run_all.sh

Non-Obvious Rules

  • The script must always exit 0 with valid Waybar JSON ({"text","tooltip","class"}), even on errors — Waybar hides modules that exit non-zero. Use die(). Tooltip and bar text are Pango markup.
  • The CLI always runs through /bin/sh -c 'exec "$0" "$@"', never direct. A nonexistent binary handed to Quickshell 0.3.1 can abort the whole shell inside the failed start (#6), before any QML signal fires. The failed-start discriminator is !sawExit || exitCode === 126 || exitCode === 127 on empty output; any other exited-empty run is an operational failure, never "not installed".
  • The bundled-script fallback fires ONLY on a failed start. PATH first, always: the AUR release wins when it exists. Never fall back on operational errors.
  • schema_version is pinned to 2 on both sides. A schema bump must change script, panel and tests in one commit.
  • installCmd is the one constant — the message shows it and the button copies it (argv-exec, no shell line). The button gates on notInstalled, never on error text.
  • A tooltip meter is PARKED, not rendered in place: a METER:<i> sentinel plus parallel meter_* arrays, resolved by the width pass — which must skip METER: lines or the measurement is circular. All meters in one tooltip share the same bar length. After mutating BAR_LEN, rebuild GRAD_CELLS (GRAD_CELLS=(); init_grad_cells) — indexing past it is fatal under set -u.

Hardening invariants

The plugin runs inside the long-lived omarchy-shell process, so a blocking read or write takes the whole shell down. Regression tests live in tests/test_hardening.sh; the rationale for each rule is in the script's own comments at the relevant site.

  • Every read of a file this script does not own goes through read_bounded (O_NONBLOCK open + byte cap); jq never opens a foreign path itself.
  • Every write on a predictable path is guarded, on the fd where one exists. The credentials write-back stages its temp in the SAME directory as the target (rename(2), atomic), creates it BEFORE the refresh POST (a 200 may rotate the refresh token), and re-reads + compares before the mv (the claude CLI also writes that file).
  • Every curl starts with -q as the FIRST argument. curl_auth_cfg is the only place a curl config is built, and it REJECTS tokens that could inject config lines.
  • Secrets never go in argv — stdin for curl (--config -, --data @-), the environment for jq.
  • The panel refuses to retain more than 1Mi UTF-16 units of CLI output (a tripwire with a per-run flag, not a limit).

Read the full file on GitHub · 27 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. today Changed · -72 lines · -1,350 tokens per session ecd975cdc2d2
  2. 4d ago First seen · 99 lines · 2,034 tokens per session scan A 47ebb13e8afd

Subscribe to this mod's changes

claudebar CLAUDE.md is an instructions file published in the GitHub repository mryll/claudebar (51 stars, last pushed 2d ago), licensed MIT. It adds 684 tokens to every session, about $0.0034 per session on Opus 5. A static security scan graded it A with 3 findings (sends data to an external url, asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.