redact-pii

Identify and mask sensitive identifiers in markdown, text, JSON, and CSV files.

1|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/cdrguru/portable-agent-kit --skill redact-pii
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redact-pii
Source: https://github.com/cdrguru/portable-agent-kit/tree/main/.agent/skills/redact-pii
Command: npx skills add https://github.com/cdrguru/portable-agent-kit --skill redact-pii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automatically scans files of various formats (markdown, text, JSON, CSV) for sensitive identifiers such as SSNs, EINs, TINs, and account numbers and redacts them in-place with masked placeholders, preserving surrounding context to maintain readability.

Core Features & Use Cases

  • Detects common identifiers using regex patterns and context-aware checks.
  • Redacts in-place while preserving formatting and surrounding text.
  • Interactive workflow that asks for user confirmation before writing changes, reducing the risk of unintended data loss.

Quick Start

Run redact-pii on the target file or directory to redact identified PII.

Frequently Asked Questions about redact-pii

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I redact PII in text and JSON files while preserving the original formatting?

You can redact SSNs, EINs, TINs, and account numbers in markdown, text, JSON, and CSV files. This skill uses regex patterns to detect these identifiers and masks them in-place while preserving surrounding text and formatting.

What is the best way to automatically mask SSNs and account numbers in a CSV file?

Automated PII redaction works by scanning files for sensitive identifiers using regex patterns, then replacing them with masked placeholders. This skill handles markdown, text, JSON, and CSV formats while preserving surrounding context.

Can I redact sensitive identifiers in multiple files without losing original data?

Yes, this skill performs in-place redaction but prompts for user confirmation before writing any changes. This interactive workflow reduces the risk of unintended data loss while masking sensitive identifiers.

Does regex-based PII redaction work on JSON and markdown formats?

Yes, this skill supports markdown, text, JSON, and CSV formats. It applies regex-based detection for SSNs, EINs, TINs, and account numbers while preserving surrounding formatting and context.

What types of sensitive identifiers can I automatically detect and redact in data files?

You can detect and redact SSNs, EINs, TINs, and account numbers. The skill uses regex-based detection and context-aware checks to identify these sensitive identifiers before masking them with placeholders.

Why should I use an interactive redaction process instead of automatically overwriting files?

Using an interactive redaction process prevents unintended data loss by prompting for user confirmation before writing changes. This lets you review detected sensitive identifiers before in-place masking is applied.