coderlm CLAUDE.md

A project guide for Claude Code, an AI coding assistant, explaining CodeRLM and how to build and use it. CodeRLM indexes files and symbols so an assistant can request focused code context.

In plain words
What is it for?
Understanding the repository layout, building the Rust server, and using the plugin’s commands, hooks, and code-search workflow.
Why use it?
It helps an assistant explore a large codebase without loading every file or guessing where information is stored.

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/jaredstewart/coderlm/claude-md
Clone the repo
git clone --depth 1 https://github.com/JaredStewart/coderlm
Per session 1,481 This file is loaded in full into every session.
When invoked 1,481 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01481 $0.01481
Opus 5 $0.00740 $0.00740
Sonnet 5 $0.00296 $0.00296
Haiku 4.5 $0.00148 $0.00148

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

Security

Grade A, and why

coderlm CLAUDE.md scanned grade A 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://127.0.0.1:3000/api/v1/health
CLAUDE.md · 103 lines

How it starts

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

What This Is

CodeRLM applies the Recursive Language Model (RLM) pattern to codebases. A Rust server indexes a project's files and symbols (via tree-sitter), then exposes a JSON API that LLM agents query for targeted context — structure, symbols, source, callers, tests, grep. An agent skill (plugin/skills/coderlm/) wraps the API with a Python CLI and a structured workflow so Claude Code can explore unfamiliar codebases without loading everything into context.

Repository Layout

  • server/ — Rust codebase (the only code that gets built). Has its own .git.
  • plugin/ — Self-contained Claude Code plugin root
    • plugin/skills/coderlm/ — Skill definition + Python CLI wrapper
    • plugin/hooks/ — Claude Code hooks (SessionStart, UserPromptSubmit, PreCompact, Stop)
    • plugin/commands/ — Slash command definitions
    • plugin/scripts/ — Hook scripts (session lifecycle)
    • plugin/.claude-plugin/ — Plugin manifest (plugin.json)
  • .claude-plugin/ — Marketplace manifest (marketplace.json), points to plugin/

Build & Run

All commands run from server/:

# Build
cd server && cargo build

# Build release
cd server && cargo build --release

# Run
cd server && cargo run -- serve                       # no project pre-indexed
cd server && cargo run -- serve /path/to/project      # pre-index a project
cd server && cargo run -- serve --port 8080           # custom port

# Check compilation without building binary
cd server && cargo check

# Verify server is running
curl http://127.0.0.1:3000/api/v1/health

There are no tests yet. When adding tests, use cargo test from server/.

Server Architecture

The server is a single-binary axum application. Key modules under server/src/:

  • main.rs — CLI parsing (clap) and server startup
  • server/ — HTTP layer
    • state.rsAppState holding DashMap<PathBuf, Project> and DashMap<String, Session>. Multi-project support with LRU eviction at capacity.
    • routes.rs — All route handlers. Each handler calls require_project() to resolve session→project, then delegates to an ops function.
    • session.rs — Session struct with command history
    • errors.rsAppError enum mapped to HTTP status codes (400/404/410/500)
  • index/ — Filesystem indexing
    • file_tree.rsFileTree (DashMap of relative path → FileEntry). Supports definitions and marks.
    • walker.rs — Gitignore-aware directory scan using the ignore crate
    • watcher.rsnotify-debouncer-mini filesystem watcher; re-indexes changed files
    • file_entry.rsFileEntry struct (path, size, language, definition, mark)
  • symbols/ — Symbol extraction
    • mod.rsSymbolTable with DashMap primary store keyed by "file::name" and secondary indices by name and file
    • symbol.rsSymbol struct and SymbolKind enum
    • parser.rs — Runs tree-sitter on files, dispatches to per-language queries
    • queries/ — Tree-sitter query strings per language: symbols, callers (call-expression), variables (local bindings) for Rust, Python, TypeScript, Go (JS reuses TS base)
  • ops/ — Business logic called by route handlers
    • structure.rs — File tree rendering, define/redefine/mark
    • symbol_ops.rs — Symbol list/search/implementation/callers (AST-aware)/tests/variables (AST-aware)
    • content.rs — peek, grep (with scope-aware filtering), chunk_indices
    • annotations.rs — Save/load annotations to/from JSON on disk
    • history.rs — Session history retrieval
  • config.rs — Hardcoded ignore patterns and max file size constant

Read the full file on GitHub · 103 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 · 103 lines · 1,481 tokens per session scan A 16ce189053f4

Subscribe to this mod's changes

coderlm CLAUDE.md is an instructions file published in the GitHub repository JaredStewart/coderlm (300 stars, last pushed 3mo ago), licensed MIT. It adds 1,481 tokens to every session, about $0.0074 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

buildNext

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,040 tokens

langchain AGENTS.md

Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens