lgpd-consent-schema

lgpd-consent-schema is a skill for Claude Code from goul4rt/lgpd-skills. It costs 128 tokens per session (1,252 once invoked), scanned A, original, MIT.

A database design for recording privacy consents under Brazil’s LGPD data-protection law. It keeps each consent version, purpose, evidence, and withdrawal as a permanent history.

In plain words
What is it for?
Use it to build a consent ledger with Prisma and connect consent fields or hooks to Better Auth. It covers consent by purpose, policy version, and person, including revocation.
Why use it?
It prevents consent records from being overwritten or losing the policy text a person agreed to. It also supports clear proof of when and how consent was given or withdrawn.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the lgpd-skills plugin — 19 skills shipped together

Good fit Use it to build a consent ledger with Prisma and connect consent fields or hooks to Better Auth. It covers consent by purpose, policy version, and person, including revocation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goul4rt/lgpd-skills/lgpd-consent-schema
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.

Any agent
npx skills add goul4rt/lgpd-skills --skill lgpd-consent-schema
Clone the repo
git clone --depth 1 https://github.com/goul4rt/lgpd-skills

Made for: Claude Code.

Or install lgpd-skills, the plugin that ships this one along with the rest of its 19 skills.

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 lgpd-consent-schema

README.md
[![agentmods](https://agentmods.dev/badge/skills/goul4rt/lgpd-skills/lgpd-consent-schema/github.svg)](https://agentmods.dev/skills/goul4rt/lgpd-skills/lgpd-consent-schema)
Your own site
<a href="https://agentmods.dev/skills/goul4rt/lgpd-skills/lgpd-consent-schema"><img src="https://agentmods.dev/badge/skills/goul4rt/lgpd-skills/lgpd-consent-schema/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 lgpd-consent-schema

Your own site · 80×15
<a href="https://agentmods.dev/skills/goul4rt/lgpd-skills/lgpd-consent-schema"><img src="https://agentmods.dev/badge/skills/goul4rt/lgpd-skills/lgpd-consent-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,252 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.00128 $0.01252
Opus 5 $0.00064 $0.00626
Sonnet 5 $0.00026 $0.00250
Haiku 4.5 $0.00013 $0.00125

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

Security

Grade A, and why

lgpd-consent-schema 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 12d 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.

skills/lgpd-consent-schema/SKILL.md · 142 lines

How it starts

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

Implementação técnica do consentimento como base legal (Art. 7º, I e Art. 11, I), versionado, auditável e revogável.

Princípios

  1. Append-only — nunca update destrutivo. Revogar = inserir novo registro com status=REVOKED.
  2. Versionado pela política — todo consentimento aponta para uma versão específica do texto consentido.
  3. Específico por finalidade — uma entrada por (titular, finalidade, versão da política).
  4. Evidência forte — hash do payload (timestamp, IP, user-agent, UI snapshot).
  5. Revogação fácil — Art. 8º, § 5º: "O consentimento pode ser revogado a qualquer momento mediante manifestação expressa do titular, por procedimento gratuito e facilitado."

Schema Prisma de referência

Ver assets/consent-schema.prisma.

Integração com Better Auth

Better Auth permite adicionar campos custom e hooks beforeCreate. Use para:

// auth.ts
export const auth = betterAuth({
  database: prismaAdapter(db, { provider: "postgresql" }),
  user: {
    additionalFields: {
      dateOfBirth: { type: "date", required: true }, // ECA Digital
      parentalConsentRef: { type: "string", required: false },
    }
  },
  hooks: {
    user: {
      create: {
        before: async (user, ctx) => {
          // 1. Validar idade (ECA Digital se aplicável)
          // 2. Não criar registro de consentimento aqui — fazer em /api/consent/grant
          //    porque consentimento exige UX dedicada (não pode ser "enterrado" no signup)
          return user;
        }
      }
    }
  }
});

Captura de consentimento na UI

Princípios:

  • Não pré-marcar caixas (Art. 8º, § 4º — manifestação livre).
  • Granular por finalidade — uma caixa por finalidade, não "concordo com tudo".
  • Linguagem clara — leiga, sem juridiquês.
  • Link para política — versão exata do texto consentido.
  • Idade — se < 18, fluxo ECA Digital (ver lgpd-eca-digital-minors).

Exemplo de payload do endpoint /api/consent/grant:

Read the full file on GitHub · 142 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 142 lines · 128 tokens per session scan A ab8492a8383e

Subscribe to this mod's changes

lgpd-consent-schema is a skill published in the GitHub repository goul4rt/lgpd-skills (52 stars, last pushed 3mo ago), licensed MIT. It adds 128 tokens to every session and 1,252 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

bug-hunter

A news-analysis skill that looks for unreasonable details in a social or industry story, investigates possible causes and incentives, and suggests ways to address the problem.

digoal/blog · 202 tokens

dsar-fulfillment

Daily GDPR data-subject-access-request runbook. Verifies each incoming request from Gmail, locates the subject's data read-only across every relevant Postgres table, compiles an access-or-deletion report in Google Docs within the {{sladays}}-day SLA, and flags it to {{legalreviewchannel}} for a lawyer to approve.…

kortix-ai/suna · 85 tokens

privacy-policy-stephane-boghossian

A zero-hallucination privacy-policy generator that takes anyone — non-lawyer founder to lawyer — from a guided intake to a publishable, jurisdiction-aware privacy policy. Jurisdiction-first: it detects which laws apply from where your users are, then drafts only the required clauses — GDPR/EU + UK, US (CCPA/CPRA, 20…

lawve-ai/awesome-legal-skills · 171 tokens

state-assets-register

Download nightly XML extracts and the XSD for Estonia's State Real Estate Register (RKVR).

taivop/marketplace · 23 tokens

Data Retention Schedule Review

Use when reviewing a draft or existing data retention schedule to inventory data categories against stated purposes, collect retention-period facts, flag legal-hold interactions, and surface orphaned-data and vendor-coverage gaps for attorney review.

zgbrenner/agentcounsel · 49 tokens

brasil-legal-skills

Use quando o usuário tiver dúvidas ou precisar de orientação sobre direito brasileiro, declaração de IRPF passo a passo, tributário (Simples Nacional, MEI, CNPJ, CNAE, Reforma Tributária 2026, CBS/IBS), trabalhista (CLT, rescisão, aposentadoria, INSS, CLT vs PJ), societário (abertura de empresa, conflitos entre…

AlissonSantos1/brasil-legal-skills · 159 tokens