Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

gdpr-test-patterns

БесплатноБез исполняемых скриптовНе проверен

Use when a product processing EU or California personal data needs GDPR or CCPA/CPRA readiness tests: data subject access, erasure, portability and objection…

testlandот testland★ 18 звёзд на GitHub

Об этом скилле

gdpr-test-patterns

Overview

Per gdpr.eu (community-maintained reference; canonical text at eur-lex.europa.eu Regulation 2016/679):

GDPR (General Data Protection Regulation, in force 2018-05-25) applies to any processing of EU personal data regardless of the processor's location. Failure to demonstrate compliance carries fines up to €20M or 4% of global annual turnover (whichever higher).

This is a reference skill - defines the test-pattern catalog by Article. Tests use the team's existing test framework; this skill is the per-Article test recipe.

For products also processing California consumer data, the CCPA/CPRA catalog by Cal. Civ. Code section - GPC opt-out (§1798.135), right-to-know, deletion, right-to-correct, sensitive-PI limits - is in references/ccpa.md.

When to use

  • Product processes EU personal data (regardless of processor location).
  • Regulatory audit requires evidence of test coverage for data-subject rights.
  • New feature touches PII handling (signup, profile, billing, analytics, third-party sharing).
  • DPIA (Data Protection Impact Assessment) requires test evidence.

How to use

  1. Inventory every system that stores PII for a data subject (app DB, billing, analytics, CRM, support, backups) - this list drives the multi-system assertions.
  2. Pick the Articles in scope for the feature under test (consent, access, erasure, portability, breach, residency, minimization).
  3. Copy the matching per-Article pattern below and point it at your framework's client + models.
  4. Generate fixture data with synthetic-pii-generator - never real customer PII.
  5. Assert across ALL systems from step 1, not just the main store; add the deadline assertions (SAR 1 month per Art. 12(3), breach 72 hours per Art. 33) where the Article sets one.
  6. Pin every timeline assertion to your written policy doc, not a hardcoded 30-day guess.
  7. Wire the tests into CI so a schema change that reintroduces PII or skips a system fails the build.

Test patterns by GDPR Article

Art. 7 - Conditions for consent

def test_consent_recorded_at_collection_time():
    response = client.post('/signup', json={
        'email': '[email protected]',
        'consent_marketing': True,
        'consent_timestamp': '2026-05-06T12:00:00Z',
    })
    user = User.objects.get(email='[email protected]')
    consent = ConsentRecord.objects.get(user=user, scope='marketing')
    assert consent.granted is True
    assert consent.granted_at is not None
    assert consent.granted_via == 'signup-form'   # auditable evidence

def test_consent_revocable():
    revoke_consent(user, scope='marketing')
    consent = ConsentRecord.objects.get(user=user, scope='marketing')
    assert consent.granted is False
    assert consent.revoked_at is not None
    # Subsequent marketing emails must not be sent:
    assert not user.is_eligible_for(EmailType.MARKETING)

Art. 15 - Right of access

def test_subject_access_request_returns_all_personal_data():
    response = authenticated_client.post('/sar', json={'subject_email': '[email protected]'})
    assert response.status_code == 200
    data = response.json()
    # Must include data from EVERY system that holds PII for this subject:
    assert 'profile' in data
    assert 'billing' in data
    assert 'support_tickets' in data
    assert 'analytics' in data       # often forgotten; tests catch it
    assert 'third_party_sharing' in data
    # Response must arrive within 1 month per Art. 12(3):
    assert response.headers['X-Processing-Time'] < timedelta(days=30)

Art. 17 - Right to erasure ("right to be forgotten")

def test_erasure_removes_all_personal_data():
    erase_subject('[email protected]')

    # Across ALL systems:
    assert User.objects.filter(email='[email protected]').count() == 0
    assert BillingRecord.objects.filter(user_email='[email protected]').count() == 0
    assert AnalyticsEvent.objects.filter(user_email='[email protected]').count() == 0
    # Backup retention: erasure marker recorded; backup expires within retention window
    assert ErasureMarker.objects.filter(subject='[email protected]').exists()

Art. 20 - Right to data portability

def test_data_portability_export_machine_readable():
    response = client.post('/data-export', json={'subject': '[email protected]'})
    export = response.json()
    # Must be in "structured, commonly used and machine-readable format"
    assert response.headers['Content-Type'] in ['application/json', 'text/csv', 'application/xml']
    # Format must be self-describing (keys not random IDs):
    assert 'profile' in export
    assert 'orders' in export

Art. 33 - Breach notification (72-hour test)

def test_breach_notification_workflow_within_72h():
    # Simulate a breach detection event
    breach = BreachIncident.create(detected_at=timezone.now())
    # Workflow MUST notify supervisory autho
Полный SKILL.md на GitHub

Установить gdpr-test-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.tessl-plugin/plugin.jsonevals/audit-finding-says-unsubscribe-is-unevidenced/criteria.jsonevals/audit-finding-says-unsubscribe-is-unevidenced/task.mdevals/dashboard-flags-requests-the-dpo-says-were-fine/criteria.jsonevals/dashboard-flags-requests-the-dpo-says-were-fine/task.mdevals/erasure-ticket-closed-but-the-rows-are-still-there/criteria.jsonevals/erasure-ticket-closed-but-the-rows-are-still-there/task.mdevals/researcher-says-we-shared-her-data-anyway/criteria.jsonevals/researcher-says-we-shared-her-data-anyway/task.mdevals/signup-payload-grew-twice-this-quarter/criteria.jsonevals/signup-payload-grew-twice-this-quarter/task.mdreferences/ccpa.md

FAQ

Что делает скилл gdpr-test-patterns?

Use when a product processing EU or California personal data needs GDPR or CCPA/CPRA readiness tests: data subject access, erasure, portability and objection, consent and withdrawal, data residency, 72-hour breach notice, data minimization, and CCPA rights including Global Privacy Control.

Как установить скилл gdpr-test-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gdpr-test-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить gdpr-test-patterns с