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.
npx skills add goul4rt/lgpd-skills --skill lgpd-audit-logginggit clone --depth 1 https://github.com/goul4rt/lgpd-skillsWrote 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.
[](https://agentmods.dev/skills/goul4rt/lgpd-skills/lgpd-audit-logging)<a href="https://agentmods.dev/skills/goul4rt/lgpd-skills/lgpd-audit-logging"><img src="https://agentmods.dev/badge/skills/goul4rt/lgpd-skills/lgpd-audit-logging/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.
<a href="https://agentmods.dev/skills/goul4rt/lgpd-skills/lgpd-audit-logging"><img src="https://agentmods.dev/badge/skills/goul4rt/lgpd-skills/lgpd-audit-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00090 | $0.00968 |
| Opus 5 | $0.00045 | $0.00484 |
| Sonnet 5 | $0.00018 | $0.00194 |
| Haiku 4.5 | $0.00009 | $0.00097 |
Grade A, and why
lgpd-audit-logging 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.
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Audit Logging
Log imutável encadeado para prova de conformidade (Art. 6º, X — responsabilização) e registro de incidentes (Art. 10 Res. 15/2024 — 5 anos).
Princípios
- Append-only — sem updates nem deletes
- Hash chain — cada entry referencia o hash da anterior (tamper-evident)
- Minimização — log evento e hash do payload, NÃO o payload em claro
- PII out — nunca logar PII completa (mascarar)
- Retenção — mínimo 5 anos para eventos relacionados a incidentes; 6m+ para eventos correntes
Eventos a logar
- Autenticação (login, logout, MFA, falhas)
- Acesso a dados pessoais (especialmente sensíveis)
- Mudanças em consentimento (grant, revoke)
- DSAR (recebimento, fulfillment, rejeição)
- Mudanças de configuração de privacidade
- Acesso administrativo a dados de outros usuários
- Exports e downloads em massa
- Mudanças em RBAC
Schema Prisma
model AuditLogEntry {
id String @id @default(cuid())
actorId String? // null se sistema
actorType ActorType
action String // "READ", "WRITE", "DELETE", "EXPORT", "DSAR_FULFILLED", "CONSENT_REVOKED"
resource String // "User:abc123", "Order:xyz"
subjectId String? // titular afetado (se aplicável)
legalBasis String?
purpose String?
ipAddress String? @db.Inet
userAgent String?
payloadHash String // SHA-256 do payload (sem PII)
prevHash String? // hash do registro anterior
selfHash String // SHA-256(prevHash || timestamp || action || resource || payloadHash)
timestamp DateTime @default(now())
@@index([subjectId, timestamp])
@@index([actorId, timestamp])
@@index([action, timestamp])
}
enum ActorType { USER ADMIN SYSTEM OPERATOR }
Middleware Next.js
// lib/audit.ts
import { createHash } from "crypto";
import { db } from "./db";
export async function logAudit(entry: {
actorId?: string;
actorType: ActorType;
action: string;
resource: string;
subjectId?: string;
legalBasis?: string;
purpose?: string;
payload?: object;
req?: Request;
}) {
const last = await db.auditLogEntry.findFirst({
orderBy: { timestamp: "desc" },
select: { selfHash: true }
});
const payloadHash = createHash("sha256")
.update(JSON.stringify(entry.payload ?? {}))
.digest("hex");
const timestamp = new Date();
const selfHash = createHash("sha256")
.update(`${last?.selfHash ?? ""}|${timestamp.toISOString()}|${entry.action}|${entry.resource}|${payloadHash}`)
.digest("hex");
return db.auditLogEntry.create({
data: {
...entry,
payload: undefined,
payloadHash,
prevHash: last?.selfHash,
selfHash,
ipAddress: entry.req?.headers.get("x-forwarded-for") ?? null,
userAgent: entry.req?.headers.get("user-agent") ?? null,
timestamp
}
});
}
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.
- 12d ago First seen · 119 lines · 90 tokens per session scan A 38ed46da64a5
lgpd-audit-logging is a skill published in the GitHub repository goul4rt/lgpd-skills (52 stars, last pushed 3mo ago), licensed MIT. It adds 90 tokens to every session and 968 once invoked, about $0.0005 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.
Other skills, from other repositories
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…
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…
digital-brasil
Use para LGPD, proteção de dados, Marco Civil da Internet, cookies, termos de uso, privacidade em apps e sites, direitos digitais, vazamento de dados, adequação LGPD. Ativa em "LGPD", "proteção de dados", "política de privacidade", "vazamento de dados", "cookies", "Marco Civil", "direito ao esquecimento".
privacy-compliance
Comprehensive global privacy compliance agent skill covering GDPR, CCPA/CPRA, HIPAA Privacy Rule, EU AI Act, LGPD, cross-border data transfer mechanisms (SCCs, BCRs, EU-US DPF), PII identification and classification, data minimization, consent management, privacy-by-design patterns, DPIA workflows, data subject access…
compliance-review
Compliance & Governance Review: Reviews systems for regulatory compliance — SOC2, HIPAA, PCI-DSS, ISO 27001, LGPD/GDPR. Covers access control, audit logging, encryption, data retention, incident response, and compliance documentation. Use when the user mentions SOC2, HIPAA, PCI, ISO 27001, LGPD, GDPR, compliance…
analise-juridica-br
Skill para análise estruturada de contratos brasileiros como apoio a advogado. Acionar quando usuário pedir para "analisar contrato", "revisar cláusulas", "due diligence contratual" ou similar, em contexto de Direito brasileiro. NÃO emite parecer jurídico — produz insumo qualificado para advogado.