kara CLAUDE.md

kara CLAUDE.md is an instructions file for coding agents from karalang/kara. It costs 14,407 tokens per session, scanned A, 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

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

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 14,407 This file is loaded in full into every session.
When invoked 14,407 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.14407 $0.14407
Opus 5 $0.07204 $0.07204
Sonnet 5 $0.02881 $0.02881
Haiku 4.5 $0.01441 $0.01441

Measured today against content hash 6d046089b612, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kara 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 today.

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 · 330 lines

How it starts

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

Commands

cargo build                            # Build the compiler (no LLVM backend)
cargo test                             # Run non-codegen tests (lexer, parser, resolver, typechecker, effect, ownership, interpreter)
cargo test --features llvm             # Run ALL tests including codegen E2E + memory_sanitizer (ASAN)
cargo test lexer                       # Run a single test file (e.g., tests/lexer.rs)
cargo test -- test_name                # Run a single test by name
cargo clippy --all --all-targets -- -D warnings  # Lint (must be clean before declaring work done)
cargo fmt --all                        # Format all files
cargo fmt --all -- --check             # Verify formatted (must be clean before declaring work done — peer to clippy)

cargo fmt --all -- --check is a hard pre-commit gate, peer to clippy. Both must clear before any commit lands. First action of any new coding session or slice: run cargo fmt --all -- --check. If it fails, fix with cargo fmt --all and land as a standalone chore: cargo fmt cleanup commit before starting feature work. Don't pull fmt drift into a feature commit; don't surgically revert drift to keep a commit scoped — both patterns push cleanup to CI and let drift accumulate in the meantime.

Use --all-targets, not --tests, on the clippy gate. --tests only builds the test target (cfg(test)), so any lint that fires only in production cfg slips through. The runtime crate has cfg-gated type definitions (e.g. KARAC_SPAWN_SITES is extern KaracSpawnSiteEntry in production but a SpawnSiteEntryStandIn wrapper under cfg(test)) — clippy lints on those code paths only fire in the cfg where they're real, and CI runs cargo clippy --all -- -D warnings (no --tests). --all-targets builds lib + bins + tests + examples + benches, each in its own cfg, so it covers both surfaces.

Run the clippy gate on BOTH feature legs — --features llvm is not a superset. The two cfgs contain different code, so each has lints the other cannot see, exactly as --all-targets covers cfgs --tests cannot. Measured: two src/cli.rs helpers whose only callers sit inside #[cfg(feature = "llvm")] were dead in the DEFAULT build, so cargo clippy --all --all-targets -- -D warnings failed on a clean checkout while the --features llvm leg stayed green — and CI runs the default leg (B-2026-08-18-23). Run both before declaring work done:

Read the full file on GitHub · 330 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. today Changed · +30 lines · +430 tokens per session 6d046089b612
  2. yesterday Changed · +31 lines · +867 tokens per session d341e35a2b05
  3. 5d ago First seen · 269 lines · 13,110 tokens per session scan A 9f8e130e7dd6

Subscribe to this mod's changes

kara CLAUDE.md is an instructions file published in the GitHub repository karalang/kara (44 stars, last pushed today), licensed Apache-2.0. It adds 14,407 tokens to every session, about $0.0720 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-30.