# PrivacyGuard — Pre-Flight Privacy Gate for AI Agents

> A zero-dependency Python skill that masks PII, API keys, tokens, and wallet addresses before your agent sends anything to a cloud LLM, API, or third-party platform — and scans the final file before submission.

PrivacyGuard — Pre-Flight Privacy Gate for AI Agents is a paid AI agent skill on Agensi by jerry-3, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $2 (one-time purchase)
- Creator: [jerry-3](https://www.agensi.io/creators/jerry-3)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/privacyguard-pre-flight-privacy-gate-for-ai-agents
- Tags: security, automation, privacy, pii-redaction, agent-skill, claude-code, codex, cursor

## About this skill

Most privacy skills do one half of the job: they scan and report, or they hand you instructions and templates. PrivacyGuard does both halves — mask, then verify — in one zero-dependency Python tool that runs before anything leaves the machine:

- sanitize masks your fixed sensitive terms (names, emails, account IDs, wallet addresses, organizations) and high-risk formats (API keys, tokens, private keys, JWTs, crypto addresses, local paths) in any text stream.
- scan checks the exact file, directory, .tar.gz, or .zip you are about to send and reports what's still inside — by rule label and count, never by value. Exit code 1 blocks the send.

What makes it different:

1. Your own blocklist, not just formats. Regex scanners catch things that look like secrets. They cannot catch your name, your email, or your wallet address. PrivacyGuard masks the exact terms you list in a JSON config — the values only you know are sensitive. Your terms never live in the script, so the tool itself is safe to share and bundle.
2. Mask, then verify, end to end. Sanitize the stream, then scan the final artifact. If anything slipped through, the gate fails closed (exit 1) instead of leaking quietly.
3. Reports that are safe to share. Scan output shows rule labels and counts only — never the matched values — so a report pasted into logs, chats, or tickets can't become a second leak.
4. Custom rules for your platform. Add claim codes, order numbers, or any format your workflow uses.
5. Battle-tested in a real agent pipeline. Built for automated agent submissions where a leaked transcript means disqualification — not a demo.

What's included
- SKILL.md — agent instructions (works with Claude Code, Codex, Cursor, and any agent that reads skills)
- privacy_guard.py — the tool, Python 3 standard library only
- config.example.json — config template
- examples/ — fake demo transcript + expected output, so you can see it work in 30 seconds

Built-in format coverage
Private-key headers · GitHub/Anthropic/OpenAI token formats · AWS access key IDs · bearer tokens · JWTs · api_key=... assignments · EVM addresses & keys · emails · local user paths · example regional rules (Taiwan ID/mobile) you can adapt or remove.

Honest note: this is a regex-and-blocklist gate, not magic. It catches what you list and the formats it knows. Treat a clean scan as a strong pre-flight check — and still read the final artifact before it leaves.

## Known limitations

Requires local Python 3. Cannot scan binary formats like images or PDFs. Effectiveness depends on the completeness of the user-provided config 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 PrivacyGuard — Pre-Flight Privacy Gate for AI Agents 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

### What specific security risks does Privacy Guard address?

Privacy Guard is a local Python-based security layer that scans and masks PII, API keys, and internal file paths before you send data to cloud LLMs, preventing accidental data leaks.

### Which AI agent frameworks are compatible with this skill?

This is a standalone Python utility that functions as a 'pre-flight' gate; it is compatible with any AI agent or workflow that can execute Python scripts or process text files locally.

### How is this different from just asking an LLM to redact the information itself?

Unlike prompt-based redaction which can be bypassed or ignored by an LLM, this skill uses deterministic code-level regex and blocklists to ensure sensitive data is removed before it ever leaves your machine.

### What assets are included in the purchase of this skill?

You will receive the core Python script, a sample JSON configuration file for your custom blocklists, and a README guide detailing CLI commands for text sanitization and archive scanning.

### Can I use this tool to scan compressed file bundles or only raw text?

Yes, the tool includes a dedicated archive inspection feature that can unpack, scan, and audit the contents of .zip and .tar.gz files to identify hidden secrets before you upload them.

### Are there any specific hardware or software dependencies required for installation?

Privacy Guard is a zero-dependency tool requiring only a standard Python 3.x installation, making it lightweight and easy to integrate into existing DevOps or LLM-ops pipelines.

---

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.
