Skip to content
Projects

About

Claude Code plugin for German/EU legal audits (DSGVO, TDDDG, UWG, AI Act, etc.). Not legal advice.

Developer Tools

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
+2

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

legal-audit-de

Multi-platform toolkit for systematic German and EU legal audits of codebases, live URLs, and legal documents — available for Claude Code, OpenAI Codex CLI, and GitHub Copilot CLI.

⚠️ This is NOT legal advice. See Disclaimer below.

License: MIT Language Scope Claude Code Codex CLI Copilot CLI

🇩🇪 Deutsche Version · 📖 Docs site


What is legal-audit-de?

A Claude Code plugin that acts like an IT / privacy legal audit workflow. It analyzes codebases, live websites, and individual legal documents for violations of German and EU law and produces:

  • LegalAudit.md — finding table with severity classification (CRIT / HIGH / MED / LOW)
  • Clean versions of flagged passages — ready to paste 1:1 into your project
  • Live browser checks via chrome-devtools-mcp (cookie banner blocking, Google Fonts leaks, pre-/post-consent behavior)
  • Single-document reviews (T&Cs, privacy policy, imprint, withdrawal notice, cookie policy)

Who is this for?

Designed for developers, founders, and small teams operating in or targeting the German / EU market who:

  • Don't have an in-house legal department
  • Need to prepare compliance documentation before attorney review
  • Want to reduce the hours of attorney billing spent on "obvious" issues
  • Work with AI-assisted development and want their tooling to know DE/EU law specifics

English-speaking engineers in Germany are explicitly in scope — the plugin handles the rigorous German paragraph references while giving you English-language explanations in the wiki.

Features

🔎 Commands

Command Purpose
/legal-audit <path> Full legal audit of a codebase
/legal-audit-live <url> Live browser check of a public URL
/legal-client-test <url> Website check-up for agencies: report as HTML and PDF with your own letterhead
/legal-doc-check <file> Single-document review (T&C / privacy / imprint / withdrawal / cookie / social bio)
/legal-kb <slug> Load a specific KB article into context
/legal-verify <topic> Attorney and tool recommendations
/legal-update [--stale-only] Refresh KB against primary sources
/legal-audit-de-update NEW — Update plugin + KB together (marketplace refresh + primary source verification)
/legal-status Plugin health (KB age, placeholders, hook status, Pro-Mode status)
/legal-pro-mode enable|disable|status NEW — Pro-Mode toggle (standard context instead of 1M) for Claude Pro subscribers

🤖 Agents

Three custom agents (default: Claude Opus 4.7 [1M] — maximum citation accuracy):

  • legal-auditor — scans codebase, classifies findings
  • legal-researcher — verifies every citation against Tier-1 primary sources
  • legal-text-writer — produces clean versions with automatic disclaimer injection

Pro-Mode for Claude Pro subscribers (no 1M access): three -pro agent variants with model: claude-opus-4-7 (standard ~200 K context). Activate via /legal-pro-mode enable or python3 scripts/legal-audit-pro-mode.py enable. The marker lives in the official plugin-data directory (${CLAUDE_PLUGIN_DATA}) and survives plugin updates.

📚 Knowledge Base

65 curated KB files with primary-source links (plus knowledge/INDEX.md, 66 files in total):

  • Statutes (14): GDPR (DSGVO), BDSG, TDDDG (cookies), UWG (competition), PAngV (pricing), BGB (civil code, T&C), DDG (digital services), DSA, DMA, AI Act, BFSG (accessibility), UrhG (copyright), MarkenG (trademark), NIS2-BSIG (IT security)
  • Topics (25): T&C templates, DPA templates, accessibility, order button, cookie consent, privacy policy, international transfers, DPIA, email marketing, images of third parties (KUG), imprint, AI content, AI transparency, data breach notification, price indications, seal-based advertising, social media privacy, TOM, tool catalog (80+ tools), tracking and analytics, copyright and stock photos, ROPA, advertising labelling, withdrawal instructions, quotation right
  • Case law (9): ECJ Schrems II, Planet49, Meta/Bundeskartellamt, C-654/25 (Google Fonts, referral by the BGH); General Court T-553/23 (Latombe, EU-US data privacy framework); BGH Cookie Consent, Inbox Advertising, VI ZR 10/24 (loss of control); Munich I "Google Fonts"
  • Authorities (4): DSK, EDPB, BfDI, state data protection officers
  • Checklists (6) for SaaS, landing pages, e-commerce, n8n, content/blog, pre-launch
  • Attorney and tool recommendations (7): IT-law specialist attorneys, data protection officers, SaaS-focused law firms, generators, consent management, scanners, supervisory authorities

Verification status (as of 2026-11-15): In each KB file's frontmatter, verifiziert-am holds the date of the last verification against primary sources; teilverifiziert-am is a state of its own ("partially verified") and never counts as fresh; aktualisiert is the fallback when verifiziert-am is missing or not a valid date. python scripts/legal-status.py sorts the files into the states fresh (under 90 days), stale (90 to 180 days), very stale (over 180 days), partially verified, invalid date and no frontmatter. Currently: 28 fresh, 37 partially verified, 0 stale, 1 without frontmatter (INDEX.md). python scripts/find-placeholders.py reports 52 open <<VERIFIKATION AUSSTEHEND>> markers in 37 files and no <<UNVERIFIZIERT>> marker.

🔌 Optional MCP acceleration

If you register the rechtsinformationen-bund-de-mcp server locally, the legal-researcher agent automatically uses structured ELI and ECLI access to the official German federal portal rechtsinformationen.bund.de instead of HTML scraping. The plugin works the same without it. Setup: templates/mcp/README.md.

⚡ Hook-based context management

The key: the 65 KB files are not loaded into every session. Instead:

  • SessionStart hook loads only knowledge/INDEX.md (~1,000 tokens)
  • UserPromptSubmit hook matches prompts against regex patterns in .claude/hooks/triggers.json and loads up to 3 relevant KB chunks on-demand
  • PostToolUse hook validates disclaimer injection in every written output

This keeps your context window lean while current legal knowledge is always within reach.

Installation

Requirements

  • Python ≥ 3.10 (for hook scripts and the sync tool)
  • One of the following CLIs:
  • Optional: chrome-devtools-mcp for /legal-audit-live and /legal-client-test
  • Optional: Obsidian for visual KB navigation (graph view, backlinks)

Claude Code (recommended — full hook architecture)

Marketplace

# In Claude Code — add marketplace, then install plugin
/plugin marketplace add FutureRootsDE/legal-audit-de
/plugin install legal-audit-de@futureroots-legal

For updates later:

/plugin marketplace update futureroots-legal
/legal-audit-de-update

Workspace clone

git clone https://github.com/FutureRootsDE/legal-audit-de.git
cd legal-audit-de
claude

On first start, the SessionStart hook automatically loads knowledge/INDEX.md. Then you can run:

/legal-audit /path/to/your/project

Codex CLI

Requires OpenAI Codex CLI.

As a Codex plugin / marketplace

codex plugin marketplace add FutureRootsDE/legal-audit-de

The repository contains:

  • .codex-plugin/plugin.json as the native Codex plugin manifest
  • .agents/plugins/marketplace.json as the Codex marketplace definition
  • .codex/skills/ with the Codex-ported skills

As a workspace clone

git clone https://github.com/FutureRootsDE/legal-audit-de.git
cd legal-audit-de
codex

Codex loads AGENTS.md in a workspace. Codex adapters live under .codex/; native plugin metadata lives under .codex-plugin/. Slash prompts live under .codex/prompts/. Run:

/legal-audit ./your-project

Differences from Claude Code:

  • No SessionStart / UserPromptSubmit hooks → skills load knowledge/INDEX.md themselves and pull relevant KB chunks on demand (auto-routing).
  • No WebSearch tool → Tier-1 verification only via http.get against the whitelist in .codex/config.toml.
  • Model selection: the plugin records claude-opus-4-7[1m] as the original model; Codex users select an equivalent large-context model (e.g. gpt-5).

GitHub Copilot CLI

Requires gh CLI with a Copilot subscription, or standalone GitHub Copilot CLI.

git clone https://github.com/FutureRootsDE/legal-audit-de.git
cd legal-audit-de
gh copilot suggest "Run legal-audit on the current directory"

Copilot auto-loads .github/copilot-instructions.md. Slash prompts live under .github/prompts/<name>/PROMPT.md.

Differences from Claude Code:

  • No hook API → analogous auto-routing as in Codex.
  • Permissions are managed via GitHub App scopes, not via plugin config. The whitelist in .github/copilot-instructions.md is a convention, not enforcement.
  • model: fields in agents are ignored; Copilot uses its own default.

Maintainer workflow (cross-platform sync)

If you edit .claude/ (the source of truth), run the sync before committing:

python3 scripts/sync-platforms.py --apply  # generates .codex/, .codex-plugin/, and .github/prompts/
python3 scripts/sync-platforms.py --check  # CI mode: exit 1 on drift

The validate.yml GitHub Action blocks PRs when the sync wasn't run. Its jobs: platform adapter sync check, citation check unit tests (no network, run as python -m unittest discover -s tests), Pro-Mode agent variant drift check, Pro-Mode toggle smoke test, disclaimer validation, placeholder scan (informational) and Markdown lint (relaxed). Latest run: 797 tests, 11 skipped. In addition, python3 scripts/sync-pro-variants.py --check verifies the -pro agent variants for drift.

Quick Start

1. Codebase audit

/legal-audit /path/to/your/nextjs-saas

Claude detects the project type (SaaS / landing page / e-commerce / n8n / content), picks the matching checklist, and dispatches the three agents for full analysis + clean versions + citation verification. Output lands in docs/legal-audit/ inside the target project.

2. Live website check

/legal-audit-live https://your-website.com

Uses browser automation to check which third-party requests fire before and after cookie consent. Catches classic violations: Google Fonts runtime leaks, trackers before consent, pixels without opt-in.

3. Document review

/legal-doc-check /path/to/your/tos.md

Individual legal texts (T&C, privacy policy, imprint, withdrawal notice, cookie policy) are reviewed against current law. Produces a finding table + fully corrected version.

4. Helper scripts (optional)

python scripts/legal-status.py [--verbose] [--json]   # KB age, placeholders, hooks, Pro-Mode
python scripts/find-placeholders.py [--json] [--group-by-file]
python scripts/verify-citations.py [options]          # citation check, standard library only

verify-citations.py checks federal court case numbers against the German federal legal-information API and ECJ/General Court case numbers against the Cellar of the EU Publications Office (status PENDING for pending cases; --no-eu switches the EU check off). With --check-norms (a mode of its own), statute citations are checked against gesetze-im-internet.de and BGBl. references against recht.bund.de (--max-bgbl N, default 0). Further options: --path, --json, --offline, --only-pending, --today YYYY-MM-DD, --strict (exit 1 on DATE_MISMATCH, with --check-norms on NORM_MISSING, ABSATZ_MISSING or BGBL_MISSING), --timeout, --rate, --eu-rate, --norm-rate, --no-cache, --cache-dir, --cache-ttl-days and --write-ecli (with --dry-run preview only). A hit counts as a primary-source confirmation, a missing hit is never proof to the contrary.

Legal scope

Covered: GDPR · BDSG · TDDDG · UWG · PAngV · BGB/AGB · DDG · DSA · DMA · AI Act · BFSG · UrhG · KUG · MarkenG · NIS2-BSIG

Out of scope: Criminal law · Employment law · Tax law (except HGB § 257 retention) · Corporate law · Jurisdictions outside DE/EU

Language

All outputs, findings, and KB articles are in German. Code comments and metadata use English.

Why German content? Because German legal paragraph wording is binding in the original language. A slightly off translation of "§ 7 Abs. 3 UWG" into English could mislead an attorney reviewing your output. The plugin therefore keeps all legal text in German — but gives you English-language explanations in the wiki and this README.

Source hierarchy

The legal-researcher agent verifies every citation against:

Tier 1 (binding): eur-lex.europa.eu, gesetze-im-internet.de, rechtsprechung-im-internet.de, curia.europa.eu, bundesanzeiger.de

Tier 2 (official secondary): bfdi.bund.de, datenschutzkonferenz-online.de, edpb.europa.eu, state data protection officers, bsi.bund.de

Tier 3 (context only, never as citation evidence): Law firm blogs

Every verification is logged under .claude/logs/zitate-verifikation-<date>.log.

Architecture

See CLAUDE.md (Claude-specific) and AGENTS.md (cross-platform). Short version:

legal-audit-de/
├── AGENTS.md                       # Top-level for Codex / generic agent CLIs
├── CLAUDE.md                       # Claude Code-specific guide
├── README.md / README.en.md        # User docs (DE / EN)
│
├── .claude-plugin/
│   ├── plugin.json                 # Claude Code plugin manifest
│   └── marketplace.json            # Marketplace metadata
│
├── .claude/                        # ★ SOURCE OF TRUTH ★
│   ├── commands/*.md               # 10 slash commands
│   ├── agents/*.md                 # 6 custom agents (3 plus 3 -pro variants)
│   ├── skills/*/SKILL.md           # 4 skills
│   ├── hooks/*.py                  # 3 hooks (SessionStart / PromptSubmit / PostToolUse), registered in .claude-plugin/plugin.json
│   ├── hooks/triggers.json         # 35 trigger patterns (keyword to KB chunk)
│   └── settings.json               # Permissions, WebFetch whitelist
│
├── .codex/                         # ⚙ generated by scripts/sync-platforms.py
│   ├── config.toml                 # Codex configuration
│   ├── prompts/*.md                # 10 prompts
│   ├── agents/*.md                 # 6 agents
│   └── skills/*/SKILL.md           # 4 skills (with auto-routing)
│
├── .codex-plugin/
│   └── plugin.json                 # ⚙ native Codex plugin manifest
│
├── .agents/plugins/
│   └── marketplace.json            # ⚙ Codex marketplace definition
│
├── .github/
│   ├── copilot-instructions.md     # Top-level for Copilot CLI
│   ├── workflows/                  # GitHub Actions (validate.yml, release.yml)
│   ├── prompts/<name>/PROMPT.md    # ⚙ 10 prompts (generated)
│   ├── agents/*.md                 # ⚙ 6 agents (generated)
│   └── skills/*/SKILL.md           # ⚙ 4 skills (generated)
│
├── knowledge/                      # 65 KB files plus INDEX.md (statutes, topics, case law, authorities, checklists, attorney and tool recommendations)
│   └── INDEX.md                    # only always-loaded file (Claude Code via hook)
│
├── templates/                      # LegalAudit, clean, disclaimer templates, git-hooks/, mcp/, client-test/
├── docs/                           # documentation site (GitHub Pages)
├── tests/                          # offline unit tests (citation check, legal-status.py, placeholder detection)
└── scripts/
    ├── sync-platforms.py           # Codex / Copilot adapter generator
    ├── sync-pro-variants.py        # generate -pro agent variants from the 1M variants
    ├── legal-audit-pro-mode.py     # set, clear and query the Pro-Mode marker
    ├── legal-status.py             # plugin health check
    ├── audit-compare.py            # audit diff tool
    ├── find-placeholders.py        # placeholder scanner
    ├── placeholder_check.py        # module for placeholder detection
    ├── verify-citations.py         # citation check: federal courts, EU Cellar, norms (optional)
    ├── citation_check/             # modules of the citation check
    ├── client-test.py              # entry point for /legal-client-test (check, profile, tempfile, init, plan, render, pdf)
    ├── client_report/              # library of the website check-up (standard library only)
    └── legal-audit-pdf.py          # PDF bundling

Directories marked ⚙ are automatically generated from .claude/. Direct edits there are overwritten by the sync tool.

Roadmap

  • v1.4.2 Round 2 of the double independent review of the knowledge base completed (all eight groups, 65 KB files), new Federal Court of Justice rulings on the cancellation button and on withdrawal instructions, misattributed case numbers removed
  • v1.4.1 Corrections in 65 KB files after a double independent review (round 1, placeholders 53 to 50), citation check extended to EU case law via Cellar (status PENDING) and norm check --check-norms; local file paths removed from shipped files
  • v1.4.0 Citation check against the German federal legal-information API (scripts/verify-citations.py with offline tests and CI job), optional MCP integration (rechtsinformationen), documentation site under docs/, large KB update (65 KB files, AI Omnibus Regulation (EU) 2026/1744, § 356a BGB as amended, three new landmark rulings) and 35 trigger patterns
  • v1.3.2 Pro-Mode for Claude Pro subscribers (standard context instead of 1M): /legal-pro-mode enable, six permanent agent variants, ${CLAUDE_PLUGIN_DATA} marker
  • v1.3.1 Native Codex plugin manifest + frontmatter-order fix (@AllstarGER)
  • v1.3.0 Multi-platform support: Codex CLI + GitHub Copilot CLI (in addition to Claude Code)
  • v1.3.0 GitHub Actions: validate.yml (sync check, disclaimer check, placeholder scan) + release.yml (bundle build and auto-release on tag)
  • v1.2.0 Tier-1 KB update wave: 40+ case-number corrections, primary-source verification
  • v1.1.0 Marketplace structure (.claude-plugin/marketplace.json) + /legal-audit-de-update
  • Submission to the official Claude Code plugin marketplace registry
  • English KB summary under knowledge/en/SUMMARY.md (for non-German-speaking users)
  • Additional checklists: mobile apps (iOS / Android BFSG), API-only services
  • Integration with trivy, bandit, other security scanners for combined audits
  • CI integration: automated KB freshness checks (every 90 days against Tier-1 sources)

Contributing

Contributions welcome! See CONTRIBUTING.md (German) / CONTRIBUTING.en.md (English):

  • New checklists
  • KB articles on special topics
  • English wiki translations
  • Verification of outdated citations
  • Bug reports for incorrect statements

Disclaimer

⚠️ This plugin does NOT provide legal advice within the meaning of § 2 RDG (German Legal Services Act).

All outputs (LegalAudit.md, clean versions, KB articles, command results) are intended as technical preparation for review by a licensed attorney. Final approval by a qualified attorney (specialist for IT law, or a certified data protection expert) is mandatory before putting content into production.

Laws and case law change — verify currency before relying on any output.

Use of this plugin is at your own risk. The authors and contributors assume no liability for damages arising from use or reliance on the outputs. See LICENSE for the full disclaimer.

Ethics and responsibility

This plugin is meant to:

  • Reduce preparation time for legal reviews
  • Democratize standards — even solo founders should be able to launch compliantly
  • Sensitize developers to key legal topics in the DE/EU context

This plugin is not meant to:

  • Replace attorneys or data protection officers
  • Legitimize production decisions without human review
  • Cover up incorrect or outdated statements (we maintain issues and PRs for that)

If you use the plugin professionally, please indicate that it's a preparatory tool and secure attorney sign-off.

Security

See SECURITY.md for the vulnerability disclosure policy.

License

MIT — free for any purpose. All rights to cited statutes and judgments remain with their respective holders (EU, Federal Republic of Germany, courts).

Credits

Built on Claude Code by Anthropic.

Inspired by the observation that GDPR compliance is unnecessarily hard for technical teams without a legal department — and that good preparation tooling makes qualified attorney access affordable for solo founders.

Contributors

Heartfelt thanks to everyone who has contributed to this plugin:

  • @AllstarGER — native Codex plugin manifest, frontmatter-order bug fix, and real-world validation against the Codex CLI (PR #1, v1.3.1).

PRs welcome — see CONTRIBUTING.md / CONTRIBUTING.en.md.


Questions? Issues? Contributions? → GitHub Issues · Discussions · Wiki

Explore related projects

Loading…