dby-banned-words
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese多平台违禁词检测
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
- 收文案。
- 逐平台检测——对 、
xiaohongshu、douyin各调用一次都爆鸭接口。 用户没指定平台时先问一句要哪几个,默认三平台各计费一次。gongzhonghao - 风险对照——把各平台结果并排成一张表:平台 / 判定 / 风险类别 / 命中词 / 建议。
- 统一改写——本鸭综合所有平台的营销语境命中,给出一版改完即可全平台发布的安全文案。
每个平台是一次独立计费调用。用户只关心某几个平台时用缩小范围。--platforms
- Receive the content.
- Detect per platform - call the Doubaoya API once for each of ,
xiaohongshu,douyin. If the user doesn't specify platforms, first ask which ones they want; by default, each of the three platforms is billed once.gongzhonghao - 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, useto narrow the scope.--platforms
运行脚本
Run Script
$SKILL_DIRnode "$SKILL_DIR/scripts/dby.mjs" banned check <文案> [--platforms a,b]dby-gateway/references/protocol.mdbash
undefined$SKILL_DIRnode "$SKILL_DIR/scripts/dby.mjs" banned check <content> [--platforms a,b]dby-gateway/references/protocol.mdbash
undefined默认三平台全查——不带 --confirm 先停在确认态,逐平台各列一次计费,不产生任何请求
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 "这款美白神器三天见效,全网最低价,无效退款"
node "$SKILL_DIR/scripts/dby.mjs" banned check "这款美白神器三天见效,全网最低价,无效退款"
核对无误后原样加 --confirm 才真打(逐平台各计费一次)
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
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
- **默认停在确认态**:回执列出将要发生的逐平台计费,核对后原样加 `--confirm` 才放行;
`--confirm` 之前零请求、零扣费。
- 确认后对每个平台 `POST` 一次,把所有平台结果汇成一个 map 装进 `{ok,data|error}` 信封的 `data` 里。
`raw` 里与 `content` / `originalContent` 重复的两键默认剥掉,加 `--raw` 保留。
- **单个平台失败不影响其它平台**:失败的平台在 map 里记 `error`,其余照常返回。
---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 `--confirm` as-is to proceed;
before `--confirm`, zero requests and zero charges.
- After confirmation, `POST` once per platform, aggregate all platform results into a map stored in the `data` field of the `{ok,data|error}` envelope.
Two keys in `raw` that duplicate `content` / `originalContent` are stripped by default; add `--raw` to keep them.
- **A single platform failure doesn't affect other platforms**: failed platforms record `error` in the map, others return normally.
---接口契约
API Contract
- 地址:
POST https://doubaoya.com/api/apis/tool/check-banned-words/call - 鉴权:请求头
Authorization: Bearer $DOUBAOYA_API_KEY - 请求体(每个平台一次,参数严格如下):
json
{ "platform": "xiaohongshu", "content": "<待检测文案>" }platform"xiaohongshu""douyin""gongzhonghao"- 返回信封:
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
}每次调用都先看 :为 时读 里这五个字段(就这五个);
为 时读 / 。
successtruedatafalseerror.codeerror.message| 字段 | 含义 |
|---|---|
| 未标注的原文 |
| 标注版正文,命中处被 |
| 命中的风险类别数组(类别名,不是命中词) |
| 来源标识与上游原始返回 |
🔴 接口不返回「风险等级」「命中词清单」「替换建议」这三类字段,别去读不存在的字段。 命中词要靠上面那条从的content里取,替换建议由你结合上下文给。<span>
🔴 零命中照常计费(与免费口径无关),别当 bug 报。NO_RESULT
- 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: , , .
platform"xiaohongshu""douyin""gongzhonghao"- Response envelope:
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 / .
successtruedatafalseerror.codeerror.message| Field | Meaning |
|---|---|
| Original unannotated text |
| Annotated text body, hits are wrapped in |
| 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 thein<span>as described above; provide replacement suggestions yourself based on context.content
🔴 Zero hits are still billed (unrelated to thefree tier), don't report it as a bug.NO_RESULT
命中分级:哪些改,哪些只报
Hit Classification: Which to Fix, Which to Report Only
上游按子串匹配,不看语境。命中分两档,对照表两档都列,改写只动第一档:
- 营销语境命中 → 改:极限词 / 功效承诺 / 医疗用语等落在卖货、承诺、比较句里的(「全网最低」「三天见效」)。
- 只报不改:营销语境外的程度副词(「最后一步」「第一次」「一定要备份」「完全免费开源」里的
最后 / 第一 / 一定 / 完全)与英文子串误中(命中
Assistant)。对照表照列命中词, 「建议」一列写「语境不构成广告承诺,保留」。 《广告绝对化用语执法指南》(市场监管总局 2023)第五、六条列的不适用情形也归这档: 只表经营理念 / 愿望(「顾客第一」)、同品牌自我比较(「我们最贵的一款」)、消费提示 (「最佳食用时间」)、国标分级用语、商品名 / 商标 / 奖项本身含极限词、限定时间地域的事实 (「2025 年本市销量第一」——但要能举证)。ass - 必改且从重:医疗、医美、药品、器械、保健食品、投资理财、教育培训里的疗效 / 收益 / 效果承诺 (「有效率 100%」「保过」「稳赚」),指南第十一条明说这三类不算轻微,不享受首违免罚。
- 平台自有口径,接口未必查得到:小红书对种草夸大词(绝绝子 / yyds / 闭眼买)限流, 对外站导流(加 vx / 私信 / 留言扣 1)禁言扣分;抖音把「夸张表达功效」判劣质营销。 文案里见到这几类,即使三平台都回「无命中」,也在对照表「建议」一列提一句。
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
Assistant). 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).ass - 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
- 有命中:非空数组,或
prohibitedWordsType与content不相等(任一成立即算)。originalContent - 确实没命中:拿到了 或
content(证明检测跑过了),且上面两条都不成立。originalContent - 没拿到结果:该平台条目里有 ,或
error与content都缺失/为 null。 🔴 这时该平台一律标「检测失败」,绝不能填成「合规」/「low」,不替用户下合规结论。originalContent
- Has hits: is a non-empty array, or
prohibitedWordsTypediffers fromcontent(either condition holds).originalContent - Definitely no hits: both and
contentare present (proving the check ran), and neither of the above conditions holds.originalContent - No result obtained: the platform entry has , or both
errorandcontentare missing / null. 🔴 In this case, mark that platform as "check failed" - never fill in "compliant" / "low", don't draw compliance conclusions for the user.originalContent
错误处理
Error Handling
CLI 逐平台捕获网络 / HTTP 错误,把错误写进对应平台条目并继续其它平台:
单平台失败不影响其余平台,报错码怎么办照 第 6 条。
问题绕不过去、或想吐槽 → 可提一句用 当场写成反馈(可忽略,不再重复提)。
dby-gateway/references/protocol.mddby-feedbackThe 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 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).
dby-gateway/references/protocol.mddby-feedback输出模板
Output Template
脚本返回的是 JSON map,本鸭须解析后填入下面的模板,禁止把原始 JSON 直接甩给用户。
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. 逐平台风险对照表
1. Per-Platform Risk Comparison Table
| 平台 | 判定 | 风险类别 (prohibitedWordsType) | 命中词(从 content 的标注提取) | 建议(本鸭给) |
|---|---|---|---|---|
| 小红书 | 【命中 / 无命中 / 检测失败】 | 【类别,逗号分隔】 | 【命中词,逗号分隔】 | 【替换建议】 |
| 抖音 | 【…】 | 【…】 | 【…】 | 【…】 |
| 公众号 | 【…】 | 【…】 | 【…】 | 【…】 |
- 平台名用中文(小红书 / 抖音 / 公众号)。
- 「判定」一列严格按上面判据填,三选一,不要自创风险等级——接口不回等级。
- 某平台走「没拿到结果」分支(有 ,或正文字段全缺)时,该行判定填检测失败并附
error/缺了哪个字段, 🔴 不许填「无命中」,也不许编造结果。code - 「建议」一列由本鸭结合上下文给出——接口不提供建议。
- 全平台均判定为「无命中」时,对照表照常列出,判定一列写「无命中」。
| 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
error/which field is missing; 🔴 don't fill in "no hits", and don't fabricate results.code - 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. 全平台安全改写
2. All-Platform Safe Rewrite
综合所有平台的命中词与建议,给出一版改完即可在所有目标平台发布的文案:
【安全改写后的整段文案。要求:覆盖各平台所有营销语境命中(只报不改的那档原样保留);语义通顺、语气与风格不变;
不加 emoji、不重写结构、不加引用或代码块,直接输出。改动处可加粗斜体标出。】
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
- 先出逐平台风险对照表,再出全平台安全改写,不输出开场白与结束语。
- 脚本返回 JSON 后必须解析填模板,禁止直接输出原始 JSON。
- 安全改写要同时满足所有平台口径:以命中最多的平台为基线消词。
- 某平台失败时,照常输出其余平台结果,并在对照表标注该平台失败原因; 🔴 有平台检测失败时,末尾必须提示「该平台未完成检测,别当它通过」,不要写成全平台可发。
- 全平台都判定为「无命中」时:对照表如实标注,安全改写处写「原文已可全平台发布,无需改动」。
- 绝不回显 。
DOUBAOYA_API_KEY
- 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 .
DOUBAOYA_API_KEY
其他
Miscellaneous
- (502)是上游临时抖动,已自动退款,直接重试,不会重复扣费。
PROVIDER_FAILED - 文案经 HTTPS 发至都爆鸭后端,脚本本地不持久化原文与结果。
- (502) is a temporary upstream hiccup, auto-refunded, just retry, no double charge.
PROVIDER_FAILED - Content is sent to the Doubaoya backend over HTTPS; the script doesn't persist original text or results locally.
关于响应里的 notice 字段
About the notice Field in the Response
调用本 skill 对应的 doubaoya API 后,如果返回的 JSON 顶层出现 字段,请把这句话原样转达给用户——这是关于本 skill 有更新的提示,不影响本次调用结果,不需要重试或改变行为。
noticeAfter 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.
notice