kara: Instructions file for Claude Code

CLAUDE.md

kara CLAUDE.md is an instructions file for Claude Code from karalang/kara. It costs 5,322 tokens per session, scanned C, original, Apache-2.0.

A project guide for working on Kara, a programming language compiler. It documents commands, code-quality checks, branches, bug ownership, and the project structure.

In plain words
What is it for?
Use it when changing Kara’s compiler code, running Rust tests or lint checks, formatting files, or managing bug fixes across sessions.
Why use it?
It gives coding agents the repository-specific rules they need to build, test, format, and coordinate changes correctly.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/karalang/kara/claude-md"><img src="https://agentmods.dev/badge/instructions/karalang/kara/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,322 This file is loaded in full into every session.
When invoked 5,322 The same file — it is already loaded in full.
Security scan C 1 finding. 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.05322 $0.05322
Opus 5.5 $0.02129 $0.02129
Sonnet 5.5 $0.01064 $0.01064
Haiku 4.5 $0.00532 $0.00532

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

Security

Grade C, and why

kara CLAUDE.md scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf target/tsan
CLAUDE.md · 344 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code (claude.ai/code) in this repository. This is the v2 version, written at M3, when the legacy pipeline was deleted. The pre-M3 file, with every rule's measured history, is kept verbatim at docs/legacy/CLAUDE-legacy.md; read the matching section there before relaxing a rule here.

The gate

Four legs, all clean before any commit lands:

cargo fmt --all -- --check                                       # first action of every session
cargo clippy --all --all-targets -- -D warnings                  # CI's leg, the one easiest to miss
cargo clippy --all --all-targets --features llvm -- -D warnings  # the backend surface
cargo test --all                                                 # every workspace crate: front end, MIR, kernel, lsp, runtime
cargo test --features llvm                                       # everything, including the compiled backend
  • fmt first. If --check fails on a fresh checkout, land cargo fmt --all as a standalone chore: cargo fmt cleanup commit before feature work. Never fold drift into a feature commit.
  • Both clippy legs. --features llvm is not a superset: each cfg has code the other cannot see. --all-targets, never --tests, for the same reason.
  • Wasm cfgs are invisible to native clippy. When touching runtime code under a wasm cfg: cargo clippy -p karac-runtime --target wasm32-wasip1 --no-default-features and cargo clippy -p karac-runtime --target wasm32-wasip1-threads --no-default-features --features wasm-threads.
  • --all on the default test leg. Bare cargo test tests only the root package, so the kernel, lsp and runtime crates' tests never run; CI runs --all (measured at M3: two kernel reds reached main this way).
  • cargo test lexer runs one test file; cargo test -- <name> runs one test.

LLVM 22

--features llvm builds against LLVM 22 (inkwell llvm22-1, llvm-sys 221). A cloud container cannot reach apt.llvm.org and Ubuntu's archive stops at 20, so once per container, before any --features llvm build:

Read the full file on GitHub · 344 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 Changed · +1 lines · +28 tokens per session c8d11f236bbd
  2. 4d ago Changed · +37 lines · +576 tokens per session 5e27db23259b
  3. 13d ago Changed · +19 lines · +461 tokens per session scan A → C 6ad80880a052
  4. 15d ago Changed · -289 lines · -19,683 tokens per session 961cb3316c2b
  5. 17d ago Changed · +82 tokens per session 2c688cca8ef8
  6. 19d ago Changed · +2 lines · +115 tokens per session d3872bd662d8
  7. 1mo ago Changed 1cd831b96545
  8. 1mo ago Changed · +2 lines · +147 tokens per session 901e551d5788
  9. 1mo ago Changed · +12 lines · +664 tokens per session afe22deb99bf
  10. 1mo ago First seen · 560 lines · 22,932 tokens per session scan A 3f1fb76092a7

Subscribe to this mod's changes

kara CLAUDE.md is an instructions file published in the GitHub repository karalang/kara (45 stars, last pushed yesterday), licensed Apache-2.0. It adds 5,322 tokens to every session, about $0.0213 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

kara CLAUDE.md compared with instructions from other repositories

kara CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kara CLAUDE.mdkaralang/karaInstructions file45yesterdayApache-2.0C5,322Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot