packages/desktop/.agents/skills/desktop-brand-builder/SKILL.md
Create a branded desktop package with the least user input possible. The user should usually provide only:
brandId: acme-ai
logo: /absolute/path/to/logo.png
website: https://acme.ai
website is optional. Do not ask for app name, app id, artifact name,
copyright, dock icon, renderer symbol, signing, or local installation unless
the user explicitly asks to override them.
Required fields:
brandId: must match ^[a-z][a-z0-9-]*$logo: local file path; must existOptional overrides:
websiteappNameappIdartifactPrefixtarget: mac, win, linux, or allIf required input is missing, ask once:
请提供:
brandId: 例如 acme-ai,只能小写字母、数字、短横线
logo: 本地 logo 文件路径
website: 可选
Once the required fields are present, proceed without a confirmation step.
Infer missing values deterministically:
appName: title-case the hyphen-separated brandId; acme-ai becomes
Acme AIartifactPrefix: title-case the hyphen-separated brandId and join with
hyphens; acme-ai becomes Acme-AIappId: if website has a valid host, reverse the host labels and append
.desktop; https://acme.ai becomes ai.acme.desktopappId: app.<brandId>.desktopcopyright: Copyright © <current year> <appName>logoUse explicit user-provided override values as-is after basic validation.
Use an isolated build directory under the current working directory so user
changes in the current worktree are not mutated. Default to the qwen-code main
branch; do not clone from craft-agents-oss, OpenWork, or another local
checkout unless the user explicitly asks for that source:
BUILD_ROOT="$PWD/brand-builds/<brandId>-<timestamp>"
mkdir -p "$BUILD_ROOT"
git clone --branch main --single-branch \
https://github.com/QwenLM/qwen-code.git \
"$BUILD_ROOT/qwen-code"
cd "$BUILD_ROOT/qwen-code"
git checkout -B brand-<brandId> origin/main
If the branch fetch or checkout fails, stop and report the failure. Do not
continue as if brand-<brandId> was created.
Create a temporary brand.json in the build directory:
{
"brandId": "acme-ai",
"logo": "/absolute/path/to/logo.png",
"website": "https://acme.ai",
"appName": "Acme AI",
"appId": "ai.acme.desktop",
"artifactPrefix": "Acme-AI",
"copyright": "Copyright © 2026 Acme AI"
}
Install desktop dependencies if packages/desktop/node_modules is missing:
cd packages/desktop
bun install
Then run this skill's bundled brand creation script:
cd /absolute/path/to/qwen-code
bun run packages/desktop/.agents/skills/desktop-brand-builder/scripts/brand-create.ts \
--desktop-root /absolute/path/to/qwen-code/packages/desktop \
--config /absolute/path/to/brand.json
The agent should not hand-edit branding.ts or brand asset files when this
bundled script is available. The bundled script is the source of truth for
patching code and generating resources.
Package with the current host target unless the user requested a target:
CRAFT_BRAND=<brandId> bun run electron:dist:mac
CRAFT_BRAND=<brandId> bun run electron:dist:win
CRAFT_BRAND=<brandId> bun run electron:dist:linux
For target: all, run only targets supported by the current machine or CI
environment. Do not claim cross-platform artifacts were produced unless the
files exist.
After packaging:
packages/desktop/apps/electron/release/.sha256sum or shasum -a 256 for each artifact.hdiutil verify for generated DMG files.brandId: show the regex and ask for a corrected value.logo: ask for a valid local path.packages/desktop/.agents/skills/desktop-brand-builder/scripts/brand-create.ts
is missing, and include the expected command.Do not delete the build directory on failure.