Implement Privacy by Design Principles
Applies GDPR Article 25 Privacy by Design to schemas, APIs, and user flows - minimization, consent, retention, PII logging.
Why it matters
Ensure your software architecture integrates privacy protections from the outset, adhering to legal frameworks like GDPR and CCPA. This skill helps build trust by safeguarding user data throughout the design and development lifecycle.
Outcomes
What it gets done
Design databases, APIs, and user flows with privacy as a core consideration.
Implement data minimization, purpose limitation, and storage limitation principles.
Ensure user rights (access, rectification, erasure, portability) are technically feasible.
Audit third-party dependencies for data handling practices.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-privacy-by-design | bash Overview
Privacy by Design
A skill that applies GDPR-aligned Privacy by Design principles to database schemas, APIs, and user flows, covering data minimization, consent, retention, and PII-safe logging. Use it when designing or reviewing any system that collects, stores, or processes personal data; it is a design checklist, not a substitute for legal/compliance review.
What it does
This skill integrates privacy protections into software architecture from the beginning rather than as an afterthought, applying Privacy by Design principles (GDPR Article 25, Cavoukian's framework) when designing databases, APIs, and user flows. It covers six core principles - data minimization (collect only what's justified), purpose limitation (store and respect the stated purpose of each data point), storage limitation (define retention periods with automated deletion), privacy as default (opt-in not opt-out, no pre-checked consent boxes), end-to-end security (encryption, RBAC, access logging), and transparency (clear privacy policies, easy access/deletion) - and maps GDPR user rights (access, rectification, erasure, portability) to concrete implementation patterns. It provides code examples for minimal user models, consent-gated analytics tracking, PII-safe logging, retention-documented SQL schemas, and allowlisted API responses.
When to use - and when NOT to
Use it when building apps that collect personal data (names, emails, locations, preferences), when designing database schemas, APIs, or authentication flows, when a user mentions forms, user accounts, analytics, or third-party integrations, or when verifying privacy controls before a production deployment. It references GDPR (EU, primary reference), CCPA (California), and LGPD (Brazil) - the guidance is to design for the strictest framework you target, since that often satisfies the others.
Do not log passwords, tokens, or PII in plain text - use redaction or hashed identifiers instead. Do not share data with third parties without explicit consent, and audit every dependency that touches user data before adding it (what it collects, where it sends data, whether it loads before consent). Do not assume "we'll add privacy later" - the skill's premise is that this rarely happens and privacy must be designed in from day one. Treat its output as a design checklist to apply with judgment, not a substitute for environment-specific legal or compliance review.
Inputs and outputs
Input: a description of the feature, schema, or flow that touches user data. Output: privacy-by-design guidance with a data-necessity checklist and code-level fixes.
### BAD: Logging PII in plain text
logger.info(f"User {user.email} logged in from {request.remote_addr}")
### GOOD: Redact or hash identifiers
logger.info(f"User {hash_user_id(user.id)} logged in")
Integrations
Applies directly to database schema design (documenting purpose and retention per column), API response shaping (explicit field allowlists), authentication/consent flows, structured logging, and third-party SDK/dependency audits (analytics, crash reporting, ads).
Who it's for
Developers and architects designing or reviewing systems that collect personal data, who need concrete GDPR/CCPA/LGPD-aligned patterns for minimization, consent, retention, and PII-safe logging built in from the start rather than retrofitted before launch.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.