Pii handling
Plug-and-play skills and prompts for every AI coding agent
npx -y skills add Amey-Thakur/AI-SKILLS --skill pii-handlingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Minimize, classify, mask, and expire personal data so any leak or legal request reaches as little of it as possible. Use when designing storage, logging, or analytics that touch names, contacts, identifiers, or other personal data.
SKILL.md
2.9 KB, as published. Nobody here has run it
PII handling
Personal data is a liability that compounds. Every field you keep is something you can leak, something a subpoena can reach, and an obligation you carry until you delete it. The discipline is to collect less, guard what stays, and purge on a clock instead of hoarding by default.
Method
- Classify each field before it lands. Tag every column public, internal, PII, or sensitive PII (health, biometric, financial, government id). Keep the map in code or a data catalog so masking and retention rules key off the tag, not off a person remembering which column held a birth date.
- Minimize at the point of collection. Store what you use and nothing else: the last four digits of a card, not the full number; an age band, not a date of birth; a coarse region, not raw coordinates. A field you never collected is a field that cannot leak.
- Mask on the way out. Redact in logs and errors (
a***@x.com), tokenize card numbers, and back reads with database views that expose masked columns by default, so a straySELECT *does not spill raw values into a dump. - Pseudonymize before data reaches analytics. Swap direct identifiers for a per-subject token in the warehouse and in non-production copies, and keep the re-identification key in a separate, tightly scoped vault. Analysts get the shape of the data without the people in it.
- Set retention per class and enforce it in a job. Give each dataset a TTL (support tickets two years, auth logs 90 days) and run a scheduled purge that deletes rows for real. "Keep forever" must be a deliberate choice, never the default nobody revisited.
- Build one lookup path that finds every copy. An access or deletion request has to reach the primary store, replicas, backups, the search index, and analytics. A GDPR or CCPA erasure that skips the warehouse copy is not an erasure.
- Encrypt sensitive PII at the field level. Put envelope encryption on government ids and health data on top of disk encryption, so a raw table dump is not a breach by itself.
Checks
- Pick a user id: can you list every place their personal data lives in under a minute?
- Does a raw email, card number, or national id ever surface in logs, stack traces, or analytics events?
- When retention expires, does a job actually delete the rows, or does the policy live only in a wiki page?
Boundaries
Classification thresholds and lawful basis are legal calls; defer to your data protection officer. The encryption mechanics belong to data-encryption. This skill decides what to protect, how coarsely to keep it, and for how long.