lex CLAUDE.md

lex CLAUDE.md is an instructions file for Claude Code from SFHAJJI/lex. It costs 2,351 tokens per session, scanned A, original, Apache-2.0.

A set of project instructions for working on Lex, a system for retrieving and checking Luxembourg law and reviewed European Union legal materials.

In plain words
What is it for?
It is for guiding coding agents in the Lex repository, enforcing safe file and credential handling, and preserving the project's build, deployment, and publishing conventions.
Why use it?
It keeps development and publishing work within the project's rules, including which data sources may be used and how sensitive information and repository changes are handled.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sfhajji/lex/claude-md.svg)](https://agentmods.dev/instructions/sfhajji/lex/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sfhajji/lex/claude-md"><img src="https://agentmods.dev/badge/instructions/sfhajji/lex/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,351 This file is loaded in full into every session.
When invoked 2,351 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.1 $0.02351 $0.02351
Opus 5 $0.01175 $0.01175
Sonnet 5 $0.00470 $0.00470
Haiku 4.5 $0.00235 $0.00235

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

Security

Grade A, and why

lex 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 6d 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 · 177 lines

How it starts

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

Working in this repo

Point-in-time retrieval of Luxembourg law and a reviewed, configuration-led EU corpus. The product claim is that an answer can be checked rather than trusted, so the rules below are not style preferences: most of them exist because breaking them produced a confidently wrong answer at some point.

Hard rules

Scoped git add only. Never git add -A. A cloud session edits docs in this repo in parallel; a blanket add sweeps its work into your commit.

Never read the law data files. works/, *.xml, *.html, and law *.json in lex-articles or the corpus repos. They are large and reading them tells you nothing the index cannot. Query deploy/indexes/*.db with SQLite instead.

No em dashes or en dashes in published text. Site copy, README, release notes, PR bodies, commit messages. Hyphens in compounds are fine. This does not apply to ingested law or to code comments.

Never write the Azure OpenAI key to disk. Fetch inline, env var only: az cognitiveservices account keys list -n oai-soufien-dev -g rg-soufien-portfolio --query key1 -o tsv

Never commit C:\lex-ops\signing-key.pem.

Only official publisher endpoints. Respect robots.txt. User-Agent Lex/0.1 (+https://github.com/SFHAJJI/lex).

Build V3, do not evolve V2 into it

Owner ruling, 2026-08-29. The goal is a V3 that is clean and consistent with the V3 specs. The journey there does not have to be clean.

Breaking changes are allowed. Deleting a component is allowed. Deleting unit tests and integration tests is allowed when they describe V2 behaviour that a V3 component replaces. Do not spend effort preserving, migrating or negotiating around something V3 removes. If a test, a guard or a contract stands between you and implementing a V3 component as specified, delete it and say so in the commit; do not build machinery to satisfy it.

The failure this corrects: two co-owners spent a day on an acceptance protocol for page snapshots while the pages themselves were scheduled to be replaced by a new index roughly three times the scope and a new dossier architecture. Eight contract revisions, no product change. That is the shape to watch for. Process is not the product.

Read the full file on GitHub · 177 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. 6d ago First seen · 177 lines · 2,351 tokens per session scan A 7ffa7ff4b6f3

Subscribe to this mod's changes

lex CLAUDE.md is an instructions file published in the GitHub repository SFHAJJI/lex (9 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,351 tokens to every session, about $0.0118 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-31.

Related

Other instructions, from other repositories