Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/sirmalloc/ccstatusline/agents-mdgit clone --depth 1 https://github.com/sirmalloc/ccstatuslineWhat 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 | $0.01822 | $0.01822 |
| Opus 5 | $0.00911 | $0.00911 |
| Sonnet 5 | $0.00364 | $0.00364 |
| Haiku 4.5 | $0.00182 | $0.00182 |
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 2d 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.
- 2d 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 (12,669 stars, last pushed 6d ago), licensed MIT. It adds 1,822 tokens to every session, about $0.0091 per session on Opus 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
ai-workflow AGENTS.md
Instructions for cunhaax/ai-workflow, covering ai workflow template, rules — non-negotiable, project overview, commands and architecture.
trackly-cli CLAUDE.md
Claude Code instructions for trackly-app/trackly-cli, covering trackly-cli, tech stack, backend production source of truth, directory structure and key commands.
com-example-config-AsyncTestConfig
Instructions for PIsberg/vibetags, covering copilot instructions for asynctestconfig and immutable type.
pupila CLAUDE.md
Instructions for FranRom/pupila, covering claude.md, where things live, stack, run locally and repo layout.
claude-bridge AGENTS.md
Instructions for kadaba/claude-bridge, covering agents.md — using claude-bridge from any ai coding cli, two independent channels, 1. coordination (the conversation), 2. file transfer (the bytes) — same for every tool and workflows.
UsageAtlas AGENTS.md
Instructions for SRX9/UsageAtlas, covering repository guidelines and coding approach.