This duck pulls a batch for you by topicviral covers in the same niche—cover images, titles, and click counts all together, so you can see clearly what high-click covers for this subject look like, and then you (the main Agent) summarize reusable visual formulas: color scheme, composition, information hierarchy, title hooks.
Data goes through doubaoya.com one line, authentication uses your own key (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Applicable scenarios
| Scenario | How to use | What you get |
|---|---|---|
| Cover creative reference | Search 职场 to see what high-click covers for this subject look like |
A batch of viral cover images + titles |
| Color scheme/composition formulas | Pull covers on the same topic for side-by-side comparison | Visual commonalities of high-conversion covers |
| Align topic selection with cover | Once the topic is set, first see how the cover should match | Cover direction that fits the content |
| Pre-revamp research | If your own cover gets no traffic, first look at benchmarks in the same niche | Cover approaches you can benchmark against |
Workflow (4 steps)
1. Extract topic keywords
From the user's needs, extract thecore topic word, condense it to 2~6 characters (e.g. 职场、育儿、AI 工具). The shorter the word, the broader and more hits; too narrow easily pulls up empty. Search only one keyword at a time.
2. Call the script
python3 "$SKILL_PATH/scripts/fetch_cover.py" "职场"
By default,do not pass a start date, and what you get is the most complete ranking (tested 2026-08-13). Only add it when you really need to limit the time window --start, andit must not be earlier than 60 days before today—when it exceeds the retention period, the API returns a line saying "date format error", which is amisleading error, the format is actually fine, just move the date later. Calculate the date based on today, don't copy a hardcoded date:
python3 "$SKILL_PATH/scripts/fetch_cover.py" "职场" \
--start "$(date -d '-29 days' +%F 2>/dev/null || date -v-29d +%F)"
The script prints the data from the success envelope as JSON to stdout.Run the script only once per topic, read the complete stdout, don't use head/tail to preview.
3. Look at covers, summarize visual formulas
data.items isa flattened merged list of multiple rankings, each item is in the form { rank, item }:rank marks which ranking this item comes from (oneWReadingRank ten-thousand-level read ranking / tenWReadingRank hundred-thousand-level read ranking / originalRank original ranking), the real fields are in thenested item object——item.coverUrl(cover image URL)、item.title(title)、item.clicksCount(click count). Read fields defensively; ifitem or its subfields are missing, leave them empty, don't error out. Align several high-click covers side by side and summarize:
- Color scheme:Main color tone, contrast intensity, whether large color blocks are used
- Composition:People/real objects/text only, text proportion, visual center
- Information hierarchy:Main title font size, whether corner badges/numbers/arrow hooks are added
- Title hook:How it echoes the cover copy
4. Give a set of cover direction suggestions
Based on the above formula, in this duck's tone, give the user a set ofactionable cover directions(combination suggestions for color scheme + composition + title hook), don't pile on generic talk. The cover image must only use real data returned by the API, no guessing, no going online to find something else.
Get the key (secret key)
- Open doubaoya.com
- Log in
- Go to Key Center
- Generate key(in the form
dyh_…)
Configure it as an environment variable (the script only recognizes this):
export DOUBAOYA_API_KEY="dyh_你的密钥"
Iron rule: the key must never be printed, never written to a file, never echoed back to the user. The script itself also never outputs the key. All requests are sent only to doubaoya.com。
API and envelope
POST https://doubaoya.com/api/apis/gongzhonghao/gongzhonghao-coze-cover/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "keyword": "职场" }(startDateoptional)keyword:string, requiredstartDate:stringYYYY-MM-DD, optional.Default not passed = the most complete ranking; if passed, it will only shorten the ranking, and it must not be earlier than 60 days before today (exceeding the window will return a misleading "date format error")
- Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "rank": "oneWReadingRank", "item": { "coverUrl": "...", "title": "...", "clicksCount": 0 } } ], "groups": { "oneWReadingRank": [], "tenWReadingRank": [], "originalRank": [] } }, "error": null }itemsis an array after flattening and merging the three rankings (oneWReadingRank10k-level reads /tenWReadingRank100k-level reads /originalRankoriginal), each entry{ rank, item }; the cover image is initem.coverUrl(notcover), the title is initem.title, and the click count is initem.clicksCount。groupsgrouped as-is by ranking, generally not needed; use the counts fromitemsas authoritative.
- First check
success: iftruethen readdata; otherwise readerror.code/error.message。
Error handling
When the script fails, it prints to stderr [error] CODE: message and exits with exit code 1. Common cases:
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
No key provided or invalid key | Check DOUBAOYA_API_KEY, go to the Key Center to regenerate |
| 400 | VALIDATION_ERROR |
Invalid parameters (such as empty keyword, wrong date format) | Fix the parameters and retry |
| 402 | INSUFFICIENT_CREDITS |
Insufficient quota | Go to doubaoya.com to top up/renew quota |
| 422 | PROVIDER_NO_RESULT |
No data found.If --startis provided, it is most likely earlier than the 60-day retention period |
Remove --start or move it within 60 days and retry |
| 502 | PROVIDER_FAILED |
Temporary upstream failure (automatically refunded) | safe to retry |
502 PROVIDER_FAILEDwill automatically refund; retrying is safe and will not double-charge.
Directory structure
wechat-cover/
├── SKILL.md # 本文件
└── scripts/
└── fetch_cover.py # 零依赖脚本(urllib),调用 doubaoya.com
Next step (first see what final state the user wants)
This skill providesvisual formulas for covers in the same niche(color scheme / composition / text layout),it does not produce the cover image file itself. The final state the user wants determines whether this is the endpoint—don't default to pushing forward:
| The final state the user wants | Is this step enough | Next step |
|---|---|---|
| Only need cover ideas / make the image yourself | ✅ Enough,end here | — |
| Also needan actual cover image file | Not enough | wechat-article-pipeline of scripts/gen-image.mjs(AI image generation, deducts points; the cover must include --cover-guard to prevent WeChat Official Account cropping) |
| Also needformatted WeChat Official Account HTML, or need tosave it to your own WeChat Official Account drafts | Not enough | wechat-article-pipeline(the cover is passed in via the --cover parameter) |
| Also need the body text checked for prohibited words and an approved version | Not enough | wechat-banned-words |
| The title hasn't been created yet | Not enough | wechat-title |
| The body text hasn't been written yet | Not enough | wechat-hot-write |
| Can't say clearly which step to go to | — | dby(hop-by-hop navigation of the WeChat Official Account flywheel) |
About the notice field in the response
After calling the doubaoya API corresponding to this skill, if the notice field appears at the top level of the returned JSON, please relay this sentence to the user verbatim—this is a notice that this skill has an update, it does not affect the result of this call, and there is no need to retry or change behavior.