Agent skill · security · jeremylongshore
sentry-data-handling
Configure GDPR-compliant data handling, PII scrubbing, and data
Why this skill is useful
Provides specific implementation patterns for GDPR-compliant data handling in Sentry that the AI wouldn't reliably generate on its own.
What it needs
Requires @sentry/node installed locally. Requires sentry account access. About 8k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Sentry Data Handling Configure PII scrubbing, GDPR compliance, data retention, and audit controls for Sentry. This skill covers client-side filtering with beforeSend, server-side scrubbing rules, data subject erasure via API, and SOC 2 compliance patterns. Overview Sentry captures error context that often contains personally identifiable information (PII) — emails in stack traces, credit card numbers in request bodies, IP addresses in headers. Production deployments must scrub this data at two layers: client-side via beforeSend hooks (before data leaves the application) and server-side via Sentry's built-in Data Scrubber (defense in depth). GDPR requires additional controls: consent-based initialization, data subject deletion endpoints, and a signed Data Processing Agreement. This skill implements all three layers with TypeScript and Python examples, plus verification tests to prove scrubbing works end-to-end. Prerequisites Sentry SDK v8 installed and initialized (@sentry/node or sentry-sdk) Sentry project with Admin or Owner role (required for Security & Privacy settings) Compliance requirements documented (GDPR, HIPAA, PCI-DSS, or SOC 2) Auth token with project:write and org:admin scopes for API operations Data Processing Agreement signed at https://sentry.io/legal/dpa/ (GDPR requirement) Instructions Step 1 — Client-Side PII Scrubbing with beforeSend The first defense layer prevents PII from leaving your application. Configure beforeSend, beforeSendTransaction, and beforeBreadcrumb hooks during SDK initialization: Implement the scrubEvent function to strip PII from headers, request bodies, error messages, and user context: Python equivalent — use the same beforesend pattern: Step 2 — Server-Side Data Scrubbing and IP Anonymization Server-side scrubbing acts as defense in depth. Configure in Project Settings > Security & Privacy: 1. Enable Data Scrubber — automatically redacts values matching common PII field names (password, token, secret) 2. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/sentry-data-handling