Multi-platform Banned Word Detection
One piece of content, compared against Xiaohongshu / Douyin / WeChat Official Account banned word standards at once, output a comparison table + a rewritten version safe for all platforms.
Workflow
- Receive the content.
- Detect per platform - call the Doubaoya API once for each of , , .
If the user doesn't specify platforms, first ask which ones they want; by default, each of the three platforms is billed once.
- Risk comparison - put the results of each platform side by side in a table: platform / verdict / risk category / matched words / suggestions.
- Unified rewrite - synthesize all platforms' marketing-context hits, and provide one safe version that can be published on all platforms after revision.
Each platform is an independently billed call. If the user only cares about certain platforms, use
to narrow the scope.
Run Script
= this package directory (the directory given by the host when loading this SKILL.md). The request is sent via the CLI:
node "$SKILL_DIR/scripts/dby.mjs" banned check <content> [--platforms a,b]
;
only read
dby-gateway/references/protocol.md
when building requests yourself outside of it.
bash
# Default: check all three platforms - without --confirm, stop at confirmation state, list billing per platform, no requests are made
node "$SKILL_DIR/scripts/dby.mjs" banned check "这款美白神器三天见效,全网最低价,无效退款"
# After verifying, add --confirm as-is to actually make the call (each platform is billed once)
node "$SKILL_DIR/scripts/dby.mjs" banned check "这款美白神器三天见效,全网最低价,无效退款" --confirm
# Only check specified platforms (comma-separated, saves quota)
node "$SKILL_DIR/scripts/dby.mjs" banned check "你的文案" --platforms xiaohongshu,douyin --confirm
- Default stops at confirmation state: the receipt lists the per-platform billing that will occur; after verification, add as-is to proceed;
before , zero requests and zero charges.
- After confirmation, once per platform, aggregate all platform results into a map stored in the field of the envelope.
Two keys in that duplicate / are stripped by default; add to keep them.
- A single platform failure doesn't affect other platforms: failed platforms record in the map, others return normally.
API Contract
- Endpoint:
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):
json
{ "platform": "xiaohongshu", "content": "<content to check>" }
The
value iterates in order:
,
,
.
json
{
"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
}
Each call, first check : if
, read the five fields in
(exactly these five);
if
, read
/
.
| Field | Meaning |
|---|
| Original unannotated text |
| Annotated text body, hits are wrapped in - the only place to locate "which words are hit". Class names carry information: = banned word, = sensitive word, = industry banned word, corresponding one-to-one to the categories in ⇒ can tell which category each word belongs to |
| The array of risk categories hit (category names, not the matched words) |
| / | Source identifier and upstream raw response |
🔴 The API
does not return the three fields "risk level", "list of matched words", or "replacement suggestions" - don't read fields that don't exist.
Extract the matched words from the
in
as described above; provide replacement suggestions yourself based on context.
🔴 Zero hits are still billed (unrelated to the
free tier), don't report it as a bug.
Hit Classification: Which to Fix, Which to Report Only
The upstream matches by substring, not context. Hits fall into two tiers; the comparison table lists both tiers, rewrite only addresses the first tier:
- Marketing-context hit → fix: extreme words / efficacy claims / medical terms that fall into selling, promising, or comparative sentences ("全网最低" "三天见效").
- Report only, don't fix: degree adverbs outside marketing context ("最后一步" "第一次" "一定要备份" "完全免费开源" - 最后 / 第一 / 一定 / 完全) and false positives from English substrings ( hits ). Still list matched words in the comparison table, but the "suggestion" column says "context doesn't constitute an advertising claim, keep as-is".
The non-applicable situations listed in Articles 5 and 6 of the 《Guidelines for Law Enforcement on Absolute Advertising Terms》(State Administration for Market Regulation 2023) also fall into this tier:
statements of business philosophy / wishes ("顾客第一"), self-comparison within the same brand ("我们最贵的一款"), consumption tips
("最佳食用时间"), national standard grading terms, product names / trademarks / awards that inherently contain extreme words, time- and region-limited facts
("2025 年本市销量第一" - but must be provable).
- Must fix and treated severely: efficacy / returns / effect promises in medical, medical aesthetics, pharmaceuticals, medical devices, health foods, investment and financial management, and education and training
("有效率 100%" "保过" "稳赚"), Article 11 of the Guidelines states these three categories are not minor and do not enjoy first-offense exemption.
- Platform-specific standards the API may not catch: Xiaohongshu throttles exaggerated grass-planting terms (绝绝子 / yyds / 闭眼买),
silences and deducts points for off-platform diversion (加 vx / 私信 / 留言扣 1); Douyin judges "exaggerated efficacy expression" as low-quality marketing.
If you see these types in the content, even if all three platforms return "no hits", mention it in the "suggestion" column of the comparison table.
How to Determine "Has Hits" for Each Platform
- Has hits: is a non-empty array, or differs from (either condition holds).
- Definitely no hits: both and are present (proving the check ran), and neither of the above conditions holds.
- No result obtained: the platform entry has , or both and are missing / null.
🔴 In this case, mark that platform as "check failed" - never fill in "compliant" / "low", don't draw compliance conclusions for the user.
Error Handling
The CLI catches network / HTTP errors per platform, writes the error into the corresponding platform entry and continues with other platforms:
A single platform failure doesn't affect the rest, see section 6 of
dby-gateway/references/protocol.md
for error codes.
If the issue can't be worked around, or you want to give feedback → you can mention using
to write feedback on the spot (optional, don't repeat it).
Output Template
The script returns a JSON map; this duck must parse it and fill in the template below. Do not dump raw JSON directly to the user.
1. Per-Platform Risk Comparison Table
| Platform | Verdict | Risk Category (prohibitedWordsType) | Matched Words (extracted from content's annotations) | Suggestions (provided by this duck) |
|---|
| Xiaohongshu | [Hit / No hit / Check failed] | [Categories, comma-separated] | [Matched words, comma-separated] | [Replacement suggestions] |
| Douyin | […] | […] | […] | […] |
| WeChat Official Account | […] | […] | […] | […] |
- Platform names in Chinese (小红书 / 抖音 / 公众号).
- The "verdict" column strictly follows the criteria above, choose one of three, don't invent risk levels - the API doesn't return levels.
- When a platform takes the "no result obtained" branch (has , or content fields all missing), mark that row's verdict as check failed and include the /which field is missing;
🔴 don't fill in "no hits", and don't fabricate results.
- The "suggestion" column is given by this duck based on context - the API doesn't provide suggestions.
- If all platforms are judged "no hits", still list the comparison table normally, with "no hits" in the verdict column.
2. All-Platform Safe Rewrite
Based on all platforms' matched words and suggestions, provide one version that can be published on all target platforms after revision:
[The entire rewritten content. Requirements: cover all platforms' marketing-context hits (keep the report-only tier unchanged); semantically fluent, tone and style unchanged;
no emoji, no restructuring, no blockquotes or code blocks, output directly. Changes can be marked in bold italics.]
Output Rules
- First output the per-platform risk comparison table, then the all-platform safe rewrite, with no opening or closing remarks.
- After the script returns JSON, you must parse and fill in the template - never output raw JSON directly.
- The safe rewrite must satisfy all platforms' standards simultaneously: use the platform with the most hits as the baseline to eliminate words.
- When a platform fails, output the other platforms' results normally, and note the failure reason for that platform in the comparison table;
🔴 when a platform fails the check, MUST end with the note "该平台未完成检测,别当它通过" (this platform's check is incomplete, don't treat it as passed), don't write that it's ready for all platforms.
- If all platforms are judged "no hits": state it truthfully in the table, and write "原文已可全平台发布,无需改动" (the original text is already publishable on all platforms, no changes needed) in the safe rewrite section.
- Never echo .
Miscellaneous
- (502) is a temporary upstream hiccup, auto-refunded, just retry, no double charge.
- Content is sent to the Doubaoya backend over HTTPS; the script doesn't persist original text or results locally.
About the notice Field in the Response
After calling the doubaoya API corresponding to this skill, if the top level of the returned JSON contains a
field, relay this sentence verbatim to the user - this is a hint that this skill has been updated, doesn't affect the current call result, and no retry or behavior change is needed.