domux CLAUDE.md

domux CLAUDE.md is an instructions file for coding agents from pranav7/domux. It costs 1,935 tokens per session, scanned A, original, MIT.

A set of repository instructions for domux, a Go command-line and terminal interface for managing coding sessions and TODO files. It describes the program’s commands, session state, storage, and development checks.

In plain words
What is it for?
Use it when adding or fixing domux commands, session handling, the terminal interface, installation integrations, or Go tests and builds.
Why use it?
It helps an agent change the correct part of the single-package application while preserving how sessions, worktree folders, and TODO files are connected.

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/pranav7/domux/claude-md
Clone the repo
git clone --depth 1 https://github.com/pranav7/domux

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pranav7/domux/claude-md.svg)](https://agentmods.dev/instructions/pranav7/domux/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/pranav7/domux/claude-md"><img src="https://agentmods.dev/badge/instructions/pranav7/domux/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,935 This file is loaded in full into every session.
When invoked 1,935 The same file — it is already loaded in full.
Security scan A 0 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.1 $0.01935 $0.01935
Opus 5 $0.00967 $0.00967
Sonnet 5 $0.00387 $0.00387
Haiku 4.5 $0.00194 $0.00194

Measured 5d ago against content hash 1b808b940361, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

domux 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 5d 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 · 52 lines

How it starts

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

Build & test

go build              # produces ./domux
go test ./...         # run all tests
go test -run TestX    # single test
go vet ./...

Single-package layout (package main) — no module subdirs. Go 1.22.

Architecture

Two surfaces, one binary. main.go dispatches: bare domux (or flags like --path/--list) goes through flag.Parse then runTUI; anything starting with a non-- arg routes through runCommand in commands.go to subcommands (start, attach, sessions, clear, install, ai-state, …).

Context resolution is the spine. Every command path funnels through resolveDomuxContext(cwd) in session.go. It tries the current tmux session first (resolveDomuxContextForSession), falling back to path-based lookup. Session state, when present, pins a session to a Root (git worktree root) so the TODO file stays attached even after cd into subdirs. The returned DomuxContext carries Session, Root, TodoPath, and State.

Storage layout (all under $HOME):

  • ~/.local/share/domux/by-path/<sanitized-root>.md — markdown TODO file per worktree root. /%2F. See resolver.go.
  • ~/.local/share/domux/sessions/<session>.jsonSessionState (root, todo_path, focused id, label, server, workspace, AI map). See session.go.
  • ~/.config/domux/domux.tmux — generated tmux integration written by domux install tmux.

Legacy dotfile bridge. mergeLegacyState in session.go reads ~/.tmux-label-*, .tmux-server-*, .tmux-workspace-*, .tmux-claude-*, .tmux-codex-* and folds them into SessionState on load. setAIState, labelCommand, etc. also write these legacy files so old tmux configs keep working. Don't remove the legacy writes without a migration plan.

AI state model. state.AI is map[string]string keyed agent:pane (e.g. claude:1_0, codex:default). aggregateAIStatesFromSession collapses per-pane entries into AIStates{Claude, Codex} with WAITING winning over CLAUDING/CODEXING. normalizeAIState is the single source of truth for value canonicalization — go through it.

Read the full file on GitHub · 52 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. 5d ago First seen · 52 lines · 1,935 tokens per session scan A 1b808b940361

Subscribe to this mod's changes

domux CLAUDE.md is an instructions file published in the GitHub repository pranav7/domux (5 stars, last pushed today), licensed MIT. It adds 1,935 tokens to every session, about $0.0097 per session on Opus 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.