Here's a line of code that ships in a lot of SaaS products:
logger.info({ userId: user.id, cpf: user.cpf, email: user.email }, "login ok"); If you're not Brazilian, cpf probably looks like just another field. It isn't. The CPF is Brazil's individual taxpayer number. Think of it as a Social Security Number that people hand out at the pharmacy counter. It's tied to bank accounts, credit scores and tax records, and it's the first thing a fraudster wants.
That line writes it, in clear text, to your logs on every login. Under Brazil's data protection law, the LGPD, that's a data minimization problem and a security problem. If it leaks, you have 3 business days to notify the regulator.
And yes, this is your problem even if your company is in Austin, Berlin or Lisbon.
goul4rt / lgpd-skills
Agent Skills de conformidade LGPD (Lei 13.709/2018), resoluções ANPD e ECA Digital (Lei 15.211/2025) — instaláveis em Claude Code, Codex, Gemini CLI, Cursor e OpenCode. 1 maestro (lgpd-audit) + 18 sub-skills.
lgpd-skills — LGPD Privacy Engineering Toolkit
AI-assisted privacy auditing, implementation and governance for software projects. Toolkit modular e orquestrado de Agent Skills — compatível com Claude Code, Codex, Gemini CLI, Cursor e OpenCode — para diagnóstico técnico de código, implementação de controles de engenharia de privacidade e governança de artefatos sob a Lei nº 13.709/2018 (LGPD), normas da ANPD (até nov/2026) e Lei nº 15.211/2025 + Decreto nº 12.880/2026 (ECA Digital).
EN — Quick overview: LGPD Privacy Engineering Toolkit — an Agent Skills bundle (works in Claude Code, Codex, Gemini CLI, Cursor, and OpenCode) for AI-assisted privacy auditing, technical control implementation, and living governance in software repositories. One orchestrator skill (
lgpd-audit) coordinates 18 specialized sub-skills covering data mapping, legal basis (including Enunciado ANPD 1/2023), DPO/ATPP channels, ROPA, RIPD (with LINDDUN & AI threat modeling), event-sourced consent ledger, DSAR endpoints (standard vs. ATPP SLAs), emergency incident…
TL;DR: I'm a Brazilian engineer and I built lgpd-skills, 19 Agent Skills (1 orchestrator + 18 specialists) that you install in your AI coding agent. You type /lgpd-audit, it reads your repo, points at the file and line, cites the article of the law, stops at a checkpoint for a human and then fixes the code. MIT licensed, 311 ⭐ at the time of writing.
Table of contents
- Wait, does Brazilian law apply to me?
- LGPD vs. GDPR: the parts that bite
- What's an Agent Skill, quickly
- Install (30 seconds, 5 agents)
- A real run on a leaky app
- The report admits what it can't see
- Why it stops halfway
- Fixing the leak
- Four pipelines, including "we're leaking right now"
- Laws change, so there are tests
- What it does NOT do
- Want to help?
Wait, does Brazilian law apply to me?
Probably. Like the GDPR, the LGPD (Law No. 13.709/2018) is extraterritorial. Its Art. 3 says it applies to any processing of personal data, regardless of where the company is based or where the data is stored, if:
- the processing happens in Brazil, or
- you're offering goods or services to people in Brazil, or
- the data was collected in Brazil.
Brazil has over 200 million people. If you have a pricing page in BRL, a Portuguese locale, or simply a lot of signups from .br domains, you're in scope.
The regulator is the ANPD (Autoridade Nacional de Proteção de Dados). Fines go up to 2% of your revenue in Brazil, capped at R$ 50 million per infraction. Since 2025 there's also the ECA Digital (Law No. 15.211/2025), a children's online safety law with fines of up to 10% of revenue in Brazil. If you collect a birth date, that one matters too.
LGPD vs. GDPR: the parts that bite
The LGPD was heavily inspired by the GDPR, so a lot of your GDPR work carries over. But the deadlines are tighter and some defaults are different:
| GDPR | LGPD | |
|---|---|---|
| Breach notification to the regulator | 72 hours | 3 business days (Res. CD/ANPD 15/2024) |
| Breach notification to data subjects | "without undue delay", when high risk | 3 business days, with 7 mandatory items |
| Full answer to an access request | 1 month | 15 days (Art. 19, II) |
| Legal bases | 6 | 10 (includes "credit protection") |
| DPO | only in specific cases | required by default (the Encarregado); only small agents get an exemption |
| Transfers to the US | EU-US Data Privacy Framework / EU SCCs | no adequacy for the US: Brazilian SCCs (Res. 19/2024) or another Art. 33 mechanism |
| Transfers to the EU/EEA | n/a | covered by an adequacy decision since Jan 2026 (Res. 32/2026) |
That transfer row is the one that surprises people. If your user data lives in us-east-1, the LGPD wants a valid transfer mechanism for it, and the default one has Brazilian wording.
None of this is exotic. It's just a second rulebook that nobody on your team has read, written in Portuguese. That's the gap this project tries to fill.
What's an Agent Skill, quickly
A skill is a folder with a SKILL.md: a YAML frontmatter with a name and a description, then the instructions.
--- name: lgpd-audit description: Maestro orchestrator for LGPD (Lei 13.709/2018) privacy engineering, code-level auditing... Use for "audit our LGPD privacy controls" or "we collect personal data, what do we need"... --- The agent only keeps the description of each skill in context. The body (rules, templates, the normative reference) loads when the skill is called. It's an open format (agentskills.io), which is why the same repo works in five different agents.
The skills themselves are written in Portuguese, because that's the language of the law and of the ANPD's resolutions. You talk to it in English and it answers in English. Every screenshot below is a real English run.
Install (30 seconds, 5 agents)
In Claude Code:
/plugin marketplace add goul4rt/lgpd-skills /plugin install lgpd-skills@lgpd-skills Or from the terminal, which is what I ran on a clean config:
Look at the last line: ~2,100 always-on tokens for all 19 skills. The heaviest one (ECA Digital) costs ~5k tokens, and only when it runs.
Other agents:
# any compatible agent (skills.sh) npx skills add goul4rt/lgpd-skills # Codex codex plugin marketplace add goul4rt/lgpd-skills codex plugin add lgpd-skills@lgpd-skills # Gemini CLI gemini extensions install https://github.com/goul4rt/lgpd-skills Cursor: run /add-plugin with the repo URL. OpenCode: one line in opencode.json (details in the English README).
A real run on a leaky app
The repo ships an intentionally vulnerable example, examples/app-com-vazamento ("app with a leak"). Four files, three planted problems:
| File | What's wrong |
|---|---|
prisma/schema.prisma | cpf and birthDate stored in plain text |
src/auth/login.ts | the login log writes CPF and email |
src/lib/analytics.ts | analytics.identify sends CPF and email to Segment |
I opened the agent in that folder and played the part of a foreign company:
/lgpd-audit Run an LGPD privacy audit of this project. Context: legacy system in production, a US-based SaaS with 40 employees that has Brazilian users. It always asks two things first: which scenario you're in (new project, legacy, hybrid or active incident) and whether you're a small processing agent under Brazilian rules (an "ATPP", which gets doubled deadlines). Then:
57 seconds, 9 turns. Both leaks with file and line. And it used "not a small agent" to pick the right clocks: 3 business days for a breach, 15 days for a data subject request.
If you'd rather see the whole flow without installing anything, there's a 30-second demo in the README:
The report admits what it can't see
The diagnosis is written into your repo as .lgpd/gaps.md:
Two things I like here.
UNKNOWN is a real status. A four-file repo can't prove you haven't appointed a DPO; that might live in a Notion page. So the row says "not evidenced in the repo, needs team confirmation" instead of inventing a violation or inventing compliance.
Row 10 is the one a GDPR checklist misses. Because I said "US-based", it flagged that the user data hosted in the US and the data sent to Segment both need a transfer mechanism under Brazilian rules (Res. 19/2024), not just a DPA.
It also caught that birthDate is collected with no age check. If minors can sign up, the ECA Digital kicks in.
Why it stops halfway
⏸ CHECKPOINT L1 — gap analysis (1) continue to L2 (2) adjust gaps.md first (3) pause here The orchestrator has mandatory checkpoints before anything with legal weight: legal bases, the record of processing (ROPA), the impact assessment (RIPD, Brazil's DPIA), the privacy policy and breach notifications. Choosing "legitimate interest" as a legal basis is not a decision an LLM should make on its own. The skill drafts it and waits for your DPO and counsel.
Each step leaves an artifact in .lgpd/, which you review in a PR like any other code:
Since it's versioned in Git, your compliance gets a history. Six months from now you can see who changed the legal basis for marketing emails, and in which commit.
Fixing the leak
A diagnosis without a fix is just a nice PDF. So I asked for the two P0 leaks only, smallest possible diff:
Eleven seconds. The log keeps only userId, and Segment gets userId without the CPF and email traits.
But read the bottom of that screenshot. Fixing the code doesn't fix the past: old log lines still contain CPFs, Segment still holds what it already received, and the transfer paperwork is still missing. That's exactly the kind of thing that disappears in a PR titled "remove pii from logs".
Four pipelines, including "we're leaking right now"
The orchestrator picks a pipeline based on your situation:
| Scenario | Pipeline | First thing it does |
|---|---|---|
| New project | A | privacy by design: data map, legal basis and controls before code |
| Legacy in production | B | reverse discovery from code and a P0/P1/P2 gap matrix (this run) |
| Legacy + new features | C | diagnose the legacy, full controls on new code |
| Active incident | D | containment and the T+0 timestamp, no questionnaire |
Pipeline D matters most. If you type "we just found an endpoint exposing CPFs", the last thing you need is an agent asking how many employees you have. It records when you became aware (that's when the 3-business-day clock starts), walks you through containment and evidence preservation, and drafts the notices to the ANPD and to users. The drafts stop at a checkpoint, of course.
Some of the 18 specialist skills ship reference TypeScript, not just prose:
-
lgpd-consent-schema: an event-sourced consent ledger in Prisma (GRANTED, REVOKED, SUPERSEDED, EXPIRED), append-only with SQL triggers; -
lgpd-audit-logging: an audit trail with a serialized hash chain that detects tampering with old rows; -
lgpd-encryption-keys: versioned AES-256-GCM per field, with an HMAC blind index so you can still look users up by CPF without storing it in clear text; -
lgpd-dsar: data subject request routes with the right SLA for each regime.
Laws change, so there are tests
Brazilian data protection rules moved a lot in 2026: the EU/EEA adequacy decision in January, the ECA Digital decree, and the ANPD's guide for IT providers in October.
A model trained before that will tell you, with full confidence, that "the ANPD hasn't published any adequacy decisions yet". So the repo has normative regression tests:
In practice it's an assert that fails if any skill says something the current rules contradict:
it("documents Resolução CD/ANPD nº 32/2026 (EU/EEA adequacy) and checks adequacy before SCCs", () => { const intlSkill = readRepoFile("skills/lgpd-international-transfer/SKILL.md"); assert.ok( !/ainda não publicou/i.test(intlSkill), // "hasn't published yet" "lgpd-international-transfer must not claim ANPD has not published adequacy decisions", ); assert.match(intlSkill, /Islândia, Liechtenstein e Noruega/); // and adequacy (Art. 33, I) must be checked BEFORE falling back to SCCs }); There's also tsc --strict on the reference implementations, prisma validate on the schemas, and scenario tests: concurrency on the hash chain, key rotation, DSAR SLA math and age rules for minors. It all runs in GitHub Actions on every PR.
What it does NOT do
A tool that reads code can't certify a company. The README says it and it's worth repeating:
| Does in the repo | Needs people outside Git |
|---|---|
| Finds CPFs in logs, third-party SDKs, unencrypted schemas | Confirm the DPA with each vendor is actually signed |
| Implements a consent ledger, DSAR routes, field encryption | Train the team and audit customer support |
| Drafts the ROPA, RIPD, LIA and incident runbook | Validate legal bases and public texts with your DPO and counsel |
| Separates legal requirements from engineering best practice | Check IAM, backups and networks in your actual cloud |
It's not legal advice, and the audit itself says so. Whether the LGPD applies to your specific setup is a question for a Brazilian data protection lawyer. What the toolkit does is the engineering groundwork, so that conversation is about decisions instead of "wait, where do we store CPFs?".
Want to help?
I started this in May as a folder of skills you copied by hand. Today it has 311 stars, 29 forks and works in five agents.
Where help is welcome:
- English docs. The core README sections are translated; the rest still lives in Portuguese.
- Other ORMs. Reference code is Prisma today. Drizzle, TypeORM, Django ORM or ActiveRecord would be great.
- GDPR overlap. If you already run a GDPR program, tell me which LGPD differences hurt you the most. That would make a good next guide.
If you have users in Brazil and you run /lgpd-audit on your project, tell me in the comments: what was the first gap it found? My bet is a CPF somewhere in a log. 👀









