ccstatusline: Instructions file for Codex

AGENTS.md

ccstatusline AGENTS.md is an instructions file for Codex, OpenCode from sirmalloc/ccstatusline. It costs 1,865 tokens per session, scanned A, original, MIT.

A set of project instructions for ccstatusline, a command-line tool that formats Claude Code status information such as the model, Git branch, and token usage. It also includes an interactive text-based configuration screen.

In plain words
What is it for?
Use it when developing, testing, linting, building, or running ccstatusline interactively or as a processor for Claude Code status data.
Why use it?
It records the correct installation, development, testing, linting, and build commands, while explaining that the project runs with both Bun and Node.js.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is sirmalloc/ccstatusline's own configuration. It tells Codex and OpenCode how to work on ccstatusline 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 ccstatusline configures →

About the project

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.

sirmalloc/ccstatusline · 13,418 stars · on GitHub

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/sirmalloc/ccstatusline

Made for: 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 ccstatusline AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sirmalloc/ccstatusline/agents-md/github.svg)](https://agentmods.dev/instructions/sirmalloc/ccstatusline/agents-md)
Your own site
<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.

agentmods 80×15 button for ccstatusline AGENTS.md

Your own site · 80×15
<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>
Per session 1,865 This file is loaded in full into every session.
When invoked 1,865 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.01865 $0.01865
Opus 5.5 $0.00746 $0.00746
Sonnet 5.5 $0.00373 $0.00373
Haiku 4.5 $0.00186 $0.00186

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

Security

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
AGENTS.md · 152 lines

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:

  1. A piped command processor for Claude Code status lines
  2. 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
  • 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_DIR environment 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
  • 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%)

Read the full file on GitHub · 152 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. 17d ago Changed · +24 tokens per session a80f6fab212d
  2. 1mo ago Changed · +19 tokens per session 577074446022
  3. 1mo ago First seen · 152 lines · 1,822 tokens per session scan A ca81207df019

Subscribe to this mod's changes

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.

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,786 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,731 tokens

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.

denoland/deno · 3,077 tokens