AgentSkillsCN

log-redactor

在分享或总结之前从日志中脱敏密钥和 PII。当用户要求净化/脱敏日志或删除电子邮件、令牌、API 密钥或密码时使用。

SKILL.md
--- frontmatter
name: log-redactor
description: 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.

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:

code
<redacted content>

Optional summary:

  • ...

Notes

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