claudechic: Instructions file for Claude Code

CLAUDE.md

claudechic CLAUDE.md is an instructions file for Claude Code from sprustonlab/claudechic. It costs 2,803 tokens per session, scanned A, original, MIT.

A repository instruction file for ClaudeChic, a terminal interface for Claude Code built with Textual and the Claude agent SDK. It describes how to run the tool and where major parts of the code live.

In plain words
What is it for?
Use it when running, resuming, developing, or modifying ClaudeChic's terminal interface, agent handling, commands, configuration, or session features.
Why use it?
It gives agents the project structure and development commands needed to make changes in the correct places.

Instructions file for Claude Code

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

This is sprustonlab/claudechic's own configuration. It tells Claude Code how to work on claudechic 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 claudechic configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sprustonlab/claudechic. 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/sprustonlab/claudechic/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/sprustonlab/claudechic

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sprustonlab/claudechic/claude-md/github.svg)](https://agentmods.dev/instructions/sprustonlab/claudechic/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sprustonlab/claudechic/claude-md"><img src="https://agentmods.dev/badge/instructions/sprustonlab/claudechic/claude-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 claudechic CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sprustonlab/claudechic/claude-md"><img src="https://agentmods.dev/badge/instructions/sprustonlab/claudechic/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,803 This file is loaded in full into every session.
When invoked 2,803 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02803 $0.02803
Opus 5.5 $0.01121 $0.01121
Sonnet 5.5 $0.00561 $0.00561
Haiku 4.5 $0.00280 $0.00280

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

Security

Grade A, and why

claudechic CLAUDE.md scanned grade A with 0 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

claudechic

A stylish terminal UI for Claude Code, built with Textual and wrapping the claude-agent-sdk.

Run

uv run claudechic
uv run claudechic --resume     # Resume most recent session
uv run claudechic -s <uuid>    # Resume specific session

Dev setup: uv sync --dev && source .venv/bin/activate (Linux/macOS).

File Map

claudechic/
├── __init__.py        # Package entry, exports ChatApp
├── __main__.py        # CLI entry point
├── agent.py           # Agent class - SDK connection, history, permissions, state
├── analytics.py       # PostHog analytics - fire-and-forget event tracking
├── agent_manager.py   # AgentManager - coordinates multiple concurrent agents
├── app.py             # ChatApp - main application, event handlers
├── awareness_install.py # claudechic-awareness install routine (~/.claude/rules/claudechic_*.md)
├── commands.py        # Slash command routing (/agent, /shell, /clear, etc.)
├── compact.py         # Session compaction - shrink old tool uses to save context
├── config.py          # CONFIG (user-tier) + ProjectConfig (project-tier) loading
├── errors.py          # Logging infrastructure, error handling
├── file_index.py      # Fuzzy file search using git ls-files
├── formatting.py      # Tool formatting, diff rendering (pure functions)
├── history.py         # Global history loading from ~/.claude/history.jsonl
├── mcp.py             # In-process MCP server for agent control tools
├── messages.py        # Custom Textual Message types for SDK events
├── remote.py          # HTTP server for remote control (live testing)
├── permissions.py     # PermissionRequest dataclass for tool approval
├── profiling.py       # Lightweight profiling utilities (@profile decorator)
├── sampling.py        # CPU-conditional sampling profiler for high-CPU investigation
├── protocols.py       # Observer protocols (AgentObserver, AgentManagerObserver)
├── sessions.py        # Session file loading and listing (pure functions)
├── styles.tcss        # Textual CSS - visual styling
├── theme.py           # Textual theme definition
├── usage.py           # OAuth usage API fetching (rate limits)
├── features/
│   ├── __init__.py    # Feature module exports
│   ├── browser/       # Gated browser control MCP tools (experimental.browser)
│   │   ├── __init__.py   # Public API (get_browser_tools, shutdown_browser, browser_enabled)
│   │   ├── session.py    # BrowserSession - lazy Playwright-Chromium lifecycle
│   │   └── tools.py      # browser_navigate/screenshot/click/type/scroll tools
│   └── worktree/
│       ├── __init__.py   # Public API (list_worktrees, handle_worktree_command)
│       ├── commands.py   # /worktree command handlers
│       └── git.py        # Git worktree operations
├── workflows/   # Workflow orchestration ENGINE (Python code)
│   ├── __init__.py    # Parser registration, public API
│   ├── engine.py      # WorkflowEngine - phase state, advance checks, artifact_dir
│   ├── loader.py      # ManifestLoader - 3-tier walk (package/user/project) + override resolution
│   ├── parsers.py     # Section parsers for rules, hints, phases, etc.
│   ├── phases.py      # Phase type, PhasesParser
│   └── agent_folders.py # Agent prompt assembly from workflow role dirs
├── checks/            # Check protocol (LEAF: stdlib only)
├── guardrails/        # Guardrail rules (LEAF: no upward imports)
├── hints/             # Hints pipeline (LEAF: stdlib only, no upward imports)
│   ├── __init__.py    # Package marker
│   ├── engine.py      # 6-stage hint evaluation pipeline
│   ├── parsers.py     # Manifest section parser for hints YAML
│   ├── state.py       # HintStateStore - persistence to .claudechic/hints_state.json
│   └── types.py       # HintSpec, HintDecl, HintRecord, HintLifecycle, TriggerCondition
├── defaults/          # Bundled package-tier content (data, not Python)
│   ├── global/        # Always-active manifests
│   │   ├── rules.yaml # Guardrail rules
│   │   └── hints.yaml # Hint definitions
│   ├── workflows/     # Bundled workflow YAML directories (9 workflows)
│   │   ├── audit/
│   │   ├── cluster_setup/
│   │   ├── codebase_setup/
│   │   ├── git_setup/
│   │   ├── onboarding/
│   │   ├── project_team/
│   │   ├── tutorial/
│   │   ├── tutorial_extending/
│   │   └── tutorial_toy_project/
│   └── mcp_tools/     # MCP tool scripts (cluster dispatch, etc.)
├── context/           # Claude Code context docs (data, not Python)
│   ├── CLAUDE.md      # User-facing quick reference (installed as ~/.claude/rules/claudechic_CLAUDE.md)
│   └── *.md           # System docs (checks, guardrails, hints, workflows, etc.)
├── audit/             # Audit pipeline scripts
├── processes.py       # BackgroundProcess dataclass, child process detection
├── screens/           # Full-page screens (navigation)
│   ├── chat.py        # ChatScreen - main chat UI (default screen)
│   ├── diff.py        # DiffScreen - review uncommitted changes
│   ├── session.py     # SessionScreen - session browser for /resume
│   ├── chicsession.py # ChicsessionScreen - chicsession picker and workflow activation
│   ├── rewind.py      # RewindScreen - checkpoint selection
│   ├── settings.py    # SettingsScreen - in-app config editor (per /settings)
│   ├── disabled_workflows.py # DisabledWorkflowsScreen - per-(level, id) toggle subscreen
│   ├── disabled_ids.py # DisabledIdsScreen - per-(level, id) toggle subscreen for hints + rules
│   ├── welcome.py     # WelcomeScreen - first-install onboarding
│   └── workflow_picker.py # WorkflowPickerScreen - workflow selection UI (with level badges)
└── widgets/
    ├── __init__.py    # Re-exports all widgets for backward compat
    ├── prompts.py     # All prompt widgets (Selection, Question, Model, Worktree)
    ├── base/          # Protocols and base classes
    ├── primitives/    # Low-level building blocks
    ├── content/       # Content display widgets
    ├── input/         # User input widgets
    ├── layout/        # Structural/container widgets (chat_view, sidebar, footer, indicators)
    ├── reports/       # In-page report widgets
    └── modals/        # Modal screen overlays

tests/                 # Test suite (pytest -- see Testing section)

docs/
└── dev/               # Developer documentation (from .ai-docs)

Read the full file on GitHub · 217 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. 2mo ago First seen · 217 lines · 2,803 tokens per session scan A c46ac5f3f577

Subscribe to this mod's changes

claudechic CLAUDE.md is an instructions file published in the GitHub repository sprustonlab/claudechic (2 stars, last pushed 2mo ago), licensed MIT. It adds 2,803 tokens to every session, about $0.0112 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

claudechic CLAUDE.md compared with instructions from other repositories

claudechic CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claudechic CLAUDE.mdsprustonlab/claudechicInstructions file22mo agoMITA2,803Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode