clave-cli CLAUDE.md

A project guide for clave, a Rust terminal program that coordinates Claude and Codex coding assistants. It documents the project, commands, communication rules, and required checks.

In plain words
What is it for?
Use it when working on clave, including its chat, planning, and tandem modes, or when installing dependencies and running its checks.
Why use it?
It gives coding assistants the project context and operating rules they need before changing the code.

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/grabrick/clave-cli/claude-md
Clone the repo
git clone --depth 1 https://github.com/grabrick/clave-cli
Per session 2,551 This file is loaded in full into every session.
When invoked 2,551 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 $0.02551 $0.02551
Opus 5 $0.01275 $0.01275
Sonnet 5 $0.00510 $0.00510
Haiku 4.5 $0.00255 $0.00255

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

Security

Grade A, and why

clave-cli 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 2d 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 · 170 lines

How it starts

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

CLAUDE.md — навигатор по проекту clave

Этот файл — первое, что читает агент. Здесь собраны НЕОЧЕВИДНЫЕ тонкости и грабли, на которых легко сломать проект. Структуру кода агент увидит сам — тут то, чего в коде не видно.


0. Что такое clave

Локальный TUI-оркестратор на Rust (v0.3.0, MIT, edition 2021). Связывает CLI claude и codex как агентов в один цикл. Зависимости минимальны: crossterm 0.29, ratatui 0.30, serde_json, unicode-width, на unix — libc. Никаких async-рантаймов.

Режимы: чат, план (встроенный движок spec-clave вшит в бинарь), тандем (Executor=Claude + Critic=Codex спорят до консенсуса → исполнение → ревью → правка).


1. Жёсткие правила общения и авторства

  • Общение и комментарии/коммиты — на русском.
  • НИКАКИХ следов ИИ. В commit-сообщениях, описаниях PR, коде и комментариях НЕ упоминать Claude/Anthropic/ИИ, не добавлять Co-Authored-By, не ставить футер «Generated with…». Весь код и коммиты оформляются как код владельца.
  • Следовать лучшим практикам, не плодить уязвимости.

2. Тулчейн (иначе cargo: command not found)

cargo/rustc лежат в ~/.cargo/bin и НЕ в PATH сессии. В начале любой команды:

export PATH="$HOME/.cargo/bin:$PATH"

3. ГЕЙТ: без него ничего не отгружается

Перед КАЖДОЙ отгрузкой прогнать ВСЁ и убедиться, что зелено. exit 0 — НЕ доказательство: смотреть на строку test result: ok. N passed, а не на код возврата.

# PATH 1 — обычный
cargo test --bin clave

# PATH 2 — «CI без провайдеров»: пустое окружение без claude/codex в PATH.
# Ловит скрытые зависимости от установленных CLI. ОБЯЗАТЕЛЕН — на нём падало то,
# что PATH 1 пропускал.
env -i PATH="$HOME/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin" HOME="$HOME" cargo test

cargo clippy --bin clave --all-targets   # проект живёт на -D warnings, любое = красный
cargo fmt --check                        # `fmt --check | tail` ВРЁТ про exit — смотри вывод

4. Две ветки — САМОЕ КРИТИЧНОЕ

Read the full file on GitHub · 170 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. 2d ago First seen · 170 lines · 2,551 tokens per session scan A e340fc8c03c7

Subscribe to this mod's changes

clave-cli CLAUDE.md is an instructions file published in the GitHub repository grabrick/clave-cli (1 stars, last pushed 1mo ago), licensed MIT. It adds 2,551 tokens to every session, about $0.0128 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.