claude-code-statusline: Instructions file for Claude Code

CLAUDE.md

claude-code-statusline CLAUDE.md is an instructions file for Claude Code from ilia-pluzhnikov/claude-code-statusline. It costs 1,088 tokens per session, scanned A, a copy of claude-code-statusline AGENTS.md, MIT.

Repository instructions for a Node.js status line used with Claude Code, plus optional hooks that keep three instruction files aligned and show Git status.

In plain words
What is it for?
Use it when editing, testing, or contributing to this status-line project, especially when changes must be mirrored across instruction files.
Why use it?
It prevents project rules from drifting between CLAUDE.md, AGENTS.md, and GEMINI.md, and makes session and repository state easier to see.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is ilia-pluzhnikov/claude-code-statusline's own configuration. It tells Claude Code 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/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ilia-pluzhnikov/claude-code-statusline

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 claude-code-statusline CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ilia-pluzhnikov/claude-code-statusline/claude-md"><img src="https://agentmods.dev/badge/instructions/ilia-pluzhnikov/claude-code-statusline/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,088 This file is loaded in full into every session.
When invoked 1,088 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 100% copy Near-identical to another mod 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.01088 $0.01088
Opus 5 $0.00544 $0.00544
Sonnet 5 $0.00218 $0.00218
Haiku 4.5 $0.00109 $0.00109

Measured 9d ago against content hash 53c48cd0935a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

claude-code-statusline CLAUDE.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 9d 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
Origin

This is a copy

100% identical to claude-code-statusline AGENTS.md — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 56 lines

How it starts

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

claude-code-statusline

Sync: Any changes to this file must also be applied to AGENTS.md and GEMINI.md.

A single-file Node.js statusline for Claude Code, plus three optional companion hooks that keep CLAUDE.md / AGENTS.md / GEMINI.md in sync and surface git state at session start.

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/md-sync-check.js — SessionStart drift detector for the CLAUDE/AGENTS/GEMINI trio.
  • optional-hooks/sync-md.js — PostToolUse mirror: writes CLAUDE.md → AGENTS.md + GEMINI.md, swapping the Sync: line per file.
  • optional-hooks/github-sync-check.js — SessionStart git status + cached origin divergence + background fetch for next session.

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 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 · 56 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. 9d ago First seen · 56 lines · 1,088 tokens per session scan A 53c48cd0935a

Subscribe to this mod's changes

claude-code-statusline CLAUDE.md is an instructions file published in the GitHub repository ilia-pluzhnikov/claude-code-statusline (112 stars, last pushed 20d ago), licensed MIT. It adds 1,088 tokens to every session, about $0.0054 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). It is 100% identical to claude-code-statusline AGENTS.md, differing in 2 lines, and is treated as a copy.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 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 · 3,735 tokens