# PII Shield: Mask & Restore Personal Data for AI

> Mask names, phone numbers, emails, ID and card numbers in your files before your AI agent reads them, then put the real names back into its answer. One local script, nothing uploaded. Follows South Korea, California (CCPA), EU (GDPR), Japan or China rules.

PII Shield: Mask & Restore Personal Data for AI is a paid AI agent skill on Agensi by kangjun. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [kangjun](https://www.agensi.io/creators/kangjun-lee)
- Version: 1.0.0
- Last updated: 2026-12-05
- Security: scan passed (2026-12-05); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pii-shield-mask-restore-personal-data-for-ai
- Tags: privacy, pii, redaction, anonymization, korean, documents

## What it does

- Masks personal data in .txt, .md, .csv, .tsv, .docx, .xlsx and .pptx files on your own computer
- Deletes ID, passport, card and bank account numbers, passwords and health data for good
- Swaps names, phones, emails, addresses and birth dates for consistent tags like [PersonA]
- Puts the real values back into the AI's answer from a private map file on your computer
- Follows the rules you pick: South Korea, California (CCPA), EU (GDPR), Japan or China

## Who it's for

- **Teams that work with customer data:** Ask an AI agent to analyse customer lists or support tickets without sending real names or contact details. Try: "Mask the personal data in this support ticket before we summarise it."
- **HR and legal staff:** Strip ID numbers and names from contracts, HR sheets and counselling notes before summarising them with AI. Try: "Redact the names and phone numbers in this counselling record."
- **People working with Korean documents:** Korean resident registration numbers, names and addresses are detected best, with Korean tags. Try: "Mask the personal data in this Korean employment contract with the kr region."

## About this skill

Want an AI agent to read your customer list, contract or HR sheet, but not the real personal data inside it? PII Shield masks the file first and lets you put the real values back afterwards.

### How it works
PII Shield runs a single local Node.js script. Your agent passes the file path to the script and only reads the masked copy, never the original or the map file. Nothing is uploaded: the script makes no network calls and reads no environment variables. Before masking, a preview lists what was found by kind and place, without showing the values. The original file is never overwritten.

- High-risk numbers (national ID, passport, driver's licence, card, bank account, passwords, health and other sensitive data) are deleted.
- Names, phone numbers, emails, addresses and birth dates become tags. The same value always gets the same tag, so the AI can still follow who is who.
- The tag-to-value map is saved as a separate private file. Use it to restore real values into the AI's answer.

### Use cases
- Mask a customer list in Excel before asking the AI to analyse it
- Redact a Word contract or counselling record before summarising it with AI
- Put real names back into a report the AI wrote with tags

### Known limitations
- Automatic detection can miss items. Open the masked file once before sharing it.
- Foreign-language names are found mainly when a label such as "Name:" comes before them. Korean documents are covered best.
- PDF, HWP/HWPX, old .doc/.xls/.ppt files, and text inside images, charts or scans are not read.
- The skill relies on your agent following its instructions; it cannot technically stop an agent from opening the original file.
- The map file is plain JSON saved with owner-only permissions. Keep it private.
- Requires Node.js 22 or newer. This is a tool, not legal advice.

## Requires

- Node.js

## Technical details

One script, scripts/pii-shield.js, with three commands: scan (preview kinds, counts and places only), mask (writes <name>.masked.<ext> and <name>.DO-NOT-SHARE.pii-map.json) and restore (writes <name>.restored.<ext> from an answer file and the map). Options: --region kr|us|eu|jp|cn, --out <folder>. Needs Node.js 22+. No network calls, no environment variables, never overwrites a file.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the PII Shield: Mask & Restore Personal Data for AI skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does my document leave my computer?

No. The script works on local files and has no network code. Your agent passes the file path to the script and only reads the masked copy, never the original or the map file.

### What do I need to run it?

Node.js 22 or newer and an AI agent that can run shell commands, such as Claude Code or Codex CLI. No accounts or API keys.

### Can deleted numbers be restored?

No. High-risk numbers such as ID, card and account numbers are deleted for good. Only tagged items (names, phone numbers, emails, addresses, birth dates) come back, using the private map file.

### Which language are the tags in?

The language of the region you pick: Korean for kr, English for us and eu (for example [PersonA] and [Phone1]), Japanese for jp and Chinese for cn.

### What can it not read?

PDF, HWP/HWPX, old .doc/.xls/.ppt files, and text inside images, charts or scans. Detection is automatic and can miss items, so open the masked file once before you share it.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
