ccm CLAUDE.md

ccm CLAUDE.md is an instructions file for coding agents from dr5hn/ccm. It costs 3,531 tokens per session, scanned B, original, MIT.

Repository instructions for CCM, a Bash command-line toolkit that manages Claude Code accounts, sessions, environments, and health checks.

In plain words
What is it for?
Use them when changing CCM, releasing a version, checking its health, or inspecting its statusline and web pages.
Why use it?
They give the coding agent the project’s structure, commands, and manual checks to run after changes, despite there being no automated test suite or build system.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/dr5hn/ccm/claude-md
Clone the repo
git clone --depth 1 https://github.com/dr5hn/ccm

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 ccm CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dr5hn/ccm/claude-md.svg)](https://agentmods.dev/instructions/dr5hn/ccm/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/dr5hn/ccm/claude-md"><img src="https://agentmods.dev/badge/instructions/dr5hn/ccm/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,531 This file is loaded in full into every session.
When invoked 3,531 The same file — it is already loaded in full.
Security scan B 2 findings. Scan, not verified.
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 $0.03531 $0.03531
Opus 5 $0.01766 $0.01766
Sonnet 5 $0.00706 $0.00706
Haiku 4.5 $0.00353 $0.00353

Measured 4d ago against content hash bf5f8051f9df, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

ccm CLAUDE.md scanned grade B with 2 findings 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 4d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **`write_json` applies chmod 600** — fine for credentials/sequence.json but wrong for settings.json. When writing settings.json, preserve original permissions with `stat` + `chmod`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Dependencies: bash 4.4+, jq, curl (checked at startup via `check_dependencies()`)
CLAUDE.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 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

CCM (Claude Code Manager) is a Bash CLI toolkit for managing multiple Claude Code accounts, sessions, environments, and health. Single-file architecture (ccm.sh, ~6600 lines) with a static landing page (index.html), a statusline visual guide (statusline.html), and a standalone statusline installer (statusline.sh).

Commands

# Release (bumps version in ccm.sh + CHANGELOG.md, commits, pushes, creates GitHub release)
./release.sh patch|minor|major|X.Y.Z [--dry-run]

# Test locally after changes
bash ccm.sh version
bash ccm.sh doctor
bash ccm.sh help
bash ccm.sh permissions audit
bash ccm.sh clean tmp --days 365   # should find nothing
bash ccm.sh usage history --days 1
bash ccm.sh profiles list
bash ccm.sh watch status
bash ccm.sh recover
bash ccm.sh session archives

# Landing page — open index.html directly in browser, no build step
# Statusline guide — open statusline.html directly in browser

There is no test suite, linter, or build system. Validate changes by running commands manually.

Architecture

ccm.sh — Single-file modular Bash script

The script follows a strict top-to-bottom section layout:

  1. Constants & Utilities (lines 1–550) — CCM_VERSION, color init, platform detection (detect_platform() → macos/wsl/linux), JSON helpers, validation functions, write_json() (atomic: temp file → validate → mv)
  2. Credential Management (lines 261–370) — macOS uses Keychain, Linux/WSL uses file-based storage with atomic writes (temp + mv). read_credentials()/write_credentials() are platform-dispatched
  3. Sequence & Cache (lines 370–550) — sequence.json is the account registry (schema v3.1, auto-migrates from v1/v2/v3). resolve_account_identifier() matches by number, email, or alias. Bindings stored in sequence.json under "bindings" key
  4. Session Management (lines 550–1160) — session list|info|search|relocate|clean|archive|restore|archives. Path encoding: /- for directory names under ~/.claude/projects/
  5. Account Management (lines 1160–2800) — Switching (checks project bindings first, supports --isolated [--quiet] for CLAUDE_CONFIG_DIR profiles), reordering (two-pass credential rename with pre-validated JSON), bind/unbind, shell hook (ccm hook [--isolated]), export/import
  6. Help System (lines 2900–3463) — Topic-based help with show_help(), covers all modules including profiles, watch, recover, setup, codex
  7. Environment Snapshots & Audit (lines 3464–3875) — capture/restore settings.json, MCP config, CLAUDE.md (strips tokens on save)
  8. Usage Statistics (lines 3876–4467) — usage summary|top|history|sessions|compare
  9. Doctor Module (lines 4468–4873) — 14 health checks (the Codex check is informational and never counts toward the issue total)
  10. Clean Module (lines 4874–5466) — 9 targeted cleanup commands plus clean all
  11. Profiles Module (lines 5467–5680) — switch_isolated [--quiet] creates CLAUDE_CONFIG_DIR profiles (quiet mode prints only the path for hook use), cmd_profiles routes list/sync/delete
  12. Watch Module (lines 5681–5884) — cmd_watch routes start/stop/status, background polling of rate-limits.json; watch status also reports Codex when installed
  13. Usage Dashboard Module (lines 5885–6102) — usage_dashboard with per-account token attribution, format_token_count helper
  14. Session Archive Module (lines 6103–6322) — session_archive compresses old JSONL to tar.gz, session_restore (validates the name and extracts with -C), session_archives_list
  15. Setup Module (lines 6323–6474) — cmd_setup interactive first-run wizard (6 steps)
  16. Recover Module (lines 6475–6604) — cmd_recover checks credential consistency (5 checks, including malformed project bindings)
  17. Statusline Module (lines 6605–6931) — statusline install|remove generates a bash script that reads Claude Code session JSON via stdin, writes rate-limits.json for the watcher
  18. Codex Module (lines 6932–7096) — codex_latest_rollout(), codex_read_limits(), format_epoch(), codex_status(), cmd_codex routes status. Read-only bridge parsing Codex CLI session rollout JSONL for rate limits and token usage; writes codex-limits.json. Never writes to ~/.codex.
  19. Init Module (lines 7097–7293) — init auto-generates .claudeignore by detecting project type from manifest files
  20. Permissions Module (lines 7294–7443) — permissions audit [--fix] scans settings.json for duplicate/contradictory/dead rules
  21. Main Entry (lines 7444–7520) — --no-color parsing, dependency checks, case-based command dispatch with deprecation notices for removed commands

Read the full file on GitHub · 182 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. 4d ago First seen · 182 lines · 3,531 tokens per session scan B bf5f8051f9df

Subscribe to this mod's changes

ccm CLAUDE.md is an instructions file published in the GitHub repository dr5hn/ccm (27 stars, last pushed 26d ago), licensed MIT. It adds 3,531 tokens to every session, about $0.0177 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). 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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 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,182 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,345 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

next.js 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