Map personal data in SQL schemas: parse CREATE TABLE, classify columns by name, flag special categories and tables linked to people by foreign keys. Use when the user asks for a personal data inventory or privacy review of a schema.
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Builds an inventory of personal data from SQL DDL alone. It reads a schema file, never connects to a database, makes no network calls and needs only Python 3.10+ and the standard library.
schema.sql dump.Locate the schema as one SQL file (a dump, or migrations concatenated in order). Only CREATE TABLE statements are read; other statements are skipped.
Run the mapper:
python scripts/personal_data_map.py schema.sql --format markdown
python scripts/personal_data_map.py schema.sql --format json --fail-on special_category--fail-on CATEGORY (repeatable) exits with code 1 when any column has that category.
Read the result. Each classified column has a category; each table has a role. Categories, roles and matching rules are in rules.
Review the result with the user using the review checklist: the mapper sees column names only, so some columns are missed and some are matched by coincidence.
Present the table, list special-category tables separately, and state the limits. This output supports an inventory; it is not legal advice or a compliance determination.
0 success, 1 a --fail-on category was found or the schema could not be parsed (message on stderr), 2 usage error or unreadable file.
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] [schema.]name (...) with column-level and table-level REFERENCES / FOREIGN KEY. Input over 5,242,880 bytes, more than 2000 tables or parentheses nested deeper than 32 levels are rejected. Classification uses column names only, never data values.
repository in the plugin manifest, or publish from a GitHub Action to verify it.