agentleFS
m7mdwbm7mdwb/martech-verify/skills/pii-scan/SKILL.md

pii-scan

Skill4 starsChanged 6 days agoMITView on GitHub

Find personal data leaking into analytics URLs, page paths and event parameters. Use when auditing GA4, Google Tag Manager, server logs or any tracking export for emails, phone numbers, card numbers, IBANs, tokens or names that should never have reached an analytics platform. Runs on a CSV or log file you already have, needs no API access, and never prints an unredacted value.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. Fan-Pier-Labs/openrecord★ 76same name
    2. gmanch94/claude-code-aidlc-template★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never modify the source export, upload it, or invent findings beyond the scanner's output.

    line 29
  2. Distinctive:

    If the user needs help preparing an export, read references/input-guide.md.

    line 30
  3. Distinctive:

    Before a migration, a new consent tool, or handing an analytics property to an agency.

    line 40
  4. Distinctive:

    Every finding carries a signal marker, and the distinction matters:

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

pii-scan

Agent workflow

This is an executable audit, not a checklist. When a usable file is available, run the bundled scanner instead of only explaining how someone could scan it.

  1. Identify the export the user wants checked. If several files are plausible and the choice changes the audit, ask which one; otherwise use the clearly relevant file.
  2. Resolve scripts/scan.py relative to this SKILL.md and run it with an available Python 3 interpreter. In Claude Code, ${CLAUDE_SKILL_DIR} is this skill directory; in other hosts use the skill path supplied by the host. Quote every path.
  3. Let column auto-detection run first. Add --column NAME only when the user named a column or the report shows that the wrong one was selected. Use --json only when the user wants machine-readable output.
  4. Interpret exit codes exactly: 0 means the supplied export produced no findings, 1 means findings were produced, and 2 means the input could not support a trustworthy scan. On 2, relay the actionable error and ask for the smallest correction; never describe the file as clean.
  5. Summarize the highest-severity verified findings first, preserve the distinction between ! verified values and ? name-only signals, and give the first remediation step. Do not reveal, reconstruct, or repeat an unredacted personal value.

Never modify the source export, upload it, or invent findings beyond the scanner's output. If the user needs help preparing an export, read references/input-guide.md.

When to use this

Reach for it when someone asks any of these:

  • "Are we sending PII to Google Analytics?"
  • "We got a privacy complaint / a DPA question about our tracking."
  • "We're about to switch on server-side tagging." Check what is already in the URLs first.
  • "Audit our GA4 setup." Configuration audits do not read values, so they never find this.
  • Before a migration, a new consent tool, or handing an analytics property to an agency.

Why it matters

Google's terms prohibit sending personally identifiable information to Google Analytics. A violation can require data deletion and can put continued access to the service at risk. It rarely happens deliberately. It happens because a form submits over GET, or a tag-manager variable captures the whole field, or a confirmation page puts the customer's name in the path. Nobody checks, because checking means reading thousands of URLs by hand.

How to run it

python skills/pii-scan/scripts/scan.py <export> [--column NAME] [--json] [--fail-on critical|high|medium]

It accepts whatever the user actually has:

SourceHow to get it
GA4Reports > Engagement > Pages and screens, export to CSV. Or an Explore with page path and event parameters.
BigQuery (GA4 export)Any query returning page_location or event parameter values, exported as CSV or JSON lines.
Server logsThe access log itself. The request column is picked up automatically.
Tag managerA Preview-mode export, or any list of URLs.
Anything elseOne URL per line in a text file.

The column is auto-detected from the header. Pass --column when the file has an unusual name for it, and --json when the output feeds something else.

Reading the output

Every finding carries a signal marker, and the distinction matters:

  • ! value verified. The value itself is personal data. The email parses, the card passes Luhn, the IBAN checksum is correct. This is not a guess.
  • ? parameter name only. The parameter is called email or fname, and the value was not independently verifiable. Worth investigating, not worth an incident report.

Severities: critical is verified personal data or a credential. high is a strong name signal or a documented test card. medium is an uncorroborated pattern, or a PII-named parameter that is currently empty, which still means the plumbing exists and will carry a real value the first time someone fills that field in.

What to tell the user afterwards

Lead with the fix, not the count. The scanner prints remediation for each kind it found; the ordering of those steps is the important part and it is always the same:

  1. Stop it at the source. A form that submits over GET, a variable that captures too much, a redirect that carries a parameter through. Until that is fixed, everything else is cleanup.
  2. Then configure the platform. GA4's Redact data setting for email and phone, and the URL query parameter exclusion list. Both are second lines of defence. They only catch what they recognise.
  3. Then decide about the data already collected. Card numbers, IBANs and credentials are an incident, not a settings change: the value has also reached server logs, any CDN in front of them, and the browser history of the person who typed it.

What it will not do

  • It does not read your GA4 property. It reads a file. That is deliberate, because the whole point is that it needs no access grant, no OAuth, and no vendor subscription.
  • It does not print unredacted values, in the table, the locations, or the JSON.
  • It does not claim a finding is confirmed when only the parameter name looked suspicious.
  • It cannot tell you the scan is complete. It tells you what is in the export you supplied. A one-month export answers a one-month question.
  • It does not recognise national identity number formats, because verifying them properly is country-specific and a guess here would produce false alarms about salaries, invoice numbers and order references.

Tests

python tests/test_pii_scan.py

The fixture carries twelve planted defects and the test asserts the scanner finds exactly those and invents nothing. It also asserts that no personal value from the fixture appears in full anywhere in the report. That test failed on first run and caught the scanner reprinting a card number that sat in a URL path.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.