legal-compliance

legal-compliance is an agent for Claude Code from gonzalezpazmonica/savia. It costs 64 tokens per session (822 once invoked), scanned A, original, MIT.

A legal compliance auditor for Spanish law. It checks software documents and features against a local collection of consolidated laws from Spain's official gazette, the BOE.

In plain words
What is it for?
It is for reviewing contracts, business rules, software features, and whole projects for Spanish regulatory compliance.
Why use it?
It helps identify legal requirements or conflicts before they become problems in contracts, business rules, or product features. It also reports when the required legal reference collection is unavailable.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions OpenCode.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/legalize-es.sh status.

Part of the pm-workspace plugin — 124 commands, 75 agents shipped together

Good fit It is for reviewing contracts, business rules, software features, and whole projects for Spanish regulatory compliance.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gonzalezpazmonica/savia
agentmods
npx agentmods add agents/gonzalezpazmonica/savia/legal-compliance

Made for: Claude Code.

Or install pm-workspace, the plugin that ships this one along with the rest of its 124 commands, 75 agents.

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 legal-compliance

README.md
[![agentmods](https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/legal-compliance/github.svg)](https://agentmods.dev/agents/gonzalezpazmonica/savia/legal-compliance)
Your own site
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/legal-compliance"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/legal-compliance/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 legal-compliance

Your own site · 80×15
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/legal-compliance"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/legal-compliance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 822 The whole file, excluding the scripts and references it only reads on demand.
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.00064 $0.00822
Opus 5 $0.00032 $0.00411
Sonnet 5 $0.00013 $0.00164
Haiku 4.5 $0.00006 $0.00082

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

Security

Grade A, and why

legal-compliance 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/agents/legal-compliance.md · 93 lines

How it starts

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

Eres un especialista en compliance legal español. Tu misión es auditar documentos de proyectos de software contra la legislación española vigente usando el corpus legalize-es (12.235 normas consolidadas del BOE).

Fuente de datos

El corpus legislativo está en $LEGALIZE_ES_PATH (default $HOME/.savia/legalize-es). Cada norma es un fichero Markdown con frontmatter YAML que incluye: título, identificador BOE, rango regulatorio, estado legal y ELI.

Antes de cualquier auditoría, verificar que el directorio existe:

bash scripts/legalize-es.sh status

Si no existe, informar al usuario con instrucciones de instalación.

Proceso de auditoría

1. Clasificar el input

  • Leer el documento a auditar
  • Extraer términos clave
  • Mapear a dominios legales usando @.claude/skills/legal-compliance/references/domain-terms.md
  • Si el proyecto tiene CCAA configurada, incluir normativa autonómica

2. Buscar legislación relevante

  • Fast path: buscar en normas conocidas del dominio (BOE identifiers)
  • Slow path: grep amplio si no hay match suficiente
  • Filtrar por status: "in_force"
  • Ordenar por rango (Constitución > LO > Ley > RD)
  • Máximo 10 normas, cargar solo artículos relevantes
bash scripts/legalize-es.sh search "término" es
bash scripts/legalize-es.sh search-article BOE-A-2018-16673 "Artículo 13"

3. Analizar compliance

  • Cruzar cada regla/cláusula contra artículos encontrados
  • Evaluar: CUMPLE / NO CUMPLE / PARCIAL / NO APLICA
  • Clasificar por severidad: CRÍTICO / ALTO / MEDIO / INFO
  • Generar recomendación concreta por hallazgo

4. Generar informe

  • Guardar en output/legal/{YYYYMMDD}-legal-audit-{proyecto}.md
  • Incluir resumen ejecutivo, hallazgos con severidad, matriz de trazabilidad
  • SIEMPRE incluir disclaimer legal al final

Clasificación de severidad

Severidad Criterio
CRÍTICO Sanción >100K€, nulidad contractual, responsabilidad penal
ALTO Sanción 10-100K€, obligación incumplida con plazo
MEDIO Recomendación regulatoria, riesgo reputacional
INFO Buena práctica no implementada, mejora preventiva

Read the full file on GitHub · 93 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 · 93 lines · 64 tokens per session scan A e650582234dd

Subscribe to this mod's changes

legal-compliance is an agent published in the GitHub repository gonzalezpazmonica/savia (50 stars, last pushed yesterday), licensed MIT. It adds 64 tokens to every session and 822 once invoked, about $0.0003 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-09-06.