claude-code-statusline: Instructions file for Claude Code

AGENTS.md

claude-code-statusline AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from ilia-pluzhnikov/claude-code-statusline. It costs 1,184 tokens per session, scanned A, original, MIT.

A project instruction document for a small Node.js status-line tool and its optional hooks. It explains the project's files, no-dependency rule, contributor rules, and how related instruction files stay synchronised.

In plain words
What is it for?
Use it when modifying the status line, its session hooks, Markdown synchronisation, or Git status checks.
Why use it?
It helps coding agents preserve the tool's single-file design and keep CLAUDE.md, AGENTS.md, and GEMINI.md consistent.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions Claude Code.

This is ilia-pluzhnikov/claude-code-statusline's own configuration. It tells Claude Code, Codex and OpenCode how to work on claude-code-statusline 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 claude-code-statusline configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ilia-pluzhnikov/claude-code-statusline. 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/ilia-pluzhnikov/claude-code-statusline/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ilia-pluzhnikov/claude-code-statusline

Made for: Claude Code, 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 claude-code-statusline AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ilia-pluzhnikov/claude-code-statusline/agents-md/github.svg)](https://agentmods.dev/instructions/ilia-pluzhnikov/claude-code-statusline/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ilia-pluzhnikov/claude-code-statusline/agents-md"><img src="https://agentmods.dev/badge/instructions/ilia-pluzhnikov/claude-code-statusline/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 claude-code-statusline AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ilia-pluzhnikov/claude-code-statusline/agents-md"><img src="https://agentmods.dev/badge/instructions/ilia-pluzhnikov/claude-code-statusline/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,184 This file is loaded in full into every session.
When invoked 1,184 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01184 $0.01184
Opus 5.5 $0.00474 $0.00474
Sonnet 5.5 $0.00237 $0.00237
Haiku 4.5 $0.00118 $0.00118

Measured 8d ago against content hash 6bddd2200f76, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-code-statusline AGENTS.md scanned grade A with 1 finding 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 8d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **No dependencies.** Everything is built-in Node.js (`fs`, `path`, `os`, `child_process`). Don't add a `package.json` with deps. If a feature needs an npm package, the answer is probably "the feature doesn't belong her
AGENTS.md · 53 lines

How it starts

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

claude-code-statusline

A single-file Node.js statusline for Claude Code, plus an optional companion hook that surfaces git state at session start.

This file is the project's only agent instructions file: Codex and Claude Code (v2.1.277+) read AGENTS.md directly, Gemini CLI once context.fileName in its settings lists it. Don't add a CLAUDE.md or GEMINI.md copy.

Project shape

  • statusline.js — entry point. Reads JSON from stdin (model, workspace, session_id, context_window, rate_limits) and writes one ANSI-coloured line to stdout.
  • optional-hooks/github-sync-check.js — SessionStart git status + cached origin divergence + background fetch for next session.
  • .claude-plugin/plugin.json + marketplace.json — the repo root is also the Claude Code plugin statusline-for-claude-code and a one-plugin marketplace ilia-pluzhnikov. The optional hook is not part of the plugin.
  • hooks/hooks.json → scripts/stage-statusline.js — plugin SessionStart hook: copies statusline.js into CLAUDE_PLUGIN_DATA, the path that survives plugin updates, and until setup is done shows a one-time hint about it (JSON systemMessage, so it reaches the user and not Claude's context).
  • commands/setup.md → scripts/configure-statusline.js — /statusline-for-claude-code:setup: previews, then writes the statusLine key. A plugin can't set statusLine itself; Claude Code applies only agent and subagentStatusLine from plugin settings.

Rules for contributors (and AI agents)

  • No dependencies. Everything is built-in Node.js (fs, path, os, child_process). Don't add a package.json with deps. If a feature needs an npm package, the answer is probably "the feature doesn't belong here".
  • Single-file per concern. statusline.js is one file. Each hook and plugin script is one file. No build step, no transpiler.
  • Exit 0 on any error. A broken hook must never block the user's tool call. Wrap risky logic in try/catch and process.exit(0) on failure. Same for statusline.js — empty output is acceptable, a thrown error that breaks Claude Code's UI is not.
  • Hot-path budget. statusline.js is invoked on every status refresh. No network, no git fetch on the hot path. Use bridge files in os.tmpdir() and background spawn(detached: true).unref() for anything that takes >100ms.
  • Hide on happy path. Segments only appear when they have something to say. 0 uncommitted is invisible. ↑0 push is invisible. Add new segments with the same discipline.
  • Cross-platform. Use path.join, os.homedir(), windowsHide: true on every execSync. No hard-coded / or \. No assumptions about which shell.
  • Avoid TUI-incompatible ANSI attributes. Blink (\x1b[5m), strikethrough, and underline-color extensions are silently dropped by Ink-based TUIs (Claude Code) and disabled by default in modern terminals. For attention without animation, use bold + bright color, inverse video (\x1b[7m), or a background-color badge. Stick to widely-supported codes: 30-37 (fg), 40-47 (bg), 1 (bold), 2 (dim), 7 (inverse), 38;2;R;G;B (truecolor).

Read the full file on GitHub · 53 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. 8d ago Changed · +29 tokens per session 6bddd2200f76
  2. 25d ago Changed · -3 lines · +66 tokens per session 38db163ae8ec
  3. 1mo ago First seen · 56 lines · 1,089 tokens per session scan A 4cbe4d598356

Subscribe to this mod's changes

claude-code-statusline AGENTS.md is an instructions file published in the GitHub repository ilia-pluzhnikov/claude-code-statusline (119 stars, last pushed 9d ago), licensed MIT. It adds 1,184 tokens to every session, about $0.0047 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). 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