Loading...
Loading...
WeChat Official Account Layout Theme Studio · Modify the **default layout style** (colors / headings / quotes / captions) of your WeChat articles based on your spoken descriptions, with instant local preview. The result is finally saved in two places: back to the server + a local theme file. Uses doubaoya.com, authenticate with your own DOUBAOYA_API_KEY. Trigger phrases: /dby-theme, change WeChat article layout, customize theme style, change WeChat color scheme, adjust layout theme, change default layout. Trigger words: customize WeChat article theme, change layout / palette / heading style.
npx skill4agent add zizhanovo/doubaoya-community dby-themethemeJson--themeconfig.mdTheme<section><span>border-left:4px solid {{accent}};border-bottom:1px solid {{border}};padding:0 0 8px 11px;elements.h2.stylewrapBefore<section style='width:32px;height:4px;background:…'>decorations.articleWrapdecorations.articleWraparticleWrap.beforeaftermarginline-heightPOSTPUTrendervalidateThemescripts/validate-theme.mjspositiontext-align:startreferences/theme-schema.mdPUTPOST + isDefault:truereferences/deploy-scope.mddby-gateway/references/protocol.mdGET/POST /api/wechat/themeGET /api/wechat/themesPOST /api/wechat/renderPUTDELETE /api/wechat/theme/:idreferences/crud.mdexport DOUBAOYA_API_KEY="dyh_你的密钥"
BASE="${DOUBAOYA_BASE_URL:-https://doubaoya.com}"
AUTH="Authorization: Bearer $DOUBAOYA_API_KEY"themeJsonthemeIdbenya-cleanthemeJsonisDefault:trueisDefault# a) Read my current default theme (modify on top of it if exists) and force disk backup — theme body is in data.theme.themeJson
BACKUP="/tmp/dby-theme-backup-$(date +%s).json"
curl -s -H "$AUTH" "$BASE/api/wechat/theme" | tee "$BACKUP"
echo "已备份到 $BACKUP —— 改坏了见 references/deploy-scope.md「回滚」一节"
# b) Or list built-in themes, pick one to copy as a starting point (benya-clean recommended — already adapted per Red Lines 1 / 2)
curl -s -H "$AUTH" "$BASE/api/wechat/themes"This skill also includes a WeChat-safe starting template(warm orange editing style; just copy and change the palette).themes/theme.example.json
references/theme-schema.mdpalettenode scripts/validate-theme.mjs /tmp/my-theme.json # follow hints for hard errors; exit 0 = valid# Render sample article with the themeJson being edited, get HTML back, save locally and open visually
curl -s -H "$AUTH" -H 'Content-Type: application/json' \
-d "$(jq -n --arg md "$(cat sample.md)" --slurpfile t /tmp/my-theme.json \
'{markdown:$md, title:"预览", themeJson:$t[0]}')" \
"$BASE/api/wechat/render" | jq -r '.data.html' > /tmp/preview.html
open /tmp/preview.html # macOS; use browser on other platformsDon't include afirst-level heading in#: thesample.mdwill be inserted as h1, and having one in the body would show two big headings. The HTML returned by render is character-for-character identical to the final draft body. Checktitle(e.g., unknowndata.warnings) if present.{{token}}
dby-publishreferences/live-preview.mdreferences/deploy-scope.mdPOSTPUTisDefault:truePOST /api/wechat/renderdby-publish--themeconfig.mdThemereferences/theme-schema.mdelements{{token}}li.markerimg.figureStylehr.htmlpalette{{token}}The theme contract is based on this package's(run it, don't memorize the docs); this skill'sscripts/validate-theme.mjs+references/theme-schema.mdare sufficient to independently complete a theme modification.themes/theme.example.json
| User's Desired End State | Is This Step Enough? | Next Step |
|---|---|---|
| Only need to change the default layout to what I want | ✅ Enough, stop here (takes effect automatically for every render from now on) | — |
| Also want to layout a specific article with this theme and save it to my WeChat draft box | Not enough | |
| Already have typeset content, just want it into the draft box | Not enough | |
| Content not written yet | Not enough | |
| Content hasn't passed banned-word check | Not enough | |
| Unclear about the next step | — | |