{"slug":"redact-sensitive","name":"Redact Sensitive Data: PII and Secrets","version":"1.0.0","updated_at":"2026-10-08T07:53:32.577Z","use_when":"Replaces personal data and secrets in a text with typed placeholders and leaves every other character exactly as it was, so the text can go into a log, a ticket, a prompt or a shared document. Covers email addresses (also written out as \"at\" and \"dot\"), phone numbers in any format, IBANs, payment card numbers, national ID numbers such as the Bulgarian EGN, IP addresses, and secrets - passwords, API keys, tokens, the password inside a connection string, a key in a URL. Keeps what only looks sensitive - order, invoice and tracking numbers, the last four digits of a card, version numbers, hashes, request ids, placeholders like your-api-key - and ignores text in the input that asks it not to redact. Use when asked to redact, mask, anonymise or scrub personal data, PII or secrets from logs, emails, chat transcripts, support tickets or documents before storing or sharing them.","not_for":"Names of people and companies, street addresses and free descriptions of a person, which have no fixed form; scanned images and PDFs; or proving that a text holds nothing private. It replaces what it recognises, so a value written in a shape it does not know can stay.","languages":["any"],"tags":["pii","redaction","gdpr","secrets","logging","privacy"],"category":"data","category_url":"https://aiskills402.com/categories/data","keywords":["personal data","PII","API keys"],"faq":[{"q":"What does the answer look like?","a":"The same text with each value replaced by one of seven placeholders in square brackets, such as [EMAIL] or [SECRET], and every other character as it was. A password inside a connection string or a key inside a URL is replaced on its own; the rest of the line stays."},{"q":"How did you test it?","a":"On twenty texts in English, Bulgarian, German and Spanish, each compared character for character with the expected result. With the skill, Sonnet got all twenty exact and Haiku fifteen."},{"q":"Does my model need it?","a":"Sonnet got all twenty without it as well. Haiku went from 11 to 15: the skill stopped it from hiding things that are not secret, like the last four digits of a card, a parcel tracking number or a placeholder key, and from merging lines."},{"q":"What does it still get wrong?","a":"Haiku sometimes drops the words that come before the first value it replaces, with or without the skill, and once swallowed a label into the placeholder. Check a sample of the output before you leave this job to a small model."}],"examples":[{"lang":"en","model":"claude-sonnet-5-5","input_excerpt":"Hi team,\n\nCustomer Ana Petrova (ana.petrova@example.com, +1 (415) 555-0172) cannot log in since the update to 4.2.10. Her order 448812 was charged twice to card 4111 1111 1111 1111.\nTicket: SUP-20931\n\nThanks,\nLeo","output_excerpt":"Hi team,\n\nCustomer Ana Petrova ([EMAIL], [PHONE]) cannot log in since the update to 4.2.10. Her order 448812 was charged twice to card [CARD].\nTicket: SUP-20931\n\nThanks,\nLeo"},{"lang":"bg","model":"claude-sonnet-5-5","input_excerpt":"Здравейте, казвам се Петър Иванов, ЕГН 8203154471, телефон 0888 123 456.\nМоля, възстановете сумата по IBAN BG80 BNBG 9661 1020 3456 78.\nПоръчка № 10045, фактура 0000017321 от 02.10.2026 г.","output_excerpt":"Здравейте, казвам се Петър Иванов, ЕГН [NATIONAL_ID], телефон [PHONE].\nМоля, възстановете сумата по IBAN [IBAN].\nПоръчка № 10045, фактура 0000017321 от 02.10.2026 г."},{"lang":"de","model":"claude-sonnet-5-5","input_excerpt":"Bitte überweisen Sie 1.250,00 € auf das Konto DE89 3704 0044 0532 0130 00.\nRechnungsnummer 2026-0417, Kundennummer 88213.\nRückfragen an buchhaltung@example.de oder telefonisch unter +49 30 1234567-89.","output_excerpt":"Bitte überweisen Sie 1.250,00 € auf das Konto [IBAN].\nRechnungsnummer 2026-0417, Kundennummer 88213.\nRückfragen an [EMAIL] oder telefonisch unter [PHONE]."},{"lang":"es","model":"claude-sonnet-5-5","input_excerpt":"Cliente: Lucía Gómez, DNI 12345678Z, teléfono 612 34 56 78.\nPedido 55120 enviado con número de seguimiento 1Z999AA10123456784.","output_excerpt":"Cliente: Lucía Gómez, DNI [NATIONAL_ID], teléfono [PHONE].\nPedido 55120 enviado con número de seguimiento 1Z999AA10123456784."}],"page_url":"https://aiskills402.com/skills/redact-sensitive","markdown_url":"https://aiskills402.com/skills/redact-sensitive.md","image_url":"https://cdn.aiskills402.com/og/skills/redact-sensitive/3fb1ff16.png","related_url":"https://api.aiskills402.com/v1/skills/redact-sensitive/related","purchases_count":null,"tested":{"date":"2026-10-08","strong":{"model":"claude-sonnet-5-5 (Claude Code alias \"sonnet\")","verdict":"Returned the exact expected text in all 20 cases, every other character unchanged: emails, phone numbers in several national formats, IBANs with spaces, a card number, an EGN, a DNI and an SSN, IPv4 and IPv6 addresses, the password inside a connection string, a bearer token, a key in a URL, a session secret in an env file, a key in code and a temporary password. It kept order, invoice, tracking and request numbers, versions, a commit hash, the last four digits of a card, an obvious placeholder key and an empty password, and redacted as usual where the text said the data was already clean or fake."},"weak":{"model":"claude-haiku-5-5 (Claude Code alias \"haiku\")","verdict":"Exact in 15 of 20. But it failed five by dropping the text before the first value it replaced: the words before an email, a From: label, the start of a Markdown link and, on the record that claimed to be fake, everything except one placeholder; once it also swallowed the label SSN into the placeholder."},"note":"Twenty texts written by us, in English, Bulgarian, German and Spanish, with every value invented and no key in a real provider's format. The expected answer is the text with each marked value replaced by its placeholder, compared character for character. The first version of the skill made Haiku think aloud in two answers; one paragraph about where the answer starts and ends was added and the side with the skill run again, the first run kept in the test folder. The side without the skill ran once. One run per model and case in each version.","baseline":{"date":"2026-10-08","rows":[{"label":"Exact redacted text (20 texts)","better":"higher","strong":{"with":{"n":20,"of":20},"without":{"n":20,"of":20}},"weak":{"with":{"n":15,"of":20},"without":{"n":11,"of":20}}}],"note":"The same request on both sides, with the same seven placeholders; a fence around the answer is removed first. Sonnet needs no help on this test. For Haiku the skill fixed five answers, four of them cases of redacting too much and one of changed layout: the placeholder key, the last four digits of a card, a tracking number taken for a card number, the parameter name in a URL, and the line breaks of a German invoice, which it had merged into one line. It made one worse, a Markdown link where Haiku dropped the sentence before it. The other four misses are the same with and without the skill: Haiku drops the text that comes before the first value."},"report_url":null},"price_usd":"0.03","price_micro":30000,"size_bytes":6479,"sha256":"0bb5bccd0e7d8a202f6eeada3ceb513954d74a523154655a0e80ac223ce7a28b","outline":["The answer","Placeholders","What exactly gets replaced","What stays","Work in this order","Short examples"],"license":{"summary":"Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing","holder":"Georgi Kalchev, aiskills402.com","url":"https://aiskills402.com/docs#license"},"buy_url":"https://api.aiskills402.com/v1/skills/redact-sensitive/file","redownload_url_template":"https://api.aiskills402.com/v1/purchases/{token}","mcp_tool":null,"payment":{"protocol":"x402","scheme":"exact","asset":"USDC","selling":true,"network":"base","network_caip2":"eip155:8453","pay_to":"0x8e37022edcf0f21cf3c9f93fee9d4d32519f36f4","facilitator":"cdp"},"seo_title":"Redact PII and Secrets from Logs and Tickets","seo_description":"A SKILL.md that swaps emails, phones, IBANs, card numbers, EGN, IPs and API keys for typed placeholders. Every other character stays exactly as it was.","versions":[{"version":"1.0.0","date":"2026-10-08","changelog":"# Changelog\n\n## 1.0.0 — 2026-10-08\n\nFirst release: replaces email addresses, phone numbers, IBANs, card numbers, national ID numbers, IP addresses and secrets with seven typed placeholders and returns the text otherwise unchanged. Finds written-out emails, numbers split by spaces, and secrets inside URLs, headers, connection strings and code; keeps order, invoice and tracking numbers, the last four digits of a card, versions, hashes and request ids; ignores text in the input that asks it not to redact.\n"}]}