# Decoy redact

> Redact sensitive data from PDFs and images locally using regex patterns and pixelated decoy phrases.

Decoy redact is a free AI agent skill on Agensi by Guillermo Gutiérrez Almazor, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Guillermo Gutiérrez Almazor](https://www.agensi.io/creators/ggalmazor)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Uses: 1
- Version: 1.0
- Last updated: 2026-10-19
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/decoy-redact
- Tags: api, pdf-redaction, security, privacy, regex

## About this skill

Manually masking sensitive data in documents is error-prone and slow. This skill automates the redaction of PDFs and images using the `decoy` CLI, ensuring secrets are covered by pixelated phrases rather than simple black boxes.

### What it does
- **Pattern matching** identifies sensitive strings like IBANs, emails, or names using JavaScript regex.
- **Visual masking** replaces secrets with a mosaic generated from decoy phrases to prevent reconstruction.
- **Automated verification** confirms that redacted files contain no residual text layers, metadata, or readable secrets.
- **Local processing** performs all operations on the host machine without uploading files to external servers.
- **Visual blending** samples surrounding ink and paper colors so redactions integrate naturally with the document.

### How it works
1. **Find** involves scanning the PDF text layer to identify specific strings and their coordinates.
2. **Redact** applies regex patterns or explicit pixel coordinates to generate a flattened, masked version of the file.
3. **Verify** compares the output against the original to prove no sensitive data remains and only intended areas were altered.
4. **Report** generates a summary of covered pages, boxes, and the final output path.

### Frameworks & tools
This skill utilizes the `decoy` CLI tool via Node.js/npm and supports integration through MCP. It relies on `pdf.js` for text layer analysis and standard JavaScript regular expressions for pattern matching.

### Why this beats prompting it yourself
Standard LLM prompting cannot reliably modify binary file structures like PDFs or guarantee the removal of hidden text layers. This skill uses a specialized CLI to ensure the underlying data is physically removed and replaced, providing a verifiable audit trail that simple image generation lacks.

### Use cases
- Redact bank account numbers and IBANs from financial statements.
- Anonymize PII like names and email addresses in legal discovery documents.
- Mask sensitive areas in screenshots or scanned images using coordinate boxes.
- Sanitize internal reports for public distribution while maintaining visual layout.

### Known limitations
Scanned PDFs and images require explicit coordinate boxes as they lack a text layer. The size of the redaction box remains proportional to the hidden text, potentially revealing secret length.

## Requires

- @ggalmazor/decoy
- Node.js

## 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 Decoy redact skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does the 'decoy' masking differ from standard black-box redaction?

The skill uses visual blending to sample surrounding document colors and replaces sensitive data with pixelated decoy phrases, which prevents reconstruction and avoids the 'conspicuous' look of standard black boxes.

### Which AI agents or environments is this skill compatible with?

This skill is designed for local processing via the decoy CLI and supports integration with AI agents through the Model Context Protocol (MCP) or Node.js environments.

### Can I redact scanned images that don't have a searchable text layer?

For digital PDFs, the skill uses regex to find text layers; for scanned images or documents without text layers, you can provide explicit pixel coordinates to target specific areas.

### Does my sensitive data ever leave my local machine during the redaction process?

The skill performs all redaction and verification locally on your host machine, ensuring your sensitive PDFs and images are never uploaded to external servers or LLM providers.

### How can I be sure the sensitive information was actually removed and not just hidden?

The 'Verify' step automatically scans the output file to confirm that no residual text layers, metadata, or original strings remain, providing a verifiable audit trail for every document.

---

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.
