By George Curta ·
Claude Code in a project that holds client files
A law firm, or the development team working for it, uses Claude Code in a repository where client files and code with personal data sit side by side. This page walks through one session with the mod anonym-legal-guard: what the model receives, what the team sees, and where the limits are.
The setting
The repository contains case notes and letters next to source code and test fixtures. They hold names, email addresses, phone numbers and IBANs. The team wants Claude to read, summarise and write — but the model should receive as little personal data as possible.
- •Claude Code reads files and command output on its own, not only what you type.
- •Without the mod, that text goes to the model as it is.
- •The team needs the real values in its own files and on screen.
Step by step
- 1
Read a client file
What the team does
Asks Claude to read the case note in the project.
What the mod does
Sends the file text to anonym.legal for detection and replaces the detected values with placeholders before the text goes to the model.
- 2
Summarise it
What the team does
Asks for a short summary.
What the mod does
The model works with placeholders. Values found once are replaced everywhere in the session, also in different upper or lower case.
- 3
Write a note
What the team does
Asks Claude to save the summary as a note in the project.
What the mod does
The model writes placeholders; the mod puts the real values back locally, so the note on disk contains the real name. With file_values: deny the model does not write such files at all.
- 4
Run a command
What the team does
Lets Claude run a shell command, for example to search the files.
What the mod does
The command output is checked before it reaches the model. Converters and uploads such as base64 file or curl -d @file are refused; scp, sftp, rsync and tar c … | ask for confirmation.
What the model sees and what you see
Illustration with invented values. The exact placeholder names can differ.
Sent to the model
Case note — ‹PERSON_1·k7p› Email: ‹EMAIL_ADDRESS_1·k7p› Phone: ‹PHONE_NUMBER_1·k7p› IBAN: ‹IBAN_CODE_1·k7p› ‹PERSON_1·k7p› asks for a deadline extension.
Shown to you and written to disk
Case note — Erika Musterfrau Email: erika.musterfrau@example.com Phone: +49 30 0000000 IBAN: DE00 0000 0000 0000 0000 00 Erika Musterfrau asks for a deadline extension.
What did the tests show?
Measured on the test environment with test data (16–17 November 2026). These are single runs, not a promise for other data or set-ups.
- •A client file with name, email, phone number and IBAN was read, summarised and turned into a note: no request to the model contained a test value. The note on disk contained the real name.
- •Counter-check without the mod: all test values were in plain text in the requests.
- •base64 kunden.txt was refused. base64 produced by a script: the section was held back.
- •A large file with a new name: name, email and phone number were in no request to the model.
Where does the data go in this setting?
- •Detection runs at anonym.legal (/api/mcp/analyze, over HTTPS); anonym.legal sees the text for detection.
- •The mapping between placeholder and value stays in the session on the team member's computer; anonym.legal does not hold it.
- •The model provider receives the text with placeholders for detected values. The contract with the model provider is the firm's own matter.
- •Claude Code's local transcript (~/.claude/projects/) contains plain text.
Where are the limits?
The mod reduces how much personal data reaches the model. It is not a reason to stop checking what you share.
- •It protects against accidents, not against instructions planted in documents Claude reads (prompt injection) and not against deliberate misuse.
- •Detection misses values. Whatever it misses goes to the model. Other encodings (rot13 and similar) pass through. Names written in lower case are not replaced.
- •Claude Code's own local transcript (~/.claude/projects/) contains plain text. That file belongs to Claude Code, not to the mod.
- •In auto mode, Claude Code's approval model can receive real values. With leak_guard: block (the default) the mod stops that request.
- •--safe-mode, or three crashes of the mod runtime, switch the mod off.
- •After --resume, old placeholders can no longer be translated back.
- •By default the mod uses the detection languages saved in your anonym.legal account (Settings → Language); or set codes such as de or de,en. Each extra language checks every text again and costs tokens.
- •The mod's messages are in English by default; set Interface language to de for German.
- •For organisations: distribute it as a managed mod (Team and Enterprise logins load their own guard).
Set it up for your team
Needs Claude Code with mod support and a Basic, Pro or Business plan. The API token is in Settings → Developer; the mod page shows the installation step by step.
Limitations / Important note
- It protects against accidents, not against instructions planted in documents Claude reads (prompt injection) and not against deliberate misuse.
- Detection misses values. Whatever it misses goes to the model. Other encodings (rot13 and similar) pass through. Names written in lower case are not replaced.