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/dr5hn/ccm/claude-mdgit clone --depth 1 https://github.com/dr5hn/ccmWrote 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/dr5hn/ccm/claude-md)<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>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 | $0.03531 | $0.03531 |
| Opus 5 | $0.01766 | $0.01766 |
| Sonnet 5 | $0.00706 | $0.00706 |
| Haiku 4.5 | $0.00353 | $0.00353 |
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()`) 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:
- 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) - 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 - Sequence & Cache (lines 370–550) —
sequence.jsonis the account registry (schema v3.1, auto-migrates from v1/v2/v3).resolve_account_identifier()matches by number, email, or alias. Bindings stored insequence.jsonunder"bindings"key - Session Management (lines 550–1160) —
session list|info|search|relocate|clean|archive|restore|archives. Path encoding:/→-for directory names under~/.claude/projects/ - 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 - Help System (lines 2900–3463) — Topic-based help with
show_help(), covers all modules including profiles, watch, recover, setup, codex - Environment Snapshots & Audit (lines 3464–3875) — capture/restore settings.json, MCP config, CLAUDE.md (strips tokens on save)
- Usage Statistics (lines 3876–4467) —
usage summary|top|history|sessions|compare - Doctor Module (lines 4468–4873) — 14 health checks (the Codex check is informational and never counts toward the issue total)
- Clean Module (lines 4874–5466) — 9 targeted cleanup commands plus
clean all - Profiles Module (lines 5467–5680) —
switch_isolated [--quiet]creates CLAUDE_CONFIG_DIR profiles (quiet mode prints only the path for hook use),cmd_profilesroutes list/sync/delete - Watch Module (lines 5681–5884) —
cmd_watchroutes start/stop/status, background polling ofrate-limits.json;watch statusalso reports Codex when installed - Usage Dashboard Module (lines 5885–6102) —
usage_dashboardwith per-account token attribution,format_token_counthelper - Session Archive Module (lines 6103–6322) —
session_archivecompresses old JSONL to tar.gz,session_restore(validates the name and extracts with-C),session_archives_list - Setup Module (lines 6323–6474) —
cmd_setupinteractive first-run wizard (6 steps) - Recover Module (lines 6475–6604) —
cmd_recoverchecks credential consistency (5 checks, including malformed project bindings) - Statusline Module (lines 6605–6931) —
statusline install|removegenerates a bash script that reads Claude Code session JSON via stdin, writes rate-limits.json for the watcher - Codex Module (lines 6932–7096) —
codex_latest_rollout(),codex_read_limits(),format_epoch(),codex_status(),cmd_codexroutesstatus. Read-only bridge parsing Codex CLI session rollout JSONL for rate limits and token usage; writescodex-limits.json. Never writes to~/.codex. - Init Module (lines 7097–7293) —
initauto-generates.claudeignoreby detecting project type from manifest files - Permissions Module (lines 7294–7443) —
permissions audit [--fix]scans settings.json for duplicate/contradictory/dead rules - Main Entry (lines 7444–7520) —
--no-colorparsing, dependency checks, case-based command dispatch with deprecation notices for removed commands
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.
- 4d ago First seen · 182 lines · 3,531 tokens per session scan B bf5f8051f9df
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.
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).
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.
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.
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 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).
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.