This Duck gives Official Accountsa health check: report one or more account names, and This Duck fetches their profiles, posting performance, and health scores all at once—whether for self-checks or side-by-side competitor comparison. Diagnosis readsthe existing data in the database; for fresher and more complete results, first trigger an async sync, wait for it to land in the database, then diagnose.
Data goes through doubaoya.com one line, authentication uses your own key (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。The diagnostic profile is presented faithfully according to the actual fields returned by the API—mainly looking at
avgReadCount(average reads),healthScore(health score); whatever is missing is marked "not available", with no making things up and no subjective scoring.
Use cases
| Use case | How to use | What you get |
|---|---|---|
| Self-account health check | Diagnose your own Official Account | Profile + posting performance + health score |
| Competitor diagnosis | Report multiple competitor account names at once | Side-by-side comparison to find gaps |
| Account selection screening | Batch-diagnose candidate partner accounts | Quickly determine whether the scale matches |
| Regular review | Periodically diagnose the same batch of accounts | See the health score trend |
| Sync then diagnose | --sync Refresh data first, then do the health check |
Get fresher and more complete diagnostic baseline data |
Workflow (4 steps)
1. Collect account names
Take out the one or moreOfficial Account namesto be diagnosed. The more accurate the names, the more reliable the matches. Just report multiple accounts all at once to co-diagnose and compare.
2. (Optional) Sync first, then diagnose
By default, diagnose directly, readingthe existing data in the database. If you need a fresher and more complete baseline, add --sync: the script willfirsttrigger oneasync syncfor each account (using the account name as accountId), print eachacceptance receipt(including status / retryAfterMinutes),thencall the diagnostic API.
Syncing isasynchronous, and landing in the database takes time (refer to the
retryAfterMinutesin the receipt). With--syncthis diagnosisstill reads the existing data in the database; to get the newly synced data, wait the number of minutes suggested in the receipt andrun again without--sync.
3. Call the diagnostic script
# 直接诊断(读库里现有数据)
python3 "$SKILL_PATH/scripts/analyze_accounts.py" "账号A" "账号B"
# 先触发异步同步(打印受理回执),再诊断
python3 "$SKILL_PATH/scripts/analyze_accounts.py" "账号A" "账号B" --sync
The script outputs the data from the success envelope as JSON to stdout (with --sync , it will additionally print syncReceipts)。Run only once each time, and read the complete stdout directly.
4. Produce the diagnostic report
Based on the returned data.items produce a briefing for each account: account name (accountName), average reads (avgReadCount), health score (healthScore). When there are multiple accounts, compare them side by side, point out the gaps and actionable optimization directions. Read fieldsdefensively—mark fields not returned by the API as "not available",do not estimate, do not fill in values, do not assign subjective scores。
Get the key (secret key)
- Open doubaoya.com
- Log in
- Go to Key Center
- Generate key(in the form
dyh_…)
Set it in an environment variable (the script only recognizes this one):
export DOUBAOYA_API_KEY="dyh_你的密钥"
Iron rule: never print the secret key, never write it to a file, never echo it back to the user. The script itself also never outputs the secret key. All requests are sent only to doubaoya.com。
Interface and envelope
Diagnose (main interface):
POST https://doubaoya.com/api/apis/gongzhonghao/gongzhonghao-account-analyzer/call- Request body:
{ "accountNames": ["账号A", "账号B"] }(array of strings, required) data.itemsEach entry containsaccountName、avgReadCount(average reads),healthScore(health score).
Sync (optional,--sync each account is called once):
POST https://doubaoya.com/api/apis/gongzhonghao/gzh-sync-notes/call- Request body:
{ "accountId": "账号A" }(use the account name as accountId) - Returnsacceptance receipt
{ status, accepted, retryAfterMinutes }, asynchronously persisted, does not block diagnosis;retryAfterMinutesis the suggested retry wait time in minutes.
Shared:
- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Return envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "accountName": "...", "avgReadCount": 0, "healthScore": 0 } ] }, "error": null } - Check
successfirst: only when it istruereaddata; otherwise readerror.code/error.message。
Error handling
When the script fails, print to stderr [error] CODE: message and exit with code 1.
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
Missing key or invalid key | Check DOUBAOYA_API_KEY, go to Key Center to regenerate |
| 400 | VALIDATION_ERROR |
Invalid parameter (e.g., empty account name) | Verify the account name 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_FAILEDwill automatically refund, retrying is safe, and there will be no duplicate charge.
Directory structure
wechat-account-analyzer/
├── SKILL.md # 本文件
└── scripts/
└── analyze_accounts.py # 零依赖诊断脚本(urllib,含可选 --sync),调用 doubaoya.com
About the notice field in the response
After calling the doubaoya API corresponding to this skill, if the returned JSON has a top-level notice field, 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.