WorkBuddy Daily Check-in
Overview
Claim WorkBuddy's daily check-in points without manually opening the client.
The skill reads the desktop login token that the WorkBuddy client already
writes to disk, calls the official check-in endpoint, and is fully idempotent
— running it again the same day never double-claims or deducts points.
When to use
- User says "帮我签到" / "领今日积分" / "今天签到领了吗"
- User wants "设置每天自动签到" / "以后每天自动领积分" (unattended automation)
- User reinstalled or switched machines and wants to restore daily check-in
How to use
A. Claim once, right now (on demand)
Run the bundled script directly:
python scripts/workbuddy_daily_checkin.py
To preview the request without calling the API (safe, no points claimed):
python scripts/workbuddy_daily_checkin.py --dry-run
B. Make it fully automatic (daily, unattended)
On Windows, register a background scheduled task that runs the check-in every
day at 09:10:
powershell -ExecutionPolicy Bypass -File scripts/setup_checkin.ps1
To stop the automation later:
Unregister-ScheduledTask -TaskName "WorkBuddyDailyCheckin" -Confirm:$false
How it works
- Token source. The script reads
%LOCALAPPDATA%\CodeBuddyExtension\Data\Public\auth\workbuddy-desktop.info
(a JSON file the desktop client writes on every launch) and extracts
auth.accessTokenplusauth.tokenType(usuallyBearer). - Endpoint.
POST https://www.codebuddy.cn/v2/billing/meter/daily-checkin
with an empty JSON body{}and header
Authorization: <tokenType> <accessToken>. - Idempotency. If already checked in today, the server returns
code=10001("今天已签到,请明天再来"). The script detects this, logs it,
and exits 0. Repeating is safe. - Logging. Every run appends a line to
checkin.lognext to the script.
Reward rules (current, may change — verify in client)
- Days 1–6 of a 7-day cycle: 100 points each
- Day 7: 1,000 points
- Single cycle total: 1,600 points (~3,000–4,000 points/month)
- Missing a day resets the streak (no day-7 bonus that cycle)
Important notes / failure handling
- Token lifetime ~60 days, auto-refreshed as long as the desktop client is
used. If the client is not opened for 60+ days, the token expires; the script
logs "token expired" and exits 4 — open WorkBuddy once to refresh, then retry. - Run as the user. The scheduled task uses an S4U principal for the current
user so it can read%LOCALAPPDATA%. Do not run it as SYSTEM/another account. - Network required. The task needs internet at run time;
StartWhenAvailable
defers it if the machine is off/sleeping at 09:10. - Security. The token is the user's own WorkBuddy login credential stored
locally by the official client. This skill only reads it to call the official
endpoint on the user's behalf. Do not copy the token off-machine or commit it
to any repository.
References
scripts/workbuddy_daily_checkin.py— idempotent claim script (logs tocheckin.log)scripts/setup_checkin.ps1— Windows Task Scheduler registration helper