/quality-gates:personal-datafrom quality-gates
Guides handling of personal data in code: collection, storage, processing, deletion, and compliance with privacy laws (GDPR, CCPA, etc.). Use when adding or reviewing any code that touches user information.
Ships in quality-gates. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Four questions for every piece of data about a person: what we keep and why, how it is processed and who gets it, when it is deleted, and which country's rules apply. When writing code, follow the rules. When reviewing, run Review.
This skill flags legal questions; it does not answer them. When a rule depends on law, contract or the product's privacy policy, say so in one line and ask the user. Do not choose silently on what is collected, how long it is kept, or where it is stored.
Related: security-code-audit covers secrets and logging hygiene; login-and-access covers who may see each row.
•••• 4242). Backups and replicas get the same protection as the main store.deleted_at row must be purged or anonymised after a stated grace window (for example 30 days).Build the paths the product promises, and check deadlines with the user:
Find out where users live and where data is stored before choosing storage, vendors or retention. The broad shape:
| Where | Law | What changes for code |
|---|---|---|
| EU, EEA | GDPR | Lawful basis per purpose; consent before non-essential cookies; data subject rights; transfers out need adequacy or standard contractual clauses; breach report to the regulator within 72 hours. |
| UK | UK GDPR, PECR | Much like GDPR, with its own transfer rules and cookie consent. |
| California and other US states | CCPA/CPRA and state laws | Notice at collection; "Do not sell or share" link; honour Global Privacy Control; rights to know, delete, correct. |
| US, health | HIPAA | Patient data from covered entities needs a business associate agreement and audit logs. |
| US, children under 13 | COPPA | Verifiable parental consent before collecting. EU ages range 13 to 16 by country. |
| Canada | PIPEDA, Quebec Law 25 | Consent and purpose; Quebec adds impact assessments for transfers out. |
| Brazil | LGPD | Close to GDPR: legal basis, rights, a named data officer. |
| India | DPDP Act 2023 | Notice and consent, parental consent under 18, deletion when the purpose ends. |
| China | PIPL | Separate consent for sensitive data and transfers; some data must stay in China. |
| Others | Japan APPI, Australia Privacy Act, Singapore PDPA, and more | Ask the user which apply. |
Use the repo's test setup:
Scope. The diff (git diff plus staged) or the files named, plus the schema, migrations, analytics setup and third-party clients they touch.
Data map of the change. For each new or changed field, fill one row:
| Field | Class | Purpose | Stored in | Sent to | Retention | Deleted by |
|---|---|---|---|---|---|---|
users.phone | personal | 2FA codes | Postgres users | Twilio | until account deletion | deleteAccount() |
Trace flows. Follow each personal field to every sink: logs, analytics, error tracker, third-party call, AI prompt, export, cache, search index.
Check each rule above. Read the code at every line you cite.
Report.
## Verdict: PASS | FIX BEFORE MERGE | BLOCK
<data map>
### Findings
<file>:<line> [SEVERITY] <problem>
Data: <field and class> -> <where it goes wrong>
Fix: <the change, at most 10 lines>
### Questions for the user (legal, policy, retention numbers)
### Not checked
Severity: Critical sensitive data exposed or sent to an unapproved third party; High personal data in logs, analytics or URLs, or deletion that leaves data behind; Medium missing retention job, consent record or export field; Low a coarser field or a doc entry would do.
.env or dumps to "check" what is stored; read the schema and code.Key decisions in this skill: collecting a new sensitive field, a new third party or AI provider receiving personal data, a retention period, a cross-border transfer or region choice, and a BLOCK verdict.
Before acting on one, get a second opinion: call the Agent tool with model: "opus" (subagent_type Plan, read-only). Give it the decision, each option in one line, the evidence (file:line, measurements, the diff) and the constraints. Ask for a pick, the main risk of that pick, and what would change its mind. Do not send secrets, .env contents or real personal data.
Advisor: <decision> -> <pick> (<agreed | overruled because ...>).Spend the strong models on judgment and the cheap ones on volume. When this skill spawns subagents with the Agent tool, set model by role:
| Role | Model | Use for |
|---|---|---|
| Think | fable (Fable 5.2), or opus when limits are tight | Plan, decompose, pick an approach. One call, read-only (subagent_type: "Plan"). |
| Execute | sonnet (Sonnet 5.5) | Write and edit code, run checks, produce the deliverable. |
| Review | opus (Opus 5.5) | Check the finished work before reporting: correctness, security, money, data loss. |
| Swarm | haiku (Haiku 5.5) | Many small parallel jobs: search, read, extract, classify, per-file scans. |
mcp__ccd_session_mgmt__get_usage (load it with ToolSearch if deferred). Use fable only when every window has room: 5-hour limit under 70% used, "Weekly · all models" under 80%, and "Weekly · Fable" (if listed) under 80%. Otherwise use opus. If the tool is missing, or its status is unavailable or not_applicable (API key, Bedrock, Vertex), use opus. Say the pick in one line: Think: <model> (5h <n>%, weekly <n>%, Fable <n>%).Lessons from earlier runs live in two files: ~/.claude/skill-lessons/personal-data.md (any repo) and .claude/skill-lessons/personal-data.md at the repo root (this repo only).
- <YYYY-MM-DD>: <do or avoid X> because <Y>. (seen: 1). When a line already says the same thing, raise its seen count and date instead of adding one. Facts about this repo go in the repo file, everything else in the user file. Keep each file under 30 lines by merging or dropping stale lessons.seen: 3: if the ashish-claude-skills source repo is open, propose the edit to plugins/quality-gates/skills/personal-data/SKILL.md as a diff and wait for a yes, then delete the lesson once it lands; otherwise say Lesson ready to promote: <line> in the report.Learned: <the line written | nothing>.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ashishyd/ashish-claude-skills --plugin quality-gates10 skills in this plugin
/claude-md-syncUse after changing business logic, domain rules, data models, APIs, architecture, commands, config or dependencies, before calling the work done, to keep CLAUDE.md true to the code. Also when the user says "update CLAUDE.md", "sync the docs" or "is CLAUDE.md still right"./design-auditUse when a UI component, page or stylesheet has just been built or changed and its visual quality needs checking, when the user asks whether a screen looks right, consistent or polished, or before shipping front-end work./login-and-accessUse when writing, changing or reviewing sign-in, sign-up, logout, password reset, magic links, OAuth or SSO, MFA, sessions, cookies, JWTs, refresh tokens, roles, permissions, admin areas, multi-tenant data or any route that must know who the caller is and what they may see./playwright-testsUse when writing, generating or fixing Playwright end-to-end tests, covering a user journey in a real browser, choosing locators, handling login state or test data, or when an e2e test is flaky, slow or times out./security-code-auditUse when writing, changing or reviewing code that handles user input, forms, auth, passwords, sessions, tokens, API keys, secrets, env vars, permissions, database queries, file uploads, webhooks, payments or a new API route, or when the user asks for a security review of a diff, a file or a feature./threat-modelUse when planning or designing a feature, service or integration that adds a new entry point, before a launch or a major release, when changing deploy, infrastructure, CI/CD, hosting or network config, when asked where an attacker could break in, for a threat model, attack surface review, launch security checklist, penetration test plan or scope, or when setting up security scanning.Other plugins' skills for the same job