AgentSkillsCN

cleanup-applier

根据JSONL决策文件,执行Gmail的清理操作(归档、标记、删除)。当您需要在审批通过后,安全地对营销邮件进行分类标记或彻底移除时,此工具便能派上用场。

SKILL.md
--- frontmatter
name: cleanup-applier
description: Apply Gmail cleanup actions (archive, label, trash) based on decisions JSONL. Use when you need to safely tag or remove marketing mail after approval.

Cleanup Applier

Quick start

  1. Confirm explicit approval before any destructive action.
  2. Run scripts/gmail_apply_cleanup.py in dry-run mode.
  3. Review the log output and confirm before re-running with --approve.
  4. Apply archive/label or trash actions as configured.
  5. If using --trash, optionally send a summary email with --email-summary --summary-to.

Safety rules

  • Default to archive + label; trash only with explicit approval.
  • Create labels only when approved.
  • Keep an action log for audit and rollback context.
  • Send deletion summaries only after approval and when trash is enabled.

Resources

  • scripts/gmail_apply_cleanup.py: Apply archive/trash/label actions.
  • scripts/gmail_api.py: OAuth helper.
  • references/cleanup-actions.md: Cleanup options and guidance.
  • references/gmail-api-setup.md: OAuth setup steps and scopes.