llmwiki: Instructions file for Claude Code

CLAUDE.md

llmwiki CLAUDE.md is an instructions file for Claude Code from emgiezet/llmwiki. It costs 2,159 tokens per session, scanned A, original, MIT.

Repository instructions for llmwiki, a Go command-line program that scans projects and uses a language model to create a wiki. They describe its commands, architecture, and project configuration.

In plain words
What is it for?
Use them when building, testing, debugging, configuring, or extending the llmwiki command-line program.
Why use it?
They explain where project files enter the program and how scanning, extraction, language-model processing, and wiki creation fit together.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/emgiezet/llmwiki/claude-md"><img src="https://agentmods.dev/badge/instructions/emgiezet/llmwiki/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,159 This file is loaded in full into every session.
When invoked 2,159 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02159 $0.02159
Opus 5 $0.01079 $0.01079
Sonnet 5 $0.00432 $0.00432
Haiku 4.5 $0.00216 $0.00216

Measured 9d ago against content hash f6f27dd865c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

llmwiki 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 9d 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 · 91 lines

How it starts

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

go build ./...                        # build everything
go build -o llmwiki .                 # build the binary
go test ./...                         # run all tests
go test ./internal/ingestion/... -v   # run a specific package
go test ./... -run TestFoo -v         # run a single test by name
go vet ./...                          # static analysis
llmwiki setup                         # interactive global config wizard (~/.llmwiki/config.yaml)
llmwiki init                          # interactive per-project wizard (no flags + TTY)

Architecture

The binary is a single cobra CLI. main.go wires the subcommands from internal/cmd/. The core data flow is:

ingest: scanner (+ extractor) → ingestionllmwiki

  1. internal/scanner — walks a project directory and collects relevant files (README, go.mod, docker-compose, .proto, etc.) into a single text summary. DetectServices auto-detects multi-service layouts from docker-compose.yml first, then subdirectory heuristics. ScanProject(ctx, dir, opts...) takes a WithExtractor option; when set, binary document files (.pdf/.docx/.odt/.epub) are converted to text and folded into the summary (capped at 50 files / ~50 KB each).
    • internal/extractor — shells out to configurable external converters (pandoc, pdftotext) to turn document files into text. CommandExtractor maps an extension to a command template ({{input}} placeholder, run without a shell), mirroring the subprocess pattern in llm/cli_backend.go. A missing tool yields ErrToolNotFound and the scanner skips the file rather than failing.
  2. internal/ingestion — orchestrates the pipeline: scan → prompt → LLM call → write. IngestProject branches on whether services were detected: zero services = single project file, one+ services = one file per service.
  3. internal/llm — three backends behind the LLM interface (Generate(ctx, prompt) (string, error)): claude-code (shells to claude -p), claude-api (Anthropic SDK), ollama (REST). NewFakeLLM is the test double used throughout.
  4. internal/wiki — reads/writes markdown files with YAML front matter. WriteProjectEntry/WriteServiceEntry own the file format. UpsertIndex maintains the master _index.md. query.go adds a read-only, LLM-free query layer: Store (rooted at the wiki dir) with Search(client, project) (filters _index.md; client = exact case-insensitive, project = substring), GetProject(client, project, service), and ListServices. It composes the existing ReadIndex/Parse*Entry/ExtractSection helpers and backs the MCP server.
    • knowledge.go — the knowledge-layer axis (see Wiki Storage Layout). SearchKnowledge(layers, query) (empty query = list), GetKnowledge(layer, topic), ListKnowledgeLayers(). Filesystem-walked rather than index-driven, so front matter is optional and a layer can be a git submodule. Layer names are validated with validation.NameComponent because they're joined into paths; safeio.ReadRegularFile refuses symlinks; .git dirs are skipped.
  5. internal/config — three-level config: global (~/.llmwiki/config.yaml), per-client (~/.llmwiki/clients/<customer>.yaml), and per-project (llmwiki.yaml). Merge resolves them project > client > global. Slice-valued fields (Extraction.Sections, Knowledge) replace rather than append.
  6. internal/tracker — change tracking via git history. cochange.go clusters files that change together (union-find, 30% co-occurrence threshold) into Areas; area.go computes a content-addressed hash from git ls-tree HEAD output; freshness.go compares a stored hash against the current one. GitRunner is the injectable git-subprocess interface (real impl shells to git, fakeGitRunner in tests). At ingest time ingestion.buildTracking writes the resulting wiki.TrackingMeta into entry front matter; cmd/check.go re-checks it.

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

Subscribe to this mod's changes

llmwiki CLAUDE.md is an instructions file published in the GitHub repository emgiezet/llmwiki (11 stars, last pushed 8d ago), licensed MIT. It adds 2,159 tokens to every session, about $0.0108 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.

Related

Other instructions, from other repositories

next.js AGENTS.md

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

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,153 tokens

vscode buildNext.instructions.md

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

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

langchain AGENTS.md

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,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens