t1k:marketing:store:vps-health
| Field | Value |
|---|---|
| Module | store |
| Version | 0.14.9 |
| Effort | low |
| Tools | — |
How to invoke
Section titled “How to invoke”/t1k:marketing:store:vps-health[--dry-run] [--only <machine name>] [--keep-shots]Store health (daily, read-only)
Section titled “Store health (daily, read-only)”Every day at 09:00 (UTC+7) the timer visits each store VPS on vps.the1studio.org, opens the
Google Play Console home in that machine’s already signed-in browser, reads it with the vision
role, and posts one status message to the user’s own Discord channel. The message says “no issues”
or names each problem: suspended, removed, rejected, policy issues, warnings, deadlines.
Read-only in every console. The only input is opening the console URL through the OS run dialog
(a new tab in the signed-in profile), plus screenshots. Nothing is clicked inside a console page. The
run dialog is verified by a screenshot before any text is typed, so keystrokes never reach a live
console. A machine whose dialog cannot be verified is reported unchecked and nothing is typed.
set -a; . ~/.config/t1k/ads.env; set +a # DISCORD_WEBHOOK_URL (never printed)bun .claude/skills/t1k-marketing-store-vps-health/scripts/store-vps-health.mjs --dry-runbun .claude/skills/t1k-marketing-store-vps-health/scripts/store-vps-health.mjs --dry-run --only "S.H. ONG PRIVATE LIMITED"| Flag | Use |
|---|---|
--dry-run | print the Discord text, post nothing |
--only <name> | one machine by displayName (smoke runs) |
--config <file> | another selection/timing config (default store-vps-health.config.json) |
--keep-shots | keep the PNGs under ~/.cache/store-vps-health/ (default: deleted after reading) |
Exit 0 = all clear posted, 10 = issues found and posted, 2 = the run failed (fleet API
unreachable, no webhook). The installed timer wrapper is ~/.local/bin/store-vps-health.sh
(source of truth: scripts/store-vps-health.sh); it sources ~/.config/t1k/ads.env.
Which machines
Section titled “Which machines”Data, not code: store-vps-health.config.json. A machine is checked when its description contains
an include substring (store account, Play Console, Google Play account) or its name matches
^Store , and its name does not match an exclude regex (^AdMob, ^USA_). That selects the nine
store machines: S.H. ONG PRIVATE LIMITED, TC BONG AIRCON SERVICES, BOOUNG PTE.TLD., Retention Brands
Alltrue LLC, ADAPT FOR SUCCESS LIMITED, Zenify Ltd., DoubleCat, Store VN, PartyUs.
Before touching a machine (preflight):
- description contains
not signed in→skipped, no screenshot, no input. powerStateis notrunning→off, reported. Never started here: a power action stays a manual step (vps.sh power ... --confirmwith the user’s go-ahead). Geliyun (PartyUs) freezes when idle.
Mechanics (per machine, serial)
Section titled “Mechanics (per machine, serial)”vps-screen.mjs shot(fromt1k-marketing-store-vps-management). A black or tiny capture (under 15 KB) is re-shot once; still black →unchecked.key Control+t: a new tab in the already signed-in Chrome window (same on Linux and Windows).- Screenshot, then the vision role must answer
{"newTab": true}. Anything else →unchecked, nothing typed. (The first design used the OS run dialog, Alt+F2 / Meta+r; it never showed a dialog on S.H. ONG, so it was replaced.) - Type
<consoleUrl>into the focused address bar, thenkey Enter. - Wait
waitAfterOpenMs, screenshot, vision reads strict JSON: account, apps (name, package, status), issues,truncated.vps-screenhas no scroll, sotruncated: trueis reported. - Malformed JSON →
unchecked: console reply unreadable(never a silent “no issues”). Vision unavailable (exit 4/5) →unchecked: vision role unavailable. - Every capture is deleted afterwards unless
--keep-shots.
Vision runs through bun ~/.claude/scripts/mr-role.cjs call --role vision --file <png> --prompt ....
Discord text
Section titled “Discord text”One header line (date, UTC+7, machines checked, machines with issues), then one line per machine, then fleet errors if any. Plain text, no em or en dashes (sanitized in code), no file paths, no tokens, no webhook URL, no screenshot content beyond the account and app names. Chunked under 1900 characters per message.
Install (per workstation)
Section titled “Install (per workstation)”install -m 0755 scripts/store-vps-health.sh ~/.local/bin/store-vps-health.sh# write the two units below to ~/.config/systemd/user/, then:systemctl --user daemon-reload && systemctl --user enable --now store-vps-health.timersystemctl --user list-timers | grep storestore-vps-health.service:
[Unit]Description=Daily store-health check of the store VPS fleet (read-only; Discord post)After=network-online.target
[Service]Type=oneshotExecStart=%h/.local/bin/store-vps-health.sh# 9 machines x several shots + vision calls: give the run room.TimeoutStartSec=45min# 10 = issues found and posted, not a failureSuccessExitStatus=10store-vps-health.timer:
[Unit]Description=Daily 09:00 (UTC+7, machine timezone) store-health check
[Timer]OnCalendar=*-*-* 09:00:00Persistent=true
[Install]WantedBy=timers.targetThe service sets TimeoutStartSec=45min for nine machines (several shots each). Exit 10 is success
for the unit (SuccessExitStatus=10), as with max-network-watch. Before the release ships the skill
to ~/.claude/skills/, run from a deploy copy: copy scripts/ and store-vps-health.config.json to
~/.local/share/store-vps-health/ and add Environment=STORE_VPS_HEALTH_HOME=%h/.local/share/store-vps-health
under [Service] (the wrapper reads that variable; it defaults to the released skill path).
cd .claude/modules/store/skills/t1k-marketing-store-vps-health/scripts/testsbun test health-core.test.mjs check-machine.test.mjscheck-machine.test.mjs pins the safety order (no typing before the verified run dialog, no
interaction on skipped or stopped machines, every capture discarded). Removing the run-dialog guard
turns both guard tests red.
Hard rules
Section titled “Hard rules”- RDP is single-session. A shot or input can evict a person working on that machine. The user
accepted this for the daily run;
--onlylets a human pick the time. - Input lands in whatever is focused. That is why the run dialog is verified before typing.
- Policy-status page not recorded yet. The daily run reads only the developer home. Discover the
policy-status URL on one machine and set
_policyStatusUrlin the config (rename topolicyStatusUrlto activate it; the code does not read it until then). - A frozen remote desktop is
unchecked, not a false clean. The run reports it instead of guessing; a human must reconnect that machine. - Ctrl+T is unverified on Windows and on a machine with a modal open. Confirm with one
--onlydry run on a Windows machine before trusting that path. - A session-lost console is a finding (
type: session): the console says the user was disconnected.
Executed by
Section titled “Executed by”Unattended: the systemd timer runs the script (no model tokens). Interpreting the Discord output and any console issue stays with the main session. Acting on an issue (a policy appeal, a release change) is a separate, user-approved step under the store-write rules, never from this skill.