Skip to content
Back to skills

Privacy By Default

ASecurity

In an aidd repository, use when code touches personal data, PII, user records, consent, data-subject rights, GDPR, or retention.

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 6, 2026
ai-agentsgoawsapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add thaithienvanid/aidd --skill privacy-by-default --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Privacy By Default?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Privacy By Default
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thaithienvanid-privacy-by-default/badge)](https://www.skillsdirectory.com/skills/thaithienvanid-privacy-by-default)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: privacy-by-default
description: "In an aidd repository, use when code touches personal data, PII, user records, consent, data-subject rights, GDPR, or retention."
---

<!-- generated by `aidd gen-docs` from schemas/packs.json; edit the registry, not this file -->

# Privacy by default

## Scope

Applies when the change touches personal data: user, customer, account, member, patient, or contact records, consent, data-subject requests, or a `gdpr` target in `project.compliance.targets`. Not when the change touches no field, store, log, or call that holds personal data. Neighbours: `aidd-domains:data-and-analytics`, `aidd-team:threat-model`, `aidd-team:incident-response`.

## Standards

| # | Standard | Edition | Checked | Source |
| --- | --- | --- | --- | --- |
| S1 | GDPR, by the article each row names | Regulation (EU) 2016/679 | 2026-11-10 | <https://eur-lex.europa.eu/eli/reg/2016/679/oj> |
| S2 | CCPA/CPRA, the comparable US regime: notice at collection, and the rights to know, delete, correct, and opt out | CCPA regulations effective 2026-01-01 | 2026-10-22 | <https://cppa.ca.gov/regulations/> |
| S3 | Data subject request fulfillment built into the pipeline (export and erase by subject key), under GDPR and CCPA/CPRA as amended | Regulation (EU) 2016/679 | 2026-10-16 | <https://eur-lex.europa.eu/eli/reg/2016/679/oj> |
| S4 | DPIA method and template: the EDPB DPIA Template, which national authorities will adopt as their unique or meta-template | EDPB DPIA Template (consultation draft) | 2026-10-16 | <https://www.edpb.europa.eu/public-consultations/template-for-data-protection-impact-assessment_en> |
| S5 | Cross-border transfers: the mechanism, a transfer impact assessment, and the current adequacy map | Implementing Decision (EU) 2021/914 | 2026-10-16 | <https://commission.europa.eu/law/law-topic/data-protection/international-dimension-data-protection/adequacy-decisions_en> |
| S6 | Automated PII discovery and classification in tables, columns, and free text, with the classification driving retention, masking, and access rules | — | 2026-10-16 | <https://presidio.dataprivacystack.org/> |
| S7 | LINDDUN over the threat model's data-flow diagram, for the risks to people | — | 2026-10-16 | <https://linddun.org/> |
| S8 | ePrivacy Directive Art. 5(3): consent before storing or reading on a user's device | Directive 2002/58/EC, Art. 5(3); EDPB Guidelines 2/2023 v2.0 | 2026-10-16 | <https://www.edpb.europa.eu/documents/guideline/guidelines-22023-on-technical-scope-of-art-53-of-eprivacy-directive_en> |
| S9 | UK GDPR and the Data Protection Act 2018, as amended by the Data (Use and Access) Act 2025 | Data (Use and Access) Act 2025 | 2026-10-22 | <https://www.gov.uk/guidance/data-use-and-access-act-2025-plans-for-commencement> |

## Checklist by loop step

| Step | Item | Standard |
| --- | --- | --- |
| Before the first edit (`aidd risk --paths`) | Personal data in the diff (the `personal_data` area, or an added auth library), or `gdpr` in `project.compliance.targets`: major, a privacy reviewer, and the compliance analyst starts. | S1 |
| Before the first edit (`aidd risk --paths`) | The Spec names every privacy regime the product serves, such as the UK GDPR as amended in 2025, US state laws, Brazil's LGPD, and India's DPDP Act. Build each right once, and map it to each regime. | S1, S9, S2 |
| Plan | An Intent that collects a new category of personal data funds the data map, the rights endpoints, and the DPIA as work, not as Review-time fixes (Art. 25). | S1 |
| Specify | Each new or changed item gets its row in the one data map (`aidd new data-map`), whose columns are the records of processing (Art. 30). Classify every field as public, internal, personal, or special category, and collect only what the purpose needs (Art. 5(1)(c)). A DPIA trigger (Art. 35) means the DPIA is written before Spec approval. | S1, S4, S6 |
| Specify | Acceptance names each data-subject right the change touches. Each is answered within one month (Art. 12(3)), or 45 days under the CCPA. The rights are access and export (Art. 15), rectification (Art. 16), erasure (Art. 17), restriction (Art. 18), portability (Art. 20), and objection (Art. 21); CCPA/CPRA adds know, delete, correct, and opt out. Endpoints and tests: `references/rights-and-records.md`. | S1, S2, S3 |
| Specify | Where consent is the lawful basis, it is specific, recorded with its version and time, and as easy to withdraw as to give (Art. 7). Storing or reading on a device needs consent unless strictly necessary (ePrivacy Art. 5(3)). Every purpose has a lawful basis (Art. 6), and the notice (Art. 13 and 14) changes with the data map. | S1, S8 |
| Specify | A new processor gets its Art. 28 contract and a row in the data map's register. Data leaving the EEA names its mechanism (adequacy, SCCs, or BCRs, Art. 44-49) and its transfer impact assessment. | S1, S5 |
| Implement | The retention schedule runs as code: each data-map row's retention is a scheduled deletion job (hard delete, anonymisation, or crypto-shredding). Backups expire within the stated period or are crypto-shredded. | S1, S3 |
| Implement | Private by default (Art. 25(2)): optional processing off until chosen. No personal data in logs, URLs, analytics events, error reports, fixtures, seeds, snapshots, or a lower environment. Pseudonymise where the purpose allows. | S1 |
| Review | Trace each new field, store, log line, and outbound call to its data-map row. A store missing from the map, a purpose without a lawful basis, or personal data in a log is a finding. The LINDDUN pass names the linking, identifying, and disclosure threats and their controls (Art. 32). | S1, S7 |
| Roll out | The breach runbook names who assesses a personal-data breach and starts the clocks (Art. 33 and 34) that `aidd-team:incident-response` lists. Rights-request volumes and deletion-job failures are observe signals. | S1 |

## Test commands

| Command | Proves | How | Standard |
| --- | --- | --- | --- |
| Erase request test | an erasure request removes the subject from every store the data map lists. The backup policy expires or crypto-shreds the rest within the stated period | an integration test that seeds one subject in every mapped store, calls the erase endpoint, and asserts each store returns nothing for them. The test asserts the backup expiry from the backup config | S1, S3 |
| Export completeness test | an access or portability export returns every field the data map lists for the subject, in a structured, machine-readable format | an API test that seeds a subject with every mapped field and compares the export's fields with the data map's rows | S1, S2 |
| Rectify and restrict test | a corrected field changes in every store, and a restricted or objecting subject's data is kept but no longer processed | API tests over the rectify, restrict, and object endpoints, asserting the downstream jobs skip that subject | S1 |
| Consent gate test | nothing optional is collected or shared before consent, and withdrawing consent stops it | end-to-end tests with consent refused, given, and withdrawn, asserting the stored fields and the outbound calls | S1 |
| Retention job test | records past their retention are deleted or anonymised by the scheduled job | a unit test over the deletion job with a fixed clock | S1 |
| Data map check (emerging) | every data-map row names a purpose, a lawful basis, a retention, and a deletion method, and every column the classifier marks personal has a row | a schema check over the data map in CI, joined with an automated PII scan of the database schema | S6 |
| Masked test data check | no fixture, seed, or snapshot holds production personal data | a PII scan (`presidio-analyzer` 2.2.364) over the test fixtures and seeds in CI | S6 |

## Owned elsewhere

- Breach notification clocks by regime: `aidd-team:incident-response`.

## References

- [references/rights-and-records.md](references/rights-and-records.md): each data-subject right as an endpoint with its test, the data map's columns, and the processor register.

## Keep it current

Each entry is due after its `review_every_days` (else emerging 90 days, established 365) or by its `review_due`. An emerging one applies only when the change needs it, said in the Spec. One `aidd eval standards` lists as due is looked up in Specify, and a missing one is proposed to aidd's `schemas/industry-standards.json`.

Files in this skill

  • SKILL.md8.2 KB
  • references/rights-and-records.md5.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.