You are in AUTONOMOUS MODE. Do NOT ask questions. Scan, assess, and report compliance gaps.
TARGET:
$ARGUMENTS
If no arguments provided, perform a full GDPR/CCPA compliance assessment of the project in the current working directory.
============================================================
PHASE 0: TECH STACK DETECTION
Auto-detect the project stack to determine where data flows:
- Backend framework (Express, Django, Rails, etc.)
- Database layer (PostgreSQL, MongoDB, Firestore, etc.)
- ORM/ODM in use (Prisma, Sequelize, Mongoose, Django ORM, etc.)
- Frontend framework (React, Vue, Flutter, etc.)
- Authentication provider (Firebase Auth, Auth0, Cognito, custom)
- Analytics/tracking (Google Analytics, Mixpanel, Segment, etc.)
- Email/notification services (SendGrid, SES, Twilio, etc.)
- Payment processing (Stripe, PayPal, etc.)
- Cloud provider (AWS, GCP, Azure, etc.)
Record all detected integrations — each represents a potential data processing path.
============================================================
PHASE 1: PII FIELD IDENTIFICATION
Scan ALL data models, schemas, and database definitions for PII fields:
DIRECT IDENTIFIERS (high sensitivity):
- Full name, first name, last name
- Email address
- Phone number
- Social Security Number / National ID
- Passport number, driver's license
- Financial account numbers, credit card numbers
- Biometric data references
INDIRECT IDENTIFIERS (medium sensitivity):
- Date of birth, age
- Physical address, ZIP/postal code
- IP address
- Device identifiers (IMEI, MAC address, device ID)
- GPS/location coordinates
- Photos/avatars (may contain faces)
BEHAVIORAL DATA (lower sensitivity, still regulated):
- Purchase history, browsing history
- Search queries
- Usage patterns, session data
- Preferences, settings tied to a user
For each PII field found, record:
- File path and line number
- Field name and type
- Which data model it belongs to
- Whether it is encrypted at rest
- Whether it has a retention policy
============================================================
PHASE 2: DATA COLLECTION POINTS
Identify every point where user data enters the system:
FORMS AND UI:
- Registration/signup forms — what fields are collected
- Profile edit forms
- Contact/support forms
- Payment forms
- Any form collecting personal data
API ENDPOINTS:
- POST/PUT endpoints that accept user data
- File upload endpoints
- Webhook receivers that process user data
IMPLICIT COLLECTION:
- IP address logging in middleware/access logs
- User-agent string storage
- Geolocation tracking
- Cookie setting (what data, what purpose, what duration)
- Analytics event tracking (what user properties are sent)
- Error reporting services (what user context is attached)
For each collection point:
- What data is collected
- Is there a stated purpose for collection
- Is consent obtained before collection
- Is the data minimized (collecting only what is needed)
============================================================
PHASE 3: CONSENT MECHANISMS
Check for proper consent handling:
COOKIE CONSENT:
- Cookie banner/consent manager present
- Consent obtained before setting non-essential cookies
- Cookie categories defined (necessary, analytics, marketing)
- Consent preferences stored and respected
- Easy mechanism to withdraw consent
DATA PROCESSING CONSENT:
- Explicit opt-in for marketing communications
- Consent recorded with timestamp
- Separate consent for separate purposes (not bundled)
- Pre-checked boxes (violation if used for consent)
PRIVACY POLICY:
- Privacy policy page exists and is accessible
- Policy linked from data collection points
- Policy covers: what data, why, how long, who has access, user rights
- Policy is up to date (check for stale dates or references)
TERMS OF SERVICE:
- ToS exists and covers data processing
- ToS linked during registration
============================================================
PHASE 4: DATA SUBJECT RIGHTS
Check implementation of required data subject rights:
RIGHT TO ACCESS (Article 15 / CCPA Right to Know):
- Can users request a copy of their data?
- Is there an API endpoint or UI for data export?
- Does the export include ALL user data across all tables/collections?
- Export format: machine-readable (JSON, CSV)?
RIGHT TO ERASURE (Article 17 / CCPA Right to Delete):
- Can users request account deletion?
- Does deletion cascade to all related data?
- Does deletion reach third-party services (analytics, email lists)?
- Are backups considered (data may persist in backups)?
- Is there a soft-delete with scheduled hard-delete, or immediate?
RIGHT TO RECTIFICATION (Article 16):
- Can users edit/correct their personal data?
- Are corrections propagated to all copies of the data?
RIGHT TO PORTABILITY (Article 20):
- Can users export their data in a portable format?
- Is the format interoperable (JSON, CSV, not proprietary)?
RIGHT TO OBJECT (Article 21 / CCPA Right to Opt-Out):
- Can users opt out of data processing for marketing?
- Can users opt out of automated profiling/decision-making?
- Is there a "Do Not Sell" mechanism (CCPA requirement)?
============================================================
PHASE 5: THIRD-PARTY DATA SHARING
Identify all third-party services that receive user data:
ANALYTICS:
- Google Analytics, Mixpanel, Amplitude, Segment, etc.
- What user properties are sent
- Is consent obtained before tracking
ADVERTISING:
- Facebook Pixel, Google Ads, etc.
- What conversion data is shared
- Is there a "Do Not Sell" opt-out
INTEGRATIONS:
- Payment processors (Stripe, PayPal) — what data is shared
- Email services (SendGrid, Mailchimp) — email + name + preferences
- SMS services (Twilio) — phone numbers
- Cloud storage — what user data is stored
- Error tracking (Sentry, Bugsnag) — what user context is attached
For each third party:
- What data is shared
- Is there a Data Processing Agreement (DPA) in place
- Is the data transfer compliant (EU→US: adequate safeguards?)
- Is the sharing disclosed in the privacy policy
============================================================
PHASE 6: DATA RETENTION
Check data retention practices:
- Are retention periods defined for each data category?
- Is there automated data expiry/cleanup?
- Are inactive accounts purged after a defined period?
- Are logs rotated and expired?
- Are backups expired according to retention policy?
- Is there a data retention schedule document?
Flag any data that appears to be stored indefinitely without justification.
============================================================
SELF-HEALING VALIDATION (max 2 iterations)
After producing the security analysis, validate thoroughness:
- Verify every category in the audit was actually checked (not skipped).
- Verify every finding has a specific file:line location.
- Verify severity ratings are justified by impact assessment.
- Verify no false positives by re-reading flagged code in context.
IF VALIDATION FAILS:
- Re-audit skipped categories or vague findings
- Verify or remove false positives
- Repeat up to 2 iterations
============================================================
OUTPUT
GDPR/CCPA Compliance Report
Project: [name]
Stack: [detected technologies]
Assessment Date: [date]
Compliance Summary
| Area |
Status |
Findings |
| PII Identification |
[PASS/PARTIAL/FAIL] |
N fields found |
| Consent Mechanisms |
[PASS/PARTIAL/FAIL] |
N gaps |
| Data Subject Rights |
[PASS/PARTIAL/FAIL] |
N missing |
| Third-Party Sharing |
[PASS/PARTIAL/FAIL] |
N services |
| Data Retention |
[PASS/PARTIAL/FAIL] |
N issues |
| Privacy Policy |
[PASS/PARTIAL/FAIL] |
N gaps |
PII Inventory
| Field |
Model/Table |
Encrypted |
Retention |
Purpose |
| email |
users |
No |
Indefinite |
Authentication |
Missing Data Subject Rights
| Right |
Status |
Implementation Guidance |
| Access/Export |
[Implemented/Missing] |
Build GET /api/user/export endpoint |
| Erasure/Delete |
[Implemented/Missing] |
Build DELETE /api/user with cascade |
| Rectification |
[Implemented/Missing] |
Ensure profile edit covers all PII |
| Portability |
[Implemented/Missing] |
Add JSON/CSV export option |
| Object/Opt-Out |
[Implemented/Missing] |
Add marketing preference toggle |
Third-Party Data Flows
| Service |
Data Shared |
DPA |
Consent |
Disclosed |
| Google Analytics |
IP, pages, events |
? |
No banner |
No |
Compliance Checklist
Remediation Priority
[Ordered list: Critical gaps first, then CCPA-specific, then best practices]
============================================================
NEXT STEPS
After reviewing the compliance report:
- "Implement missing data subject rights (export, delete, opt-out)."
- "Run
/encryption to ensure PII is encrypted at rest and in transit."
- "Run
/soc2 for broader compliance assessment."
- "Run
/secure for full security posture including data handling."
- "Consult legal counsel for privacy policy and DPA review."
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /gdpr — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.
============================================================
DO NOT
- Do NOT modify any code — this is an assessment skill, not an implementation skill.
- Do NOT provide legal advice — flag gaps and suggest technical implementations.
- Do NOT expose actual PII values found in the codebase — redact in output.
- Do NOT skip third-party integrations — they are the most common compliance gap.
- Do NOT assume compliance based on the presence of a privacy policy alone.
- Do NOT conflate GDPR and CCPA requirements — note which regulation each finding applies to.
- Do NOT ignore implicit data collection (logs, analytics, error tracking).
1---2name: gdpr3description: "GDPR and CCPA/CPRA privacy compliance audit for codebases. Inventories PII fields (email, phone, SSN, IP, device ID, geolocation, biometrics, behavioral data), maps data collection points (forms, APIs, cookies, analytics, error tracking), audits consent mechanisms (cookie banners, opt-in, pre-checked boxes, consent withdrawal), verifies data subject rights implementation (right to access, erasure, rectification, portability, opt-out, Do Not Sell), traces third-party data sharing (Google Analytics, Facebook Pixel, Stripe, SendGrid, Sentry), and checks data retention policies and automated purging. Use when auditing privacy compliance, building data export or deletion endpoints, reviewing cookie consent, or assessing DSAR readiness."4version: "2.0.0"5category: security6platforms:7 - CLAUDE_CODE8metadata:9 source: https://skillmd.com/skills/tinh2/gdpr10---1112You are in AUTONOMOUS MODE. Do NOT ask questions. Scan, assess, and report compliance gaps.1314TARGET:15$ARGUMENTS1617If no arguments provided, perform a full GDPR/CCPA compliance assessment of the project in the current working directory.1819============================================================20PHASE 0: TECH STACK DETECTION21============================================================2223Auto-detect the project stack to determine where data flows:2425- Backend framework (Express, Django, Rails, etc.)26- Database layer (PostgreSQL, MongoDB, Firestore, etc.)27- ORM/ODM in use (Prisma, Sequelize, Mongoose, Django ORM, etc.)28- Frontend framework (React, Vue, Flutter, etc.)29- Authentication provider (Firebase Auth, Auth0, Cognito, custom)30- Analytics/tracking (Google Analytics, Mixpanel, Segment, etc.)31- Email/notification services (SendGrid, SES, Twilio, etc.)32- Payment processing (Stripe, PayPal, etc.)33- Cloud provider (AWS, GCP, Azure, etc.)3435Record all detected integrations — each represents a potential data processing path.3637============================================================38PHASE 1: PII FIELD IDENTIFICATION39============================================================4041Scan ALL data models, schemas, and database definitions for PII fields:4243DIRECT IDENTIFIERS (high sensitivity):44- Full name, first name, last name45- Email address46- Phone number47- Social Security Number / National ID48- Passport number, driver's license49- Financial account numbers, credit card numbers50- Biometric data references5152INDIRECT IDENTIFIERS (medium sensitivity):53- Date of birth, age54- Physical address, ZIP/postal code55- IP address56- Device identifiers (IMEI, MAC address, device ID)57- GPS/location coordinates58- Photos/avatars (may contain faces)5960BEHAVIORAL DATA (lower sensitivity, still regulated):61- Purchase history, browsing history62- Search queries63- Usage patterns, session data64- Preferences, settings tied to a user6566For each PII field found, record:67- File path and line number68- Field name and type69- Which data model it belongs to70- Whether it is encrypted at rest71- Whether it has a retention policy7273============================================================74PHASE 2: DATA COLLECTION POINTS75============================================================7677Identify every point where user data enters the system:7879FORMS AND UI:80- Registration/signup forms — what fields are collected81- Profile edit forms82- Contact/support forms83- Payment forms84- Any form collecting personal data8586API ENDPOINTS:87- POST/PUT endpoints that accept user data88- File upload endpoints89- Webhook receivers that process user data9091IMPLICIT COLLECTION:92- IP address logging in middleware/access logs93- User-agent string storage94- Geolocation tracking95- Cookie setting (what data, what purpose, what duration)96- Analytics event tracking (what user properties are sent)97- Error reporting services (what user context is attached)9899For each collection point:100- What data is collected101- Is there a stated purpose for collection102- Is consent obtained before collection103- Is the data minimized (collecting only what is needed)104105============================================================106PHASE 3: CONSENT MECHANISMS107============================================================108109Check for proper consent handling:110111COOKIE CONSENT:112- Cookie banner/consent manager present113- Consent obtained before setting non-essential cookies114- Cookie categories defined (necessary, analytics, marketing)115- Consent preferences stored and respected116- Easy mechanism to withdraw consent117118DATA PROCESSING CONSENT:119- Explicit opt-in for marketing communications120- Consent recorded with timestamp121- Separate consent for separate purposes (not bundled)122- Pre-checked boxes (violation if used for consent)123124PRIVACY POLICY:125- Privacy policy page exists and is accessible126- Policy linked from data collection points127- Policy covers: what data, why, how long, who has access, user rights128- Policy is up to date (check for stale dates or references)129130TERMS OF SERVICE:131- ToS exists and covers data processing132- ToS linked during registration133134============================================================135PHASE 4: DATA SUBJECT RIGHTS136============================================================137138Check implementation of required data subject rights:139140RIGHT TO ACCESS (Article 15 / CCPA Right to Know):141- Can users request a copy of their data?142- Is there an API endpoint or UI for data export?143- Does the export include ALL user data across all tables/collections?144- Export format: machine-readable (JSON, CSV)?145146RIGHT TO ERASURE (Article 17 / CCPA Right to Delete):147- Can users request account deletion?148- Does deletion cascade to all related data?149- Does deletion reach third-party services (analytics, email lists)?150- Are backups considered (data may persist in backups)?151- Is there a soft-delete with scheduled hard-delete, or immediate?152153RIGHT TO RECTIFICATION (Article 16):154- Can users edit/correct their personal data?155- Are corrections propagated to all copies of the data?156157RIGHT TO PORTABILITY (Article 20):158- Can users export their data in a portable format?159- Is the format interoperable (JSON, CSV, not proprietary)?160161RIGHT TO OBJECT (Article 21 / CCPA Right to Opt-Out):162- Can users opt out of data processing for marketing?163- Can users opt out of automated profiling/decision-making?164- Is there a "Do Not Sell" mechanism (CCPA requirement)?165166============================================================167PHASE 5: THIRD-PARTY DATA SHARING168============================================================169170Identify all third-party services that receive user data:171172ANALYTICS:173- Google Analytics, Mixpanel, Amplitude, Segment, etc.174- What user properties are sent175- Is consent obtained before tracking176177ADVERTISING:178- Facebook Pixel, Google Ads, etc.179- What conversion data is shared180- Is there a "Do Not Sell" opt-out181182INTEGRATIONS:183- Payment processors (Stripe, PayPal) — what data is shared184- Email services (SendGrid, Mailchimp) — email + name + preferences185- SMS services (Twilio) — phone numbers186- Cloud storage — what user data is stored187- Error tracking (Sentry, Bugsnag) — what user context is attached188189For each third party:190- What data is shared191- Is there a Data Processing Agreement (DPA) in place192- Is the data transfer compliant (EU→US: adequate safeguards?)193- Is the sharing disclosed in the privacy policy194195============================================================196PHASE 6: DATA RETENTION197============================================================198199Check data retention practices:200201- Are retention periods defined for each data category?202- Is there automated data expiry/cleanup?203- Are inactive accounts purged after a defined period?204- Are logs rotated and expired?205- Are backups expired according to retention policy?206- Is there a data retention schedule document?207208Flag any data that appears to be stored indefinitely without justification.209210211============================================================212SELF-HEALING VALIDATION (max 2 iterations)213============================================================214215After producing the security analysis, validate thoroughness:2162171. Verify every category in the audit was actually checked (not skipped).2182. Verify every finding has a specific file:line location.2193. Verify severity ratings are justified by impact assessment.2204. Verify no false positives by re-reading flagged code in context.221222IF VALIDATION FAILS:223- Re-audit skipped categories or vague findings224- Verify or remove false positives225- Repeat up to 2 iterations226227============================================================228OUTPUT229============================================================230231## GDPR/CCPA Compliance Report232233**Project:** [name]234**Stack:** [detected technologies]235**Assessment Date:** [date]236237### Compliance Summary238239| Area | Status | Findings |240|------|--------|----------|241| PII Identification | [PASS/PARTIAL/FAIL] | N fields found |242| Consent Mechanisms | [PASS/PARTIAL/FAIL] | N gaps |243| Data Subject Rights | [PASS/PARTIAL/FAIL] | N missing |244| Third-Party Sharing | [PASS/PARTIAL/FAIL] | N services |245| Data Retention | [PASS/PARTIAL/FAIL] | N issues |246| Privacy Policy | [PASS/PARTIAL/FAIL] | N gaps |247248### PII Inventory249250| Field | Model/Table | Encrypted | Retention | Purpose |251|-------|-------------|-----------|-----------|---------|252| email | users | No | Indefinite | Authentication |253254### Missing Data Subject Rights255256| Right | Status | Implementation Guidance |257|-------|--------|------------------------|258| Access/Export | [Implemented/Missing] | Build GET /api/user/export endpoint |259| Erasure/Delete | [Implemented/Missing] | Build DELETE /api/user with cascade |260| Rectification | [Implemented/Missing] | Ensure profile edit covers all PII |261| Portability | [Implemented/Missing] | Add JSON/CSV export option |262| Object/Opt-Out | [Implemented/Missing] | Add marketing preference toggle |263264### Third-Party Data Flows265266| Service | Data Shared | DPA | Consent | Disclosed |267|---------|------------|-----|---------|-----------|268| Google Analytics | IP, pages, events | ? | No banner | No |269270### Compliance Checklist271272- [ ] All PII fields identified and documented273- [ ] Cookie consent banner with opt-in274- [ ] Privacy policy covers all data processing275- [ ] Data export endpoint (right to access)276- [ ] Account deletion with cascade (right to erasure)277- [ ] Marketing opt-out mechanism278- [ ] Data retention policies defined and automated279- [ ] DPAs in place with all third-party processors280- [ ] Data breach notification process documented281- [ ] Data Protection Impact Assessment completed (if high-risk processing)282283### Remediation Priority284[Ordered list: Critical gaps first, then CCPA-specific, then best practices]285286============================================================287NEXT STEPS288============================================================289290After reviewing the compliance report:291- "Implement missing data subject rights (export, delete, opt-out)."292- "Run `/encryption` to ensure PII is encrypted at rest and in transit."293- "Run `/soc2` for broader compliance assessment."294- "Run `/secure` for full security posture including data handling."295- "Consult legal counsel for privacy policy and DPA review."296297298============================================================299SELF-EVOLUTION TELEMETRY300============================================================301302After producing output, record execution metadata for the /evolve pipeline.303304Check if a project memory directory exists:305- Look for the project path in `~/.claude/projects/`306- If found, append to `skill-telemetry.md` in that memory directory307308Entry format:309```310### /gdpr — {{YYYY-MM-DD}}311- Outcome: {{SUCCESS | PARTIAL | FAILED}}312- Self-healed: {{yes — what was healed | no}}313- Iterations used: {{N}} / {{N max}}314- Bottleneck: {{phase that struggled or "none"}}315- Suggestion: {{one-line improvement idea for /evolve, or "none"}}316```317318Only log if the memory directory exists. Skip silently if not found.319Keep entries concise — /evolve will parse these for skill improvement signals.320321============================================================322DO NOT323============================================================324325- Do NOT modify any code — this is an assessment skill, not an implementation skill.326- Do NOT provide legal advice — flag gaps and suggest technical implementations.327- Do NOT expose actual PII values found in the codebase — redact in output.328- Do NOT skip third-party integrations — they are the most common compliance gap.329- Do NOT assume compliance based on the presence of a privacy policy alone.330- Do NOT conflate GDPR and CCPA requirements — note which regulation each finding applies to.331- Do NOT ignore implicit data collection (logs, analytics, error tracking).