One piece of copy, one comparison against Xiaohongshu / Douyin / WeChat Official Account banned word standards, producing a comparison table + an all-platform safe rewrite.
Process
- Receive copy. Give the entire article directly, no need to truncate it yourself — the CLI will automatically split it into segments (see below).
- Per-platform detection— for
xiaohongshu、douyin、gongzhonghaocallonceeach, all hitting the Doubaoya API. When the user has not specified platforms, first ask which ones they want; by default all three platforms are each billed once. - Risk comparison— put the results from each platform side by side into one table: platform / verdict / risk category / matched words / suggestions.
- Unified rewrite— this duck synthesizes all platforms'marketing-context hits, and providesa version that can be published on all platforms once rewrittensafe copy.
Each platform is an independent billed call. When the user only cares about certain platforms, use
--platformsto narrow the scope. When the copy exceeds 2000 characters, each call will also be split further by segment,billing count = number of platforms × number of segments, and the confirmation state will list them segment by segment.
Run script
$SKILL_DIR = this package directory (the directory given when the host loads this SKILL.md). Requests are sent on your behalf by the CLI:
node "$SKILL_DIR/scripts/dby.mjs" banned check <文案> [--platforms a,b]; only read this when bypassing it and constructing requests yourself dby-gateway/references/protocol.md。
# 默认三平台全查——不带 --confirm 先停在确认态,逐平台各列一次计费,不产生任何请求
node "$SKILL_DIR/scripts/dby.mjs" banned check "这款美白神器三天见效,全网最低价,无效退款"
# 核对无误后原样加 --confirm 才真打(逐平台各计费一次)
node "$SKILL_DIR/scripts/dby.mjs" banned check "这款美白神器三天见效,全网最低价,无效退款" --confirm
# 只查指定平台(逗号分隔,省额度)
node "$SKILL_DIR/scripts/dby.mjs" banned check "你的文案" --platforms xiaohongshu,douyin --confirm
- Stops by default at the confirmation state: the receipt lists the per-platform billing that is about to occur; after checking, add
--confirmexactly as-is to release it;--confirmbefore that, zero requests, zero charges. - After confirmation, for each platform
POSTonce, aggregate all platform results into one map and put it into{ok,data|error}envelope'sdata.rawin andcontent/originalContentthe two duplicate keys are stripped by default; add--rawto keep them. - Failure of a single platform does not affect other platforms: the failed platform is recorded in the map as
error, and the rest are returned as usual.
API contract
- Address:
POST https://doubaoya.com/api/apis/tool/check-banned-words/call - Authentication: request header
Authorization: Bearer $DOUBAOYA_API_KEY - Request body (once per platform, parameters strictly as follows):
{ "platform": "xiaohongshu", "content": "<待检测文案>" }
platform Values iterate in order:"xiaohongshu"、"douyin"、"gongzhonghao"。
🔴 content singlemaximum 2000 characters(upstream hard limit; the server rejects with 400 before deducting credits) — long text is handed to the CLI
for automatic segmentation, see references/long-text.md。
- Return envelope:
{
"success": true,
"requestId": "req_xxx",
"data": {
"source": "contentSafety.sensitiveWords",
"content": "这款美白神器三天见效,<span class=\"sensitive-word\">全网</span><span class=\"banned-word\">最低</span>价",
"originalContent": "这款美白神器三天见效,全网最低价",
"prohibitedWordsType": ["禁用词", "敏感词"],
"raw": {}
},
"error": null
}
Every call first checks success: when it is true , read data these five fields (just these five);
when it is false , read error.code / error.message。
| Field | Meaning |
|---|---|
originalContent |
Unannotated original text |
content |
Annotated body text, with hits wrapped by <span> —the onlyIt can pinpoint where "which words hit." The class names carry information:banned-word = prohibited word,sensitive-word = sensitive word,industry-banned-word = industry-prohibited word, corresponding one-to-one with the categories in prohibitedWordsType ⇒ it can state word by word which category it belongs to |
prohibitedWordsType |
Hit riskCategoryarray (category names, not the hit words) |
source / raw |
Source identifier and upstream raw response |
🔴 The APIdoes not returnthe three types of fields "risk level," "hit word list," and "replacement suggestions"; do not read fields that do not exist. Hit words must be obtained as described above from
content's<span>; replacement suggestions are provided by you based on context.
🔴 Zero hits are billed as usual (unrelated to the free tier of
NO_RESULT), do not report it as a bug.
Hit grading: which to change, which to only report
Upstream matches by substring and does not consider context. Hits fall into two tiers; the comparison table lists both tiers,rewriting only touches the first tier:
- Marketing-context hit → change: superlative terms / efficacy promises / medical wording, etc. that fall within selling, promising, or comparative sentences ("lowest in the entire internet," "results in three days").
- Report only, do not change: Degree adverbs outside marketing context ("last step", "first time", "must back up", "completely free and open source" — the 最后 / 第一 / 一定 / 完全) and false hits on English substrings (
Assistanthitsass). The comparison table still lists hit words, and the "suggestion" column says "the context does not constitute an advertising promise; keep it." The inapplicable situations listed in Articles 5 and 6 of the Advertising Absolute Terms Enforcement Guidelines (State Administration for Market Regulation, 2023) also fall into this tier: expressing only business philosophy / wishes ("customer first"), self-comparison within the same brand ("our most expensive model"), consumption tips ("best eating time"), national standard grading terms, product names / trademarks / awards that themselves contain absolute terms, and facts limited by time and region ("No. 1 in sales in this city in 2025"—but it must be provable). - Must change and with aggravated treatment: efficacy / return / effect promises in medical, medical aesthetics, pharmaceuticals, devices, health foods, investment and wealth management, and education and training ("100% effective rate," "guaranteed pass," "guaranteed profit"); Article 11 of the Guidelines explicitly states that these three categories do not count as minor and do not enjoy first-offense exemption from penalty.
- Platform-specific standards, the API may not detect them: Xiaohongshu throttles exaggerated recommendation terms (绝绝子 / yyds / 闭眼买), and bans or deducts points for directing traffic to external sites (add vx / private message / comment 1); Douyin judges "exaggerated expression of efficacy" as low-quality marketing. If any of these categories appear in the copy, even if all three platforms return "no hit," mention it in the "suggestion" column of the comparison table.
How each platform judges whether there is a "hit"
- Has a hit:
prohibitedWordsTypenon-empty array,orcontentandoriginalContentare not equal (either one counts). - Indeed no hit: obtained
contentororiginalContent(proving the detection ran), and neither of the above two conditions holds. - No result obtained: that platform entry contains
error, or bothcontentandoriginalContentare missing/null. 🔴 At this point that platform must always be marked "detection failed,"and must never be filled in as "compliant" / "low", and does not draw compliance conclusions for the user. - only covered part of it(some paragraphs of long copy failed): the entry simultaneously carries
error(BANNED_SEGMENT_FAILED) andcontent: null⇒ likewise fill in "detection failed"; for how to read it, seereferences/long-text.md。
Error handling
The CLI catches network / HTTP errors per platform and per segment, writes the error into the corresponding entry, and continues with other platforms and other segments:
A single-platform, single-segment failure does not affect the rest, and for what to do about error codes, follow dby-gateway/references/protocol.md item 6.
If a problem can't be worked around, or you want to vent → you can mention using dby-feedback to write it up on the spot as feedback (can be ignored, no need to mention it again).
Output template
The script returns a JSON map; this duck must parse it and fill in the template below,dumping the raw JSON directly on the user is forbidden。
1. Per-platform risk comparison table
| Platform | Verdict | Risk category (prohibitedWordsType) | Hit words (extracted from the annotations in content) | Suggestion (given by this duck) |
|---|---|---|---|---|
| Xiaohongshu | [Hit / No hit / Detection failed] | [Categories, comma-separated] | [Hit words, comma-separated] | [Replacement suggestion] |
| Douyin | 【…】 | 【…】 | 【…】 | 【…】 |
| WeChat Official Account | 【…】 | 【…】 | 【…】 | 【…】 |
- Use Chinese for platform names (Xiaohongshu / Douyin / WeChat Official Account).
- The "Verdict" column strictly follows the abovecriteriafill in one of the three, do not invent risk levels — the API does not return levels.
- When a platform goes down the "no result obtained" branch (there is
error, or all body fields are missing), fill that row's verdict withDetection failedand attachcode/which field is missing, 🔴 "No hit" must not be filled in, and results must not be fabricated。 - The "Suggestion" column is given by this duck based on context — the API does not provide suggestions.
- When all platforms are judged as "No hit", still list the comparison table as usual, with the verdict column reading "No hit".
2. All-platform safe rewrite
Synthesizingall platforms' hit words and suggestions, giveone versionof the copy that can be published on all target platforms once revised:
[The entire revised safe copy. Requirements: cover allmarketing-context hitson each platform (the report-only-don't-change tier is kept as is); semantically fluent, tone and style unchanged; do not add emoji, do not rewrite the structure, do not add quotes or code blocks, output directly. Changes may be marked in bold italics.]
Output rules
- First outputthe per-platform risk comparison table, then outputthe all-platform safe rewrite, without outputting an opening or closing remark.
- After the script returns JSON, it must be parsed to fill the template; outputting the raw JSON directly is forbidden.
- The safe rewrite must satisfy all platforms' standards at once: use the platform with the most hits as the baseline for removing words.
- When a certain platform fails, output the results of the other platforms as usual, and note the reason for that platform's failure in the comparison table; 🔴 When any platform's detection fails, you must state at the end: "This platform's detection was not completed, do not treat it as passed", do not write it as publishable on all platforms.
- When all platforms are judged as "no hits": mark it truthfully in the comparison table, and in the safe rewrite section write "The original text is already publishable on all platforms, no changes needed".
- Never echo
DOUBAOYA_API_KEY。
Other
PROVIDER_FAILED(502) is a temporary upstream glitch,a refund has been issued automatically, just retry directly, you will not be charged twice.- The copy is sent via HTTPS to the Doubaoya backend; the script does not persist the original text or results locally.
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 no retry or change in behavior is needed.