WorkBuddy Daily Check-In
> 自动签到,告别手动——无需打开 WorkBuddy 窗口,一行命令完成每日签到。
Overview
This skill automates the WorkBuddy daily check-in process entirely via API — no GUI, no manual clicks, no browser automation.
It works by decrypting the locally stored access token (Windows DPAPI → AES-GCM), calling the check-in API endpoint, and reporting the result. Supports:
- Manual one-shot check-in
- Automated scheduling via WorkBuddy's built-in automation engine
- Streak day tracking and bonus credit detection
- Optional WorkBuddy window cleanup after check-in
Requirements
- OS: Windows only (requires DPAPI and Chromium-based token storage in
%APPDATA%\WorkBuddy) - Python: 3.7+ with the
cryptographypackage (pip install cryptography) - Precondition: Must have logged into WorkBuddy at least once (token is read from local storage)
Usage
Manual Check-In
python scripts/checkin.py [--close]
| Flag | Effect |
|---|---|
| (none) | Run check-in, print result to stdout, keep WorkBuddy open |
--close |
Run check-in, then close all WorkBuddy windows via Win32 API |
Automation Setup
Set up a recurring automation in WorkBuddy to run daily:
- Open WorkBuddy → Automations → New Automation
- Schedule: daily at 08:00 (or your preferred time)
- Script:
python scripts/checkin.py --close - Workspace: point to the skill's root directory
The AI agent will use this skill when the user says "签到" (check-in), "每日签到", "查询签到状态", or any check-in related request.
Environment Variables (optional)
| Variable | Description | Default |
|---|---|---|
WORKBUDDY_LOCAL_STATE |
Path to Local State file |
%APPDATA%\WorkBuddy\Local State |
WORKBUDDY_TOKEN_DB |
Path to token database | %APPDATA%\WorkBuddy\User\globalStorage\state.vscdb |
WORKBUDDY_OUT_DIR |
Log output directory | scripts/logs/ |
How It Works
Login Token (encrypted in Chrome DB)
↓ DPAPI Decrypt (Windows native)
AES Key
↓ AES-GCM Decrypt
Access Token (Bearer)
↓ POST /v2/billing/meter/checkin-status
Check current state
↓ POST /v2/billing/meter/daily-checkin (if not yet checked in)
Result: +credits, streak days, bonus
Status Codes
| Code | Meaning |
|---|---|
today_checked_in = true |
Already signed in today — skips |
code = 0 |
Check-in successful ✅ |
code != 0 |
Check-in failed — check logs |
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
未找到 accessToken |
Not logged in / token storage changed | Log in to WorkBuddy once |
HTTP 4xx |
Token expired | Re-login in WorkBuddy |
DPAPI error |
Non-Windows OS | Not supported — Windows only |
cryptography not found |
Missing dependency | pip install cryptography |