ccstatusline is a configurable terminal status-line formatter for the Claude Code command-line interface. Claude Code users use it to display information such as the active model, Git branch, token usage, and other session metrics.
Borrowing it
Nothing to install: this file belongs to sirmalloc/ccstatusline. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/AGENTS.mdgit clone --depth 1 https://github.com/sirmalloc/ccstatuslineWrote 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.
[](https://agentmods.dev/instructions/sirmalloc/ccstatusline/agents-md)<a href="https://agentmods.dev/instructions/sirmalloc/ccstatusline/agents-md"><img src="https://agentmods.dev/badge/instructions/sirmalloc/ccstatusline/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.
<a href="https://agentmods.dev/instructions/sirmalloc/ccstatusline/agents-md"><img src="https://agentmods.dev/badge/instructions/sirmalloc/ccstatusline/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01865 | $0.01865 |
| Opus 5.5 | $0.00746 | $0.00746 |
| Sonnet 5.5 | $0.00373 | $0.00373 |
| Haiku 4.5 | $0.00186 | $0.00186 |
Grade A, and why
ccstatusline 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 17d 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.
- **Git integration**: Uses child_process.execSync to get current branch and changes How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
ccstatusline is a customizable status line formatter for Claude Code CLI that displays model info, git branch, token usage, and other metrics. It functions as both:
- A piped command processor for Claude Code status lines
- An interactive TUI configuration tool when run without input
Development Commands
# Install dependencies
bun install
# Run in interactive TUI mode
bun run start
# Test with piped input (use [1m] suffix for 1M context models)
echo '{"model":{"id":"claude-sonnet-4-5-20250929[1m]"},"transcript_path":"test.jsonl"}' | bun run src/ccstatusline.ts
# Or use example payload
bun run example
# Build for npm distribution
bun run build # Creates dist/ccstatusline.js with Node.js 14+ compatibility
# Run tests
bun test
# Run tests in watch mode
bun test --watch
# Lint and type check
bun run lint # Runs TypeScript type checking and ESLint without modifying files
# Apply ESLint auto-fixes intentionally
bun run lint:fix
Architecture
The project has dual runtime compatibility - works with both Bun and Node.js:
Core Structure
- src/ccstatusline.ts: Main entry point that detects piped vs interactive mode
- Piped mode: Parses JSON from stdin and renders formatted status line
- Interactive mode: Launches React/Ink TUI for configuration
TUI Components (src/tui/)
- index.tsx: Main TUI entry point that handles React/Ink initialization
- App.tsx: Root component managing navigation and state
- components/: Modular UI components for different configuration screens
- MainMenu, LineSelector, ItemsEditor, ColorMenu, GlobalOverridesMenu
- PowerlineSetup, TerminalOptionsMenu, StatusLinePreview
Utilities (src/utils/)
- config.ts: Settings management
- Loads from
~/.config/ccstatusline/settings.json - Handles migration from old settings format
- Default configuration if no settings exist
- Loads from
- renderer.ts: Core rendering logic for status lines
- Handles terminal width detection and truncation
- Applies colors, padding, and separators
- Manages flex separator expansion
- powerline.ts: Powerline font detection and installation
- claude-settings.ts: Integration with Claude Code settings.json
- Respects
CLAUDE_CONFIG_DIRenvironment variable with fallback to~/.claude - Provides installation command constants (NPM, BUNX, self-managed)
- Detects installation status and manages settings.json updates
- Validates config directory paths with proper error handling
- Respects
- colors.ts: Color definitions and ANSI code mapping
- model-context.ts: Model-to-context-window mapping
- Maps model IDs to their context window sizes based on [1m] suffix
- Sonnet 4.5 WITH [1m] suffix: 1M tokens (800k usable at 80%) - requires long context beta access
- Sonnet 4.5 WITHOUT [1m] suffix: 200k tokens (160k usable at 80%)
- Legacy models: 200k tokens (160k usable at 80%)
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.
- 17d ago Changed · +24 tokens per session a80f6fab212d
- 1mo ago Changed · +19 tokens per session 577074446022
- 1mo ago First seen · 152 lines · 1,822 tokens per session scan A ca81207df019
ccstatusline AGENTS.md is an instructions file published in the GitHub repository sirmalloc/ccstatusline (13,418 stars, last pushed yesterday), licensed MIT. It adds 1,865 tokens to every session, about $0.0075 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.
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).
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.
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).
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.
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).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.