SuperAPI AI Directory

wechat-hot-write

General & other

View repository

Updated 10-16 08:02

About this skill

WeChat Official Account Writing Assistant (Doubao Ya)

Don't just force out a WeChat Official Account article from thin air. This duck's approach islook at the market before writing: use your topic to pull recent same-topicviral articlesback as samples, then have the main Agent reverse-engineer from this batch of articles that actually gained traction—how to craft the title, which angle to cut the topic from, how to build the body, and finally land on a publishable draft. The script is only responsible for retrieving the viral article samples; the extraction and writing are done by the main Agent on the samples.

Data goes through doubaoya.com in one line, authentication uses your own key (environment variable DOUBAOYA_API_KEY, in the form dyh_…)。

If you only want to see the viral article rankings without writing, use wechat-hot-article(same interface, positioned as "search"); this duck is positioned as "write"—taking one extra step to turn samples into a draft.


Applicable scenarios

Scenario How to use What you get
Craft titles Pull same-topic viral articles, reverse-engineer high-open-rate title formulas Several directly usable title directions
Find topic angles See which angle this batch of viral articles cuts from A topic angle that hasn't been written to death yet
Build body structure Break down the opening/argument/closing skeleton of top viral articles A reusable body structure
Reference and imitate Write a new same-topic draft using viral articles as samples A complete publishable article
Content selection See which subtopic has already gained traction Judge whether this topic is worth writing

Workflow (4 steps)

1. Understand the writing intent, extract topic keywords

First figure out what the userwants to write, who it's for, and what goal they want to achieve, then extracttopic keywords(condense to 2~6 characters, e.g. AI 工具、职场沟通). Pull only one topic at a time.

2. Pull same-topic viral article samples

# 默认:最近 7 天的同主题爆文(end=今天,start=今天往前 6 天)
python3 "$SKILL_PATH/scripts/hot_write.py" "AI 工具"

# 指定时间区间
python3 "$SKILL_PATH/scripts/hot_write.py" "AI 工具" --start 2026-06-01 --end 2026-06-20

The script outputs data(this batch of viral article samples) from the success envelope as JSON to stdout.Run only once, read the complete stdout directly.

3. Extract writing points from the samples

Extract on the samples (data.items), focusing on three things:

  • Title formulas: the common structure of the top few titles (numbers / contrast / pain points / suspense / identity代入), extract 2~3 usable frameworks.
  • Topic angles: which angle this batch of viral articles cuts from; which angle has high density (already crowded), which is still sparse (can be seized).
  • Body structure: break down the skeleton of 1~2 top viral articles—how the opening hooks people, how the middle argues/gives examples, how the ending closes/guides.

fields withdefensive reading, skip if missing, don't throw errors.

4. Produce title candidates + topic angles + body skeleton (write the full draft as needed)

Give the user: 35 title candidates + 12 recommended topic angles + a body structure skeleton. When the user wants a complete draft, then write the whole piece in the sample style based on the chosen title and skeleton. Throughout,ground everything in the sample, don't drift away from the data and talk in empty formulas.


Get the key (secret key)

  1. Open doubaoya.com
  2. Log in
  3. Go to Key Center
  4. Generate key(in the form dyh_…)

Put it into an environment variable (the script only recognizes this):

export DOUBAOYA_API_KEY="dyh_你的密钥"

Iron rule: never print the key, never write it into a file, never echo it 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/hot-article/call
  • Auth header:Authorization: Bearer $DOUBAOYA_API_KEY
  • Request body:{ "keyword": "AI 工具", "startDate": "2026-06-21", "endDate": "2026-06-27" }
    • keyword: string, required (writing topic keyword)
    • startDate / endDate:YYYY-MM-DD. The script defaults to endDate=今天、startDate=今天往前 6 天, can be overridden with --start / --end .
  • Return envelope:
    {
      "success": true,
      "requestId": "...",
      "data": { "items": [ { "title": "...", "clicksCount": 0, "watchCount": 0, "likeCount": 0 } ] },
      "error": null
    }
    
  • First check success: if it is true then read data; otherwise read error.code / error.message。

Error handling

When the script fails, it prints to stderr [error] CODE: message and exits with code 1.

HTTP code Meaning Handling
401 MISSING_API_KEY / UNAUTHORIZED No key provided or key is invalid Check DOUBAOYA_API_KEY, go to Key Center to regenerate
400 VALIDATION_ERROR Invalid parameters (e.g., empty topic keyword, wrong date format) Fix and retry
402 INSUFFICIENT_CREDITS Insufficient quota Go to doubaoya.com to top up/renew quota
502 PROVIDER_FAILED Temporary upstream failure (automatically refunded) safe to retry

502 PROVIDER_FAILED automatically refunds, retrying is safe, and you won't be charged twice.


Directory structure

wechat-hot-write/
├── SKILL.md                  # 本文件
└── scripts/
    └── hot_write.py          # 零依赖取样脚本(urllib),调用 doubaoya.com

Next step (first look at what final state the user wants)

What this skill delivers isa Markdown body. First compare it with the final state the user wants before deciding whether to take the next step—don't push forward by default:

Final state the user wants Is this step enough Next step
Just wants the draft / will edit it themselves ✅ Enough,end here —
Also wants a title that can better lift the open rate Not enough wechat-title
Also wants a cover (same-track viral cover formula) Not enough wechat-cover
Also wants confirmation that no prohibited words are used and a version of the body that passes review Not enough wechat-banned-words
Also wantsformatted WeChat official account HTML, or wantsit saved into their own WeChat official account drafts Not enough wechat-article-pipeline
Also wants to first change the default layout color scheme / title style Not enough wechat-theme-studio
Can't say clearly how far they want to go — dby(the step-by-step navigation of the WeChat official account flywheel)

If unsure,ask"For this piece, do you want the draft, or do you want me to directly format it and save it into your WeChat official account drafts?"— wechat-article-pipeline willWrite to the user's own official account backend(save only as a draft, never mass-send), is a step with real side effects; do not run it on the user's behalf when the user has not expressed this intent. The title / cover / compliance three items are independent of each other; fill in whichever is missing.

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 prompt that there is an update to this skill, it does not affect the result of this call, and no retry or change in behavior is needed.