lq-ai: Instructions file for Claude Code

CLAUDE.md

lq-ai CLAUDE.md is an instructions file for Claude Code from LegalQuants/lq-ai. It costs 4,085 tokens per session, scanned A, original, Apache-2.0.

An orientation guide for coding assistants working on LQ.AI, a self-hosted AI platform for in-house legal teams. It explains the platform's purpose, security boundary, visible work product, decision routing, codebase, and style rules.

In plain words
What is it for?
Use it to learn the required reading order, choose the right project reference, understand the architecture, and make implementation decisions in the LQ.AI codebase.
Why use it?
It helps an unfamiliar agent make decisions that fit the project's transparency requirements and keep sensitive provider keys inside the inference gateway.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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 lq-ai CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/legalquants/lq-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/legalquants/lq-ai/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,085 This file is loaded in full into every session.
When invoked 4,085 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.04085 $0.04085
Opus 5.5 $0.01634 $0.01634
Sonnet 5.5 $0.00817 $0.00817
Haiku 4.5 $0.00409 $0.00409

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

Security

Grade A, and why

lq-ai 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 · 284 lines

How it starts

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

Orientation for Claude Code (and other coding assistants)

Purpose: Ground orientation for any agentic coding assistant working on the LQ.AI codebase. Read this first; it points at the right reference for any decision and lays out the project's standards in one place.

Audience: Claude Code, Cursor, Aider, or any human or agent making implementation decisions. Read in full before the first contribution; refer back as needed.

New here? Start with the cold-start guide for coding agents — it gives you the read-order, the build loop, the dev-environment hard rules, and how to take a roadmap item to a merged PR. Then keep this file open as your decision reference.


What this project is

LQ.AI is an open-source AI platform for in-house legal teams. Self-hosted; bring-your-own-keys; runs in the operator's environment. Skills are open-source work product, not closed prompts. The Inference Gateway is the security boundary — the only component holding privileged provider API keys.

The project's reason for existing — and its central design constraint — is transparency. Every artifact that shapes the user experience is visible work product. A skill that produces a wrong answer should be readable, debuggable, and forkable by the user who relies on it. This is not a marketing principle; it is an architectural commitment that affects every implementation decision.

Read README.md for the public-facing description. Read docs/PRD.md §1.3 Transparency as a Founding Principle for the full philosophical grounding.


Decision routing

When you face a decision while implementing, the canonical reference is — in priority order:

  1. The PRD (docs/PRD.md) — for product, capability, and architectural decisions.
  2. The OpenAPI sketches (docs/api/backend-openapi.yaml, docs/api/gateway-openapi.yaml) — for endpoint shapes, request/response schemas, status codes.
  3. The database schema (docs/db-schema.md) — for tables, columns, indexes, constraints.
  4. The gateway configuration example (gateway.yaml.example) — for the gateway's configuration shape.
  5. The implementation order (docs/M1-IMPLEMENTATION-ORDER.md) — for which task is next and what its acceptance criteria are.
  6. The skill-authoring guide (docs/skill-authoring-guide.md) — for skill conventions.
  7. CONTRIBUTING.md (CONTRIBUTING.md) — for code style, testing, PR process.

Read the full file on GitHub · 284 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 Changed · +80 tokens per session f626bfdd4c36
  2. 6d ago Changed · +76 tokens per session 7d539a609ccc
  3. 17d ago Changed · +1 lines · +112 tokens per session ea9621e55efa
  4. 1mo ago Changed · +8 tokens per session 42d8064611fe
  5. 1mo ago Changed · +15 tokens per session 55224e74404e
  6. 1mo ago First seen · 283 lines · 3,794 tokens per session scan A d64b866a353c

Subscribe to this mod's changes

lq-ai CLAUDE.md is an instructions file published in the GitHub repository LegalQuants/lq-ai (156 stars, last pushed today), licensed Apache-2.0. It adds 4,085 tokens to every session, about $0.0163 per session on Opus 5.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

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 · 9,715 tokens

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,786 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens