# Privacy Protector

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-mode-io-mode-io-skills-privacy-protector`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [mode-io](https://agentstack.voostack.com/s/mode-io)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [mode-io](https://github.com/mode-io)
- **Source:** https://github.com/mode-io/mode-io-skills/tree/main/privacy-protector
- **Website:** https://www.modeio.ai/

## Install

```sh
agentstack add skill-mode-io-mode-io-skills-privacy-protector
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Run anonymization and restore flows

Use this skill when you need to anonymize text/files, restore placeholders with a saved map, or tune the local detector.

Maintainer-only validation assets are excluded from ClawHub uploads.

## Scope

- Included:
  - anonymize (`scripts/anonymize.py`)
  - deanonymize (`scripts/deanonymize.py`)
  - local detector diagnostics (`scripts/detect_local.py`)
  - file/map workflow helpers behind those entrypoints
- Not included:
  - command safety analysis (`security`)
  - staged-diff or git pre-commit scanning

## Working directory

Run these commands from inside the `privacy-protector` folder.

## Requirements

- Hard requirement: `python3`
- Optional package: `requests` for API-backed `dynamic`, `strict`, and `crossborder`
- Optional package: `python-docx` for `.docx`
- Optional package: `PyMuPDF` for `.pdf`
- Optional override: `ANONYMIZE_API_URL` for non-`lite` levels
- Optional override: `MODEIO_REDACT_MAP_DIR` for local map storage

## Core commands

### Anonymize text

```bash
python3 scripts/anonymize.py \
  --input "Email: alice@example.com, Phone: 415-555-1234" \
  --level lite \
  --json
```

### Anonymize a file

```bash
python3 scripts/anonymize.py \
  --input ./incident.docx \
  --level lite \
  --json
```

### Restore from a saved map

```bash
python3 scripts/deanonymize.py \
  --input "Email: [EMAIL_1]" \
  --map ~/.modeio/redact/maps/.json \
  --json
```

### Tune the local detector

```bash
python3 scripts/detect_local.py \
  --input "Project codename Phoenix is approved. Reach support@example.com." \
  --allowlist-file examples/detect-local/allowlist.json \
  --blocklist-file examples/detect-local/blocklist.json \
  --thresholds-file examples/detect-local/thresholds.json \
  --json
```

## Runtime notes

- `lite` runs fully local. `dynamic`, `strict`, and `crossborder` call the backend API
- For `crossborder`, pass both `--sender-code` and `--recipient-code`
- Supported file inputs: `.txt`, `.md`, `.markdown`, `.csv`, `.tsv`, `.json`, `.jsonl`, `.yaml`, `.yml`, `.xml`, `.html`, `.htm`, `.rst`, `.log`, `.docx`, `.pdf`
- Saved maps default to `~/.modeio/redact/maps`; use `MODEIO_REDACT_MAP_DIR` to override that location
- Text-like outputs get embedded map markers or sidecar `.map.json` references when needed
- `.pdf` supports anonymization only; de-anonymization is not supported
- Rich-file outputs keep assurance metadata in the JSON response so callers can decide how strict they want to be
- Use `--json` when you want the stable machine-readable envelope and file workflow metadata

## Resources

- `ARCHITECTURE.md` for package boundaries
- `references/cli-contracts.md` for flags and output contracts
- `references/file-workflows.md` for map linkage and assurance behavior
- `references/local-detector.md` for profiles and shipped config examples
- `examples/detect-local/` for ready-to-edit tuning files

## When not to use

- Request routing or gateway policy enforcement
- Safety approval/block decisions

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [mode-io](https://github.com/mode-io)
- **Source:** [mode-io/mode-io-skills](https://github.com/mode-io/mode-io-skills)
- **License:** Apache-2.0
- **Homepage:** https://www.modeio.ai/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mode-io-mode-io-skills-privacy-protector
- Seller: https://agentstack.voostack.com/s/mode-io
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
