WorkBuddy Skin Studio
Overview
> 免责声明: 本技能为社区第三方封装,与 WorkBuddy / 腾讯官方无任何隶属或关联,并非官方出品。所有主题与流程均来自 MIT 协议开源项目。
本技能为 WorkBuddy 桌面端 安装并应用第三方社区主题皮肤。它封装了开源项目 cdredfox/workbuddy-skin-studio(MIT 协议,<https://github.com/cdredfox/workbuddy-skin-studio>)。
工作原理与安全边界: 内置的 Node 启动器(scripts/apply-node.mjs)定位 WorkBuddy.exe → 以 --remote-debugging-port=9223 重启 → 通过 CDP 向运行中的渲染进程注入 CSS。它不修改官方安装目录、二进制文件或数字签名;不读取也不传输任何用户凭证、文件或网络数据;所有操作严格限定在本机。主题仅在当次运行有效——手动重启 WorkBuddy 会清除皮肤(重新执行 apply 即可恢复)。
来源与授权: cdredfox/workbuddy-skin-studio 是独立的社区开源项目,采用 MIT 协议。本技能仅自动化其官方文档记载的流程,不内置、不修改其代码。
The skill bundles a Node-based launcher (scripts/apply-node.mjs) that is the reliable way to apply a theme. Do not use the repo's apply.ps1 — see Gotchas.
When to use
- User asks to install / apply a WorkBuddy skin or theme (from an article, link, or directly).
- User wants to change WorkBuddy appearance, switch themes, or revert to the native look.
- User references "workbuddy-skin-studio", a 🎨 menu, or CDP skin injection.
Workflow
1. Clone the tool to an ASCII path
Clone to a path with no Chinese / non-ASCII characters — Node fails to load theme files from Unicode paths.
git clone --depth 1 https://github.com/cdredfox/workbuddy-skin-studio.git C:/Users/<user>/workbuddy-skin-studio
Record the cloned root as REPO (e.g. C:/Users/15469/workbuddy-skin-studio).
2. Locate WorkBuddy.exe
Default detection (LOCALAPPDATA, ProgramFiles) often misses the real install. Locate it explicitly:
# Glob common and DevTools locations; fall back to a full-disk search
Glob **/WorkBuddy.exe under C:\ and D:\
If still not found, ask the user for the exact path. Set it as WB_EXE.
3. Verify the CLI (read-only)
node <REPO>/src/cli.mjs --check # syntax sanity
node <REPO>/src/cli.mjs list # confirm bundled themes are detected
node <REPO>/src/cli.mjs status # should show CDP port 9223 not yet open
4. Apply a theme (the critical step)
Run the bundled launcher detached so it survives the WorkBuddy restart. Replace <theme> with e.g. naruto-hokage, miku-light, genshin-night, deepspace-star.
cmd //c 'start "" "<NODE>" "<SKILL_DIR>/scripts/apply-node.mjs" <theme>'
Where <NODE> is any Node ≥ 18 (or process.execPath of the managed runtime) and <SKILL_DIR> is this skill's directory. Pass environment if needed:
WB_EXE— path to WorkBuddy.exe (auto-detected if omitted)WB_REPO— cloned repo root (defaults to current directory)PORT— CDP port (defaults to 9223)
The launcher will: kill WorkBuddy → relaunch it with --remote-debugging-port=9223 → wait for the renderer → run node <REPO>/src/cli.mjs apply. Progress is written to <SKILL_DIR>/apply-log.txt and a result to <SKILL_DIR>/apply-result.txt.
Why detached? The agent session is hosted inside the WorkBuddy process tree. Launching the restart inside the session (even via a background task) kills the session at the kill step, before injection completes. start "" breaks the process out of that tree so it finishes on its own.
5. Verify
After WorkBuddy reopens (a few seconds), confirm the 🎨 menu in the top-right corner. Optionally probe CDP:
curl -s -m 3 http://127.0.0.1:9223/json/list
If no 🎨 menu appears, read <SKILL_DIR>/apply-result.txt (OK … vs FAIL …) and <SKILL_DIR>/apply-log.txt.
6. Change theme / restore
- Switch or upload a theme: use the in-app 🎨 menu.
- Restore native look:
node <REPO>/src/cli.mjs pause - After any manual WorkBuddy restart, re-run step 4 to restore the skin.
Gotchas (learned the hard way)
- Never run
apply.ps1from the repo. PowerShell 5.1 mis-parses$env:ProgramFiles(x86)and related patterns, throwing spurious "unexpected}" errors at thewhile/elsecloses. The bundled Node launcher avoids PowerShell entirely. - ASCII-only clone path. Chinese paths (e.g.
F:\缓存\...) make Node unable to read theme files. - Session is in WorkBuddy's tree. Killing WorkBuddy ends the agent session. Always apply via detached
start, never inline. - CDP is localhost-only. The debug port binds
127.0.0.1; avoid running untrusted local programs while a skin is active. - Skin is per-run. Manual restart of WorkBuddy drops the skin.
Safety
安全评估(低风险):
- 仅本地操作: 通过本机回环地址(127.0.0.1)的 CDP 重启 WorkBuddy 并注入 CSS。无任何网络外连、无遥测上报。
- 不访问凭证: 不读取密码、Token 或任何用户文件。
- 不改动官方文件: 官方安装目录与签名保持不变,仅对内存中的渲染进程做主题化。
- 透明可审计: 所有动作与上游项目文档步骤一致;可审阅 scripts/apply-node.mjs。
- 调试端口绑定回环: 皮肤生效期间,避免运行来源不明的本机程序。
The tool is community open-source (MIT), injects only the running renderer, and does not touch official files or credentials. It restarts WorkBuddy as part of applying a theme — expect a brief UI restart.