AgentBar: Instructions file for Claude Code

CLAUDE.md

AgentBar CLAUDE.md is an instructions file for Claude Code from michalstrnadel/AgentBar. It costs 2,813 tokens per session, scanned A, original, MIT.

Repository-specific instructions for AgentBar, a macOS menu-bar app that shows the status of several AI coding assistants. The app is written in Swift and receives session information from small Node.js scripts.

In plain words
What is it for?
Use it when changing, building, or running the AgentBar repository. It covers the menu-bar and notch panel, session state files, and the app's documented presentation modes.
Why use it?
It gives a coding agent the project rules, build commands, file responsibilities, and data format needed to make changes without breaking the app's design.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/michalstrnadel/agentbar/claude-md/github.svg)](https://agentmods.dev/instructions/michalstrnadel/agentbar/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/michalstrnadel/agentbar/claude-md"><img src="https://agentmods.dev/badge/instructions/michalstrnadel/agentbar/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 AgentBar CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/michalstrnadel/agentbar/claude-md"><img src="https://agentmods.dev/badge/instructions/michalstrnadel/agentbar/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,813 This file is loaded in full into every session.
When invoked 2,813 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.02813 $0.02813
Opus 5.5 $0.01125 $0.01125
Sonnet 5.5 $0.00563 $0.00563
Haiku 4.5 $0.00281 $0.00281

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

Security

Grade A, and why

AgentBar 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 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.

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 · 157 lines

How it starts

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

AgentBar — AI Instructions

Context for AI coding assistants working on this repository.

Project

AgentBar is a native macOS status app (Swift, AppKit, SPM) showing live status of AI coding agents (Claude Code & Cowork, Codex, Cursor, Gemini, Copilot, Antigravity, Qwen Code, OpenCode, Devin). Node.js hook scripts in Scripts/hooks/ write per-session JSON to ~/.agentbar/state.d/; the app watches that folder. Cloud-only runs (Cursor cloud agents, Devin, Codex cloud) have no hook to install: the optional external poller in Scripts/cloud/ writes the same rows with entrypoint: "cloud". It presents itself as a menu bar item, a Dynamic Island panel under the notch, or both — the user picks in the welcome window. State file protocol (normative): docs/protocol.md; original design spec (a 1.0.0 snapshot, read its header note): docs/specs/2026-07-23-agentbar-design.md; presentation modes: docs/plans/2026-07-28-presentation-modes-and-island.md.

Build & run

./Scripts/build.sh          # builds build/AgentBar.app
open "build/AgentBar.app"

Rules

  1. One file, one responsibility — keep the unit layout from the spec; don't grow a god-object controller.
  2. Stay out of the way: no dock icon, no heavy dependencies, nothing that unfolds over the screen on its own. Two surfaces only — the menu bar item (StatusItemController) and the island (IslandController) — both fed from the same stores through MascotDriver / AgentActions; never render one from the other's code. Native notifications are the one thing that may appear over the screen, and three conditions earn it, not one: the user switched them on (off by default, like sounds), the banner is the system's surface rather than one AgentBar draws, and what is being announced either wants an answer or happened while the user was away. That last one is a rule, not a preference — 1.17.0 fired on every done, Claude Code enters done after every turn, and a fifty-turn conversation posted fifty banners. An agent finishing is not news. See Notifier. Approvals on the phone (PhoneRelay) are a surface off the Mac and the one thing that sends work off it, so they are fenced harder than banners: off until switched on in Settings ▸ Phone (no link, rule or agent output may), only what wants an answer, by default only while the person is away, Allow only with a shell command that went along whole and readable, and that reaches nothing BlastRadius calls high (everything else is Deny or the Mac), and a reply answers exactly the one request its push was for, once. A tap is the person's own answer through AgentActions.answer, written via: "phone" — a click made elsewhere, not a rule 3 exception. Windows are the exception, not the pattern: only WelcomeWindow, SettingsWindow and WrapWindow (Your Day), all small, all opened by the user — Your Day from a menu row or an agentbar://day|week|month link, never on a schedule: a recap nobody asked for is a window unfolding on its own. A Replay (ReplayTurn, WrapWindow+Replay) plays inside that same window and only from a click — a row's Replay Last Turn… or Your Day's Share menu — never from a link or a turn ending. UpdatePrompt answers a click on Check for Updates… (the click closes the menu that would have shown the answer) and nothing else: the daily check and the automatic install never open it. Settings is a sidebar of pages (SettingsChrome is its furniture), not a scroll: a new preference joins a page or earns one, and never lengthens a column until the last section falls off the screen. The approval queue (IslandController+Queue) is the island taking the keyboard on a deliberate shortcut (off until switched on), the way a note does: never when a request arrives, and it hands the keys back on Esc, an empty queue, or the panel losing focus. Return on a far-reaching request is held like the button (HoldButton); nothing in it answers without a key pressed. LauncherPanel is the third surface and the only one summoned by a keystroke. It earns that by the same test the banners do: it takes no space until asked, it appears only on a deliberate keypress, a menu click (Continue in…, the Handoff of a session to another agent, is one), or an agentbar://new-task link (Shortcuts, Raycast — see URLCommands; a link only fills it in, Return is still yours), and it closes the instant it loses focus. No link may approve, deny, answer, defer, write a rule or change a setting: any web page can open one. A surface that can appear without being asked for, or that stays once you look away, does not belong here. The Claude Code mod's band (Scripts/mods/claude) is drawn by Claude Code inside its own terminal, not by AgentBar, and only earns its line the same way: off unless the person turns it on (mods/config.json), one line, only while another session waits on them, gone the moment none does — and its one button focuses that session, never answers it. The mod itself observes and answers nothing (see SECURITY.md); a hook in it that returned anything but next's result would be a rule 3 violation, not a feature. Take a break (BreakGame, HuntGame, IslandController+Game) is the island itself, opened into one of two small games (GameChoice: the space bugs, or Bug Hunt) — not a new surface — and only from a click on the island's ⋯ menu or its joystick. Both are IslandGames under the same contract. It takes the keyboard the way a denial note does and gives it back on Esc or Close; it pauses the moment the panel loses the keyboard, and it steps aside the instant something new waits on the person, showing the rows with that request in them. Closed, paused or yielded, its clock does not run. The Office (Office, OfficeView) opens the same way and is under the same contract, but it is no game: a desk for each session on screen, everyone in the pose they are in, no score. It makes one exception to the yield, and only one: a session that already has a desk and starts waiting raises its hand there instead of stepping the room aside, because the hand is the signal and the pill still turns amber. Anything waiting from a session without a desk steps it aside, as it would a game (Office.yields). A click on a desk leads somewhere and answers nothing. On a raised hand it closes onto the rows with that request in them, and never focuses the session, because a focus defers the request. On any other desk it brings that terminal forward. RuleSheet is a sheet on Settings, not a fourth surface: it is modal to a window the user already opened and it closes when it is answered. Keep Mac Awake (KeepAwake) is the cup in the island's footer and a row in the shared menu, not a surface: it changes how the Mac sleeps, so a click, its shortcut (off until switched on) or a trigger the person set up turns it on, and no link may. Since 1.51.0 the triggers in Settings ▸ Awake Triggers — an agent working, the charger, an external display, an app running, an app asking macOS to stay awake — may start it without a click, the way a rule the human wrote may answer: each is off until switched on there, every hold names its trigger in the menu and the cup's tooltip, turning it off snoozes the trigger until its condition goes away, and no link, rule or agent output can create one (KeepAwakeTriggers). Its closed-lid mode — the one root command in the app — asks for the password inside a click and never on its own, never from a trigger or the shortcut (SECURITY.md). Hand a file to an agent (DropToAgent) is the one place AgentBar puts text into a terminal, and it is fenced the way keystroke approval is: only on a drop the person made, only the dropped paths (escaped, no line breaks), pasted only into a tab TerminalFocus verified, and never a Return — anywhere else it copies and says ⌘V. The screenshot chip (ScreenshotShelf) lives only inside an island that is already open, and is off until switched on, because reading the screenshot folder is what macOS asks permission for.
  3. AgentBar answers nothing by itself — only what the user wrote down. For six releases the rule was absolute: every decision came from a click, and DecisionLedger said so in three places. Since 1.28.0 one thing answers without a click, and the amendment is deliberate, the way 1.18.0's was for notifications: a rule the human typed in Settings ▸ Rules may answer a permission request, and four conditions earn that, not one. The rule was written by the person and never derived from anything the agent produced (a ruleSuggestion may never become one); every firing writes a ledger row naming the rule, so what a rule did is a question with an answer; a rule that refuses may be broad while a rule that approves names one directory; and before any approval is written the live command is checked again, not its shape — RuleEngine.refusal(for:). That table may only ever grow, it has no setting, and anything it does not understand falls through to the human. The whole feature is one guard away from the product that existed before it: no match, a malformed rules file, a command that will not tokenise, and nobody answers. Allow all N (ApprovalBatch) is a click, not a rule: it answers only the identical requests on screen when it was drawn, each as the person's own row. Try an approval (DemoApproval) is a request on screen only — it answers nothing because nothing waits on it. A rule has three modes and the middle one is the point: watching matches, works out the answer, writes it down and answers nothing, so an approving rule can be judged on a week of what it would have done before it speaks. New rules start there. Rules own a Settings page (RulesView, RuleSheet), and that sheet spends most of its room on the rule's edges rather than on its fields.
  4. Hooks must never block the host agent: async, atomic writes, exit fast. Sole exception: permission.js blocks while the session is already waiting on the human, and must always time out silently to the normal terminal prompt.
  5. Adding an agent: entry in Agents.swift, sprite in Sources/AgentBar/Sprites/, optional hook dir in Scripts/hooks/<agent>/ plus its installer step in HookInstaller.swift AND the Linux CLI's install-hooks, and the agent id in the docs/protocol.md list, the README agent table, and the agent list above. If it gets hooks it also needs a row in the Diagnostics.integrations table AND the Linux doctor's — otherwise diagnostics reports a clean bill of health for an integration it never looked at — and its events in HookWiring.swift, the CLI's HOOK_WIRING and Tests/Fixtures/hook-wiring/cases.json, the one table each installer writes from and each doctor checks against. Nothing else should need touching. An agent without an entry renders generically (a monogram plus its agent_name), so a third-party bridge via agentbar report needs none of the list above.
  6. Third-party marks stay listed in THIRD_PARTY_NOTICES.md.

Read the full file on GitHub · 157 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 · +18 lines · +344 tokens per session 1fbf2714b93c
  2. 13d ago Changed · +2 lines · +49 tokens per session 24bbf97b42d9
  3. 17d ago Changed · +1 lines · +11 tokens per session 3b0e70233144
  4. 20d ago Changed · +18 lines · +343 tokens per session a4757db66cd3
  5. 21d ago Changed · +4 lines · +88 tokens per session 4da56d43fbe0
  6. 22d ago Changed · +14 lines · +270 tokens per session 4194cbdbb047
  7. 23d ago Changed · +1 lines · +36 tokens per session 19050597eefe
  8. 24d ago Changed · +13 lines · +249 tokens per session 58b49f74a2ac
  9. 27d ago Changed · +2 lines · +38 tokens per session f6973a334836
  10. 1mo ago First seen · 84 lines · 1,385 tokens per session scan A 52179d217a63

Subscribe to this mod's changes

AgentBar CLAUDE.md is an instructions file published in the GitHub repository michalstrnadel/AgentBar (12 stars, last pushed today), licensed MIT. It adds 2,813 tokens to every session, about $0.0113 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

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens