Agent skill
Lgpd anonymization
Apply anonymization (Art. 5, XI) and pseudonymization (Art. 13, §4) techniques to take data out of LGPD scope or reduce risk in analytics pipelines. Use...
New to this? An agent skill is a file of instructions your AI assistant follows for one job. The text above is written for the assistant. How to use a skill
What it does
Lgpd anonymization is a data skill from goul4rt/
In short, it shows your assistant how to work with data step by step.
The file is 67 lines long and is set out in parts such as “Diferença crítica”, “Técnicas”, “Pseudonimização” and “Anonimização”.
It has 2 code examples your assistant can follow.
When to use it
Reach for it when you have numbers or tables to clean, query or explain.
Everything it needs is in this one file.
It does not ask for special tools.
Safety check
Our checker read all 67 lines before we listed it.
It found no attack techniques, no hidden text and no steps that switch off your assistant's safety or send your data away.
It flagged nothing else to watch for.
The text links to no outside sites.
It is shared under the MIT license.
Still read it before you use it, like any instructions you give your AI.
Open in the appOriginal on GitHub
What is inside
- Diferença crítica
- Técnicas
- Pseudonimização
- Anonimização
- Pipeline típico de analytics
- Anti‑padrões
- Implementação
- Re‑identificação — teste obrigatório
How to use it
- Claude Code: save the text as
.claude/skills/lgpd-anonymization/SKILL.mdin your project. Claude reads it when a task needs it. - Claude, ChatGPT or Gemini: tap Copy skill and paste it into the chat. It arrives with a short line asking the assistant to use it.
- Cursor and other agents: add it to the project rules or instructions.
Read the full guide to using an agent skill
Want your own? How to write an agent skill that works
The full skill
---
name: lgpd-anonymization
description: Apply anonymization (Art. 5, XI) and pseudonymization (Art. 13, §4) techniques to take data out of LGPD scope or reduce risk in analytics pipelines. Use when user asks 'anonimizar', 'pseudonimizar', 'k-anonymity', 'differential privacy', 'tokenização', 'analytics LGPD', or designing analytics/ML pipelines.
---
# Anonimização e Pseudonimização
## Diferença crítica
| | Anonimização (Art. 5º, XI) | Pseudonimização (Art. 13, § 4º) |
|---|---|---|
| Reversível? | Não, considerando meios técnicos razoáveis | Sim, com info adicional segregada |
| Status LGPD | Fora do escopo (Art. 12) | Continua sendo dado pessoal |
| Uso típico | Estatísticas públicas, datasets de pesquisa | Analytics interna, logs, redução de exposição |
| Risco residual | Baixíssimo (re-identificação) | Médio (depende da segurança da chave) |
## Técnicas
### Pseudonimização
- **Tokenização determinística**: substitui PII por token; mapping mantido em vault separado
- **Hashing com salt** (cuidado — sem salt aleatório, é reversível por força bruta para campos de baixa entropia como CPF)
- **Format-preserving encryption** quando o formato precisa ser mantido
### Anonimização
- **Generalização**: idade exata → faixa (25-34); CEP → cidade
- **Supressão**: remoção de campos identificadores
- **Perturbação**: adicionar ruído aleatório
- **k-anonymity (k ≥ 5)**: cada combinação de quasi-identificadores aparece em ≥ k registros
- **l-diversity, t-closeness**: refinamentos para resistir a ataques de inferência
- **Differential privacy (ε pequeno)**: garantia matemática contra re-identificação
## Pipeline típico de analytics
```
[Postgres prod] → ETL com pseudonimização (token PII) → [Analytics DW] → Generalização + k-anonymity → [Dashboards públicos]
```
## Anti-padrões
- ❌ "Removemos o nome" e mantemos CPF, e-mail, endereço — **não é anonimização**
- ❌ Hash de CPF sem salt único — facilmente reversível (~210 milhões de combinações)
- ❌ ID interno como "pseudônimo" se está exposto em URLs e logs — não é pseudonimização
- ❌ Agregação só por região quando dataset tem campos suficientes para inferência cruzada
## Implementação
Ver `assets/anonymization-recipes.md` para receitas concretas em SQL e Python.
## Re-identificação — teste obrigatório
Antes de declarar um dataset "anonimizado":
1. **Linkage attack**: tente combinar com dataset público
2. **Inference attack**: estime atributo sensível a partir dos outros
3. **Singling out**: existe registro único na base?
Se algum passa → dataset ainda é dado pessoal.
## Status update
```markdown
## F (legacy L6) — Anonimização ✓
- Pipelines de analytics revisados
- {N} datasets passados por pseudonimização
- {M} datasets passados por anonimização (k=5+)
- Vault de tokens isolado
- Próximo: lgpd-dsar (legacy) ou conforme pipeline
```
Copyright (c) goul4rt and contributors.
Published under the MIT License, which you can read in full there.
Shown as published on GitHub, with credit and a link to the original.
Read it before you use it.
More skills
Algorithmic art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.
Canvas design
Create beautiful visual art in .png and .pdf documents using design philosophy.
API and interface design
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface.
Try it in your browser
Today's AI news, one card per swipe.
Free to start.