# PII and Secrets Redactor for Logs

> Scrub emails, phone numbers, NIK, card numbers, JWTs, passwords and API keys from logs and exports before sharing, Indonesia-ready.

PII and Secrets Redactor for Logs is a paid AI agent skill on Agensi by Singgih Rochmad Saputro, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $1 (one-time purchase)
- Creator: [Singgih Rochmad Saputro](https://www.agensi.io/creators/singgihrs)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pii-and-secrets-redactor-for-logs
- Tags: security, testing-debugging

## About this skill

Replace sensitive values with clear placeholders (`[EMAIL]`, `[PHONE]`, `[NIK]`, `[CARD]`, `[JWT]`, `[SECRET]`) while leaving everything else, including order IDs and timestamps, readable for debugging.

- "Clean this log before I send it to the vendor"
- "Redact customer data from this CSV export"
- "Add PII redaction to our Android / Node / Python logger"
- "Did any secrets leak into these logs?"

1. Put the text in a file (or pipe it) and run:

Options: `--with ip,npwp,iban` to enable extra rules, `--only email,phone` to run a subset, `--extra 'ORD-\d{6}=[ORDER]'` for a custom pattern (repeatable), `--report` for counts per rule.
2. **Review** the report. If a rule hit unexpectedly often (e.g. `card` on a log full of long numeric IDs), sample a few redacted lines and confirm with the user. The card rule already requires a valid Luhn checksum and the NIK rule a valid province, month and day, so false positives are rare.
3. **Deliver** the redacted file. Never paste the original sensitive values back into the chat, and do not echo found secrets in the summary; report counts and line numbers instead.
4. If secrets (passwords, API keys, tokens) were found, tell the user they should rotate them: redacting a copy does not un-leak the original.

## Requires

- Python 3.8+

## Known limitations

Pattern-based: it does not detect personal names, street addresses or free text, so it is not full legal anonymisation. Phone detection is tuned for Indonesian mobile numbers; add custom patterns for other countries.

## 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 and Secrets Redactor for Logs 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 does PII and Secrets Redactor for Logs do?

Scrub emails, phone numbers, NIK, card numbers, JWTs, passwords and API keys from logs and exports before sharing, Indonesia-ready.

### Which AI agents support PII and Secrets Redactor for Logs?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use PII and Secrets Redactor for Logs?

Connect your AI agent to Agensi through MCP, then ask it to use PII and Secrets Redactor for Logs on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

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.
