360 Secure SkillHub
360 安全技能中心

GOG Cleanup

通过 Bash 脚本读取本地 GOG 游戏库 JSON,筛选已安装且超过 30 天未游玩(含从未游玩)的游戏,经 himalaya 发送 HTML 摘要邮件,并在 macOS Apple Reminders 的 Gaming 列表中为每款游戏创建卸载提醒;支持用环境变量调整阈值、收件人以及跳过邮件或提醒,可幂等重复运行,也可定时调度。

分类:自动化
terrycarter1985
terrycarter1985
热度 20.46
最近更新 2026-05-12 02:31:54

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add terrycarter1985/gog-cleanup
兼容性
通用兼容
联网要求
需要联网
数据出网
可选出网
Metadata
name
gog-cleanup
description
Find GOG games installed but not played for 30+ days, email the list, and add Apple Reminders to consider uninstalling. One-command cleanup sweep for your backlog.
version
1.0.0
author
john_doe
license
MIT
metadata
{"openclaw":{"emoji":"🧹","requires":{"bins":["himalaya","remindctl","jq"]},"tags":["gog","gaming","cleanup","reminders","email"]}}

GOG Cleanup

Automated stale-game cleanup sweep: finds installed GOG games you haven't played in 30+ days, emails you a digest, and creates Apple Reminders so you can decide whether to uninstall.

What It Does

  1. Reads your GOG library from config/gog_library.json
  2. Filters for installed games whose last_played is 30+ days ago (or never played)
  3. Sends a formatted digest email via himalaya
  4. Adds each stale game to the Gaming list in Apple Reminders via remindctl

Prerequisites

Tool Purpose Install
jq JSON parsing brew install jq
himalaya Send email brew install himalaya
remindctl Apple Reminders brew install steipete/tap/remindctl
  • Himalaya must be configured with a personal account (see config/himalaya.toml)
  • Apple Reminders must have a Gaming list (auto-created if missing)

Usage

Run the full sweep (email + reminders)

bash scripts/gog-cleanup.sh

Email only (skip reminders)

SKIP_REMINDERS=1 bash scripts/gog-cleanup.sh

Reminders only (skip email)

SKIP_EMAIL=1 bash scripts/gog-cleanup.sh

Custom stale threshold (default 30 days)

STALE_DAYS=60 bash scripts/gog-cleanup.sh

Custom recipient (defaults to himalaya personal account email)

EMAIL_TO="other@example.com" bash scripts/gog-cleanup.sh

Configuration

The script reads from workspace config/:

File Purpose
config/gog_library.json GOG game library with install status & last_played timestamps
config/himalaya.toml Himalaya email account config (uses personal account)
config/reminders_lists.json Reminders list structure (Gaming list)

Output

  • Email: HTML-formatted digest sent to your personal inbox
  • Reminders: One reminder per stale game in the Gaming list, prefixed with "🧹 Consider uninstalling:"
  • Console: Summary of games found and actions taken

Scheduling

To run weekly via cron:

# Add to crontab for Monday 9 AM
0 9 * * 1 /path/to/scripts/gog-cleanup.sh >> /tmp/gog-cleanup.log 2>&1

Or use OpenClaw's cron tool for agent-managed scheduling.

Notes

  • Games with last_played: null (never played) are always included
  • Uninstalled games are always skipped regardless of last_played
  • The script is idempotent — re-running won't duplicate reminders (existing reminders with the same title are skipped)