nullclaw CLAUDE.md

A project-instructions file for the nullclaw codebase, documenting its required reference file, Zig version, build commands, tests, formatting checks, and build options.

In plain words
What is it for?
Use it when working on nullclaw to follow its engineering guidance, build the project, run its tests, check formatting, and create selected platform or feature builds.
Why use it?
It gives coding agents the repository rules and validation commands they need before changing code, helping avoid incompatible builds or missed checks.

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/nullclaw/nullclaw/claude-md
Clone the repo
git clone --depth 1 https://github.com/nullclaw/nullclaw
Per session 2,439 This file is loaded in full into every session.
When invoked 2,439 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.02439 $0.02439
Opus 5 $0.01220 $0.01220
Sonnet 5 $0.00488 $0.00488
Haiku 4.5 $0.00244 $0.00244

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

Security

Grade A, and why

nullclaw 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 yesterday.

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

How it starts

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

Mandatory Reference

Read AGENTS.md before any code change. It is the authoritative engineering protocol covering architecture, naming conventions, anti-patterns, change playbooks, and validation requirements.

Build & Test Commands

# Requires exactly Zig 0.16.0 (verify: zig version)
zig build                           # dev build
zig build -Doptimize=ReleaseSmall   # release build (target: <1 MB binary)
zig build test --summary all        # run all 5,300+ tests (must pass with 0 leaks)
zig fmt src/                        # format all source files
zig fmt --check src/                # check formatting (used by pre-commit hook)

Primary validation command is zig build test --summary all (project-wide). Individual files can still be run with zig test <file>.zig when needed.

Build Flags

zig build -Dchannels=telegram,cli   # compile only specific channels (default: all)
zig build -Dengines=base,sqlite     # compile only specific memory engines (default: base,sqlite)
zig build -Dtarget=x86_64-linux-musl  # cross-compile for target triple
zig build -Dversion=2026.3.1        # override CalVer version string

Channel tokens: all, none, or comma-separated names (cli, telegram, discord, slack, signal, matrix, web, nostr, irc, email, imessage, whatsapp, mattermost, lark, dingtalk, line, onebot, qq, maixcam).

Engine tokens: base/minimal (enables none, markdown, memory, api), sqlite, lucid, redis, lancedb, postgres, all.

Git Hooks

Activate once per clone:

git config core.hooksPath .githooks
  • pre-commit: blocks if zig fmt --check src/ fails
  • pre-push: blocks if zig build test --summary all fails

Project Overview

NullClaw is an autonomous AI assistant runtime written in Zig 0.16.0. Hard constraints: 678 KB binary, ~1 MB peak RSS, <2 ms startup. Every dependency and abstraction has a measurable size/memory cost. Only two external dependencies: vendored SQLite (with build-time SHA256 hash verification) and websocket.zig (pinned commit).

Read the full file on GitHub · 158 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. yesterday First seen · 158 lines · 2,439 tokens per session scan A 69880daa48db

Subscribe to this mod's changes

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