log-redactor

Redact secrets and PII from logs before sharing or summarizing. Use when the user asks to sanitize/redact logs or remove emails, tokens, API keys, or passwords.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 6, 2026⬇️2downloads

When & Why to Use This Skill

The Log Redactor skill is a vital security utility designed to automatically sanitize system logs by masking Personally Identifiable Information (PII) and sensitive credentials such as API keys, tokens, and passwords. It ensures data privacy and regulatory compliance by allowing users to safely share, analyze, or summarize technical logs without risking exposure of confidential data.

Use Cases

  • Secure Troubleshooting: Redact sensitive API keys and passwords from server logs before sharing them with external support teams or vendors for debugging.
  • Privacy-First AI Analysis: Sanitize logs to remove emails and PII before providing them to Claude for summarization or root cause analysis.
  • Compliance Auditing: Automate the cleansing of technical logs to meet GDPR, SOC2, or HIPAA requirements before long-term storage or internal reporting.
  • Safe Knowledge Sharing: Cleanse logs of internal secrets to create anonymized troubleshooting guides or documentation for the wider engineering team.
namelog-redactor
descriptionRedact secrets and PII from logs before sharing or summarizing. Use when the user asks to sanitize/redact logs or remove emails, tokens, API keys, or passwords.

Log Redactor Skill

Workflow

  1. Run the redaction script on the raw log.
  2. Verify that obvious secrets and PII are masked.
  3. Summarize the redacted content if requested.

Script usage

  • Run: python scripts/redact_logs.py --input <path> --output <path>
  • If no output path is provided, print to stdout.

Output format

Redacted log:

<redacted content>

Optional summary:

  • ...

Notes

  • Do not invent values when masking.
  • Keep original structure intact while replacing sensitive tokens.