claudebar: Instructions file for Claude Code

CLAUDE.md

claudebar CLAUDE.md is an instructions file for Claude Code from mryll/claudebar. It costs 790 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; positional $N argument.

This is mryll/claudebar's own configuration. It tells Claude Code how to work on claudebar 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 claudebar configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mryll/claudebar. 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/mryll/claudebar/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/mryll/claudebar

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mryll/claudebar/claude-md/github.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/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 claudebar CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mryll/claudebar/claude-md"><img src="https://agentmods.dev/badge/instructions/mryll/claudebar/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 790 This file is loaded in full into every session.
When invoked 790 The same file — it is already loaded in full.
Security scan A 3 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.00790 $0.00790
Opus 5.5 $0.00316 $0.00316
Sonnet 5.5 $0.00158 $0.00158
Haiku 4.5 $0.00079 $0.00079

Measured 22d ago against content hash 1299a0606b25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 22d 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.

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 NOR in a child's environment — stdin for curl (`--config -`, `--data @-`), stdin or a pipe for jq (`b64_lines`; `--rawfile x <(...)` when stdin already carries the document). The same goes for

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 NOR in a child's environment — stdin for curl (--config -, --data @-), stdin or a pipe for jq (b64_lines; --rawfile x <(...) when stdin already carries the document). The same goes for billing amounts (spend, limit, prepaid balance) and everything that may carry them — extra_usage, max_pct and last_error in --json, the bar text and the tooltip. Free text goes through b64_lines, since jq 1.7's raw input mangles UTF-8 split across its 4 KiB read blocks.
  • 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. 22d ago Changed · +106 tokens per session 1299a0606b25
  2. 2mo ago Changed · -72 lines · -1,350 tokens per session ecd975cdc2d2
  3. 2mo 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 (63 stars, last pushed yesterday), licensed MIT. It adds 790 tokens to every session, about $0.0032 per session on Opus 5.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.

Related

claudebar CLAUDE.md compared with instructions from other repositories

claudebar CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claudebar CLAUDE.mdmryll/claudebarInstructions file63yesterdayMITA790Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode