AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
fix(last-run): guard python3 absence + hoist datetime + use context manager
Trevin Chowb296a6551531
diff --git a/hooks/scripts/check-config.sh b/hooks/scripts/check-config.shindex a9c7f698..41890276 100755--- a/hooks/scripts/check-config.sh+++ b/hooks/scripts/check-config.sh@@ -74,15 +74,16 @@ elseLAST_RUN_FILE="$HOME/.config/last30days/last-run.json"fiLAST_RUN_LINE=""-if [[ -n "$LAST_RUN_FILE" && -f "$LAST_RUN_FILE" ]]; then- LAST_RUN_LINE=$(LAST_RUN_FILE="$LAST_RUN_FILE" python3 - <<'PY' 2>/dev/null+if [[ -n "$LAST_RUN_FILE" && -f "$LAST_RUN_FILE" ]] && command -v python3 &>/dev/null; then+ LAST_RUN_LINE=$(LAST_RUN_FILE="$LAST_RUN_FILE" python3 - <<'PY' 2>/dev/null || trueimport datetimeimport jsonimport ospath = os.environ["LAST_RUN_FILE"]try:- d = json.load(open(path))+ with open(path) as fh:+ d = json.load(fh)topic = (d.get("topic") or "?")[:60]ts = d.get("timestamp", "")dt = datetime.datetime.fromisoformat(ts.replace("Z", "+00:00"))diff --git a/skills/last30days/scripts/last30days.py b/skills/last30days/scripts/last30days.pyindex d2df7fa1..0a870cc0 100644--- a/skills/last30days/scripts/last30days.py+++ b/skills/last30days/scripts/last30days.py@@ -6,6 +6,7 @@ from __future__ import annotationsimport argparseimport atexit+import datetimeimport jsonimport osimport re@@ -533,7 +534,6 @@ def _show_runtime_ui(def _write_last_run(topic: str, report: "schema.Report") -> None:try:- import datetimeif env.CONFIG_DIR is None:returntarget = env.CONFIG_DIR