Post Content Moderation
Overview
Apply a strict moderation workflow to the full post package, not just plain text. Default goal: review title, body content, images, and videos together, then reject content that contains advertising intent or contact information unless the match falls inside an explicit whitelist or a user-provided custom rule.
Skill maintenance note
If this skill is published to ClawHub, keep the local version in the sibling VERSION file in sync with the published version.
Recommended release flow:
- 1. update skill content
- bump INLINECODE1
- publish with the same version number
- keep
VERSION as the last published version after success
Recommended publish command template:
CODEBLOCK0
Security and capability notice
Before using this skill in production, treat it as a networked moderation integration, not a purely local rules engine.
Important boundaries:
- - bundled PHP scripts can send moderation payloads to external APIs
- bundled PHP scripts can pull pending content from a remote API and callback results to a remote API
- any post text, comment text, whitelist, custom rules, image URLs, or video URLs included in the payload may leave the local environment
- the bundled media inspector in
scripts/moderation_support.php is currently a placeholder and does not perform real image OCR, QR decoding, frame extraction, speech recognition, or video inspection by itself - if you claim image/video moderation in production, implement and verify real media preprocessing first
Recommended safety baseline:
- - use environment variables for all secrets
- use narrowly scoped allowlisted API hosts only
- keep timeout and fail-close policy explicit
- add dry-run testing before enabling callback writes
- do not send unnecessary user data to external models
- document to operators that media URLs may be exposed to third-party services if passed through
- avoid presenting the bundled PHP scripts as a full local media-audit engine
Quick operating modes
Choose one mode before moderating:
1. Strict full-auto mode
Use when the business requires no human intervention.
Rule:
- - clear violation -> INLINECODE4
- clear clean content -> INLINECODE5
- ambiguous but risky -> INLINECODE6
- media unreadable / model output invalid / upstream failed -> INLINECODE7
2. Balanced mode
Use when manual review is available.
Rule:
- - clear violation -> INLINECODE8
- clear clean content -> INLINECODE9
- ambiguous or partially unreadable -> INLINECODE10
Moderation scope
Always review every available part of a post:
- - 标题
- 正文
- 图片
- 视频
- 图片或视频内可见文字
- 配文、字幕、贴纸文字、水印、角标、二维码、头像/昵称引流信息
Do not approve a post only because the body text is clean. If any one component violates policy, the whole post should normally be marked 拒绝 or 需人工复核.
Field-specific rules
标题规则
Reject or review titles that contain:
- - direct promotion, recruitment, rebate, agency, commission, guaranteed results
- diversion language such as "私聊", "加我", "主页联系", "扫码了解"
- visible contact IDs, domain names, or disguised contact phrases
- exaggerated ad-style hooks whose main purpose is conversion rather than discussion
正文规则
Reject or review body text that contains:
- - product/service promotion with obvious conversion intent
- calls to contact off-platform or move to private chat
- direct or disguised联系方式
- repeated promotional copy, pricing slogans, or enrollment / agency / lead-generation language
图片规则
Reject or review images that contain:
- - QR codes, mini-program codes, payment codes, group invite codes
- contact cards, business cards, chat screenshots, profile screenshots
- watermarks with account IDs, brands plus CTA, or sales copy
- posters with price, discount, recruitment, or diversion wording
- corner text, decorative background text, or hidden overlaid text carrying contact or ad signals
视频规则
Reject or review videos that contain:
- - cover image text with promotion or contact details
- subtitles or spoken content that guide users off-platform
- opening cards, ending cards, or fixed watermarks with contact info
- flash frames showing QR codes, account IDs, phone numbers, or group invitations
- oral CTA such as "想了解私信我" / "主页联系" / "加V备注"
Default moderation policy
Treat the following as violations unless explicitly whitelisted:
1. Advertising / promotion
Block content that obviously promotes:
- - products, services, channels, groups, websites, apps, stores, or paid offers
- traffic diversion such as "加我", "私聊了解", "点击链接", "扫码进群", "代理/加盟/返利/推广"
- recruitment, lead collection, account selling, brushing orders, betting, gray-market promotion, or obvious marketing copy
- repeated brand exposure plus calls to action
- image or video overlays that guide users to off-platform contact or purchase
Common ad signals:
- - strong call-to-action language
- price, discount, rebate, agency, invitation, commission, guaranteed results
- external platform redirection
- excessive emoji / symbols used for promotion
- intentionally obfuscated promotional wording
- promotional subtitles, end cards, cover text, or watermark copy
2. Contact information
Block direct or disguised contact details, including:
- phone or mobile numbers
- WeChat / VX / V / vx / wx variants
- QQ numbers or QQ group numbers
- email addresses
- URLs, domains, short links, QR-code invitations expressed in text or shown in media
- WhatsApp, Line, Discord, Skype, social account IDs
- platform handles or IDs whose clear purpose is off-platform contact
- QR codes, payment codes, contact cards, business cards, profile screenshots, or group invitation screenshots
Also treat as violations when contact information is deliberately obfuscated, for example:
- - replacing digits with spaces, symbols, Chinese numerals, or homophones
- mixing letters and punctuation to bypass detection
- replacing keywords with variants such as
v, vx, wx, 薇, 微, 卫星, 扣扣, 邮箱, INLINECODE21 - splitting numbers across spaces or punctuation
- using Chinese numerals, homophones, or mixed scripts to hide IDs
- "微❤", "薇", "卫星", "扣扣", "油箱", "点我头像", "看签名"
- showing contact text only in image corners, cover image, video ending card, or subtitle frames
Multi-modal review workflow
For each moderation task, follow this order:
- 1. Review title.
- Review body text.
- Review each image for:
- visible text
- QR codes
- watermarks
- contact cards / screenshots / profile clues
- promotional posters or pricing posters
- 4. Review each video for:
- spoken or subtitled contact info
- cover image text
- opening/ending cards
- watermarks and persistent corner text
- QR codes or account IDs shown in frames
- 5. Merge findings across all components.
- Check whitelist and custom rules.
- Produce one final result:
通过, 拒绝, or 需人工复核.
Quick decision tree
Use this shortcut when speed matters:
- - any clear contact info in title/body/image/video -> INLINECODE25
- any clear ad/diversion language in title/body/image/video -> INLINECODE26
- whitelist clearly covers the matched content and scenario -> INLINECODE27
- model cannot inspect a required field:
- strict full-auto ->
拒绝
- balanced mode ->
需人工复核
- - no hit across all fields -> INLINECODE30
Cross-field judgment rule
Judge the post as a whole.
Examples:
- - title is normal but image contains a WeChat ID -> reject
- body is normal but video end card says "扫码领取" -> reject
- image shows a QR code but context is unclear and whitelist is absent -> manual review
- title/body mention a brand normally, but video repeatedly induces purchase or contact -> reject
Whitelist handling
Whitelist is an exception layer, not a blanket bypass.
Allow content when the whitelist clearly covers the matched item, for example:
- - allowed brand names
- allowed official accounts or official domains
- approved merchant names
- approved phrases that would otherwise look promotional
- internal business terms that resemble blocked words
- approved official QR codes or approved official service accounts in a narrowly defined scenario
Apply whitelist with these constraints:
- - whitelist only the exact item or exact scenario the user approved
- do not expand a narrow whitelist into a broad exemption
- if promotional intent still exists outside the whitelisted fragment, reject
- if the post contains extra contact details beyond the whitelist scope, reject or send to manual review
- if only one image/video asset is whitelisted, do not automatically whitelist all assets in the same post
If the user says "可以自己定义自己的规则", ask for or accept custom rules in plain language and merge them after the default policy.
Result priority
Use these priorities:
- - clear ad or contact evidence in any field -> INLINECODE31
- weak or ambiguous evidence, especially in image/video details -> INLINECODE32
- all fields clean, or only narrowly whitelisted content appears -> INLINECODE33
Standard output
Prefer this fixed output:
CODEBLOCK1
Risk level guidance
- -
高:明确广告、明确联系方式、明确二维码、明确引流 - INLINECODE35 :存在明显嫌疑但证据不完整,或有混淆空间
- INLINECODE36 :未命中风险,仅正常讨论或明确白名单放行
JSON output option
If the user requests structured output, use:
CODEBLOCK2
Rewrite behavior
When asked to revise a rejected post:
- - remove ad-like calls to action
- remove all contact information and diversion hints
- remove or replace violating images/videos when needed
- preserve the user's main legitimate meaning
- keep wording natural, not robotic
- do not silently keep risky borderline phrases
- if media itself is违规, state that the media asset must be removed or replaced
Custom rule intake
When the user provides extra moderation rules, normalize them into this structure before applying:
CODEBLOCK3
If custom rules are incomplete, still perform moderation with defaults and state which defaults were used.
Media-specific guidance
Images
Pay extra attention to:
- - posters, flyers, screenshots, chat records, contact cards
- QR codes, mini-program codes, payment codes
- watermarks with account IDs or brand recruitment copy
- text hidden in corners, borders, or background decorations
Videos
Pay extra attention to:
- - cover image text
- subtitles and speech transcription
- opening/ending cards
- repeated corner watermarks
- flash frames showing contact info
- spoken diversion like "私信我" or "主页联系"
If video cannot be fully inspected, do not guess. Return 需人工复核 and specify what could not be confirmed.
Examples
Example 1: reject because image contains contact info
Input:
CODEBLOCK4
Output:
CODEBLOCK5
Example 2: reject because video end card is promotional
Input:
CODEBLOCK6
Output:
CODEBLOCK7
Example 3: whitelist exception
Input rule:
CODEBLOCK8
Input content:
CODEBLOCK9
Output:
CODEBLOCK10
References
- - Read
references/rule-template.md when converting user-provided business rules into a reusable moderation policy. - Read
references/install-and-usage.md when the user asks how to install, import, distribute, or operate this skill in a workspace. - Read
references/api-integration.md when the user wants pull APIs, callback APIs, comment moderation APIs, or a fully automatic no-human-review moderation workflow. - Read
references/api-spec.md when the user needs a backend-facing API contract with request fields, response fields, error codes, action enums, and implementation flow. - Read
references/prompt-templates.md when the user needs reusable moderation prompts, JSON-only response constraints, or full-auto conservative suffixes. - Read
references/php-example-notes.md and use scripts/php_xai_client_example.php when the user wants a PHP 7.3 integration example for x.ai moderation, callback handling, or comment moderation. - Read
references/php-demo-suite.md and use the bundled scripts when the user wants runnable PHP demos for pull, audit, callback, and comment-review flows.
帖子内容审核
概述
对完整帖子包应用严格的审核工作流程,而不仅仅是纯文本。默认目标:同时审查标题、正文内容、图片和视频,然后拒绝包含广告意图或联系信息的内容,除非匹配项落在明确的白名单或用户提供的自定义规则内。
技能维护说明
如果此技能发布到ClawHub,请将本地VERSION文件中的版本与已发布版本保持同步。
推荐的发布流程:
- 1. 更新技能内容
- 升级VERSION
- 使用相同版本号发布
- 成功后保持VERSION为最后发布的版本
推荐的发布命令模板:
bash
clawhub publish /path/to/post-content-moderation \
--slug post-content-moderation \
--name Post Content Moderation \
--version $(cat VERSION) \
--changelog your release note
安全与能力说明
在生产环境中使用此技能之前,请将其视为网络化审核集成,而非纯本地规则引擎。
重要边界:
- - 捆绑的PHP脚本可以将审核负载发送到外部API
- 捆绑的PHP脚本可以从远程API拉取待审核内容,并将结果回调到远程API
- 负载中包含的任何帖子文本、评论文本、白名单、自定义规则、图片URL或视频URL都可能离开本地环境
- scripts/moderation_support.php中的捆绑媒体检查器目前是一个占位符,本身不执行真实的图片OCR、二维码解码、帧提取、语音识别或视频检查
- 如果在生产环境中声称具备图片/视频审核能力,请先实现并验证真实的媒体预处理
推荐的安全基线:
- - 对所有机密信息使用环境变量
- 仅使用范围狭窄的白名单API主机
- 保持超时和故障关闭策略明确
- 在启用回调写入之前添加干运行测试
- 不要将不必要的用户数据发送到外部模型
- 向操作人员说明,如果传递媒体URL,可能会暴露给第三方服务
- 避免将捆绑的PHP脚本呈现为完整的本地媒体审核引擎
快速操作模式
在审核前选择一种模式:
1. 严格全自动模式
当业务要求无需人工干预时使用。
规则:
- - 明确违规 -> 拒绝
- 明确干净内容 -> 通过
- 模糊但有风险 -> 拒绝
- 媒体不可读/模型输出无效/上游失败 -> 拒绝
2. 平衡模式
当有人工审核可用时使用。
规则:
- - 明确违规 -> 拒绝
- 明确干净内容 -> 通过
- 模糊或部分不可读 -> 需人工复核
审核范围
始终审核帖子的每个可用部分:
- - 标题
- 正文
- 图片
- 视频
- 图片或视频内可见文字
- 配文、字幕、贴纸文字、水印、角标、二维码、头像/昵称引流信息
不要仅因为正文内容干净就批准帖子。如果任何组件违反政策,整个帖子通常应标记为拒绝或需人工复核。
字段特定规则
标题规则
拒绝或审核包含以下内容的标题:
- - 直接推广、招聘、返利、代理、佣金、保证结果
- 引流用语如私聊、加我、主页联系、扫码了解
- 可见的联系ID、域名或伪装的联系短语
- 夸张的广告式钩子,其主要目的是转化而非讨论
正文规则
拒绝或审核包含以下内容的正文:
- - 带有明显转化意图的产品/服务推广
- 呼吁离开平台联系或转到私聊
- 直接或伪装的联系方式
- 重复的促销文案、定价口号或招生/代理/线索生成用语
图片规则
拒绝或审核包含以下内容的图片:
- - 二维码、小程序码、付款码、群邀请码
- 联系卡片、名片、聊天截图、个人资料截图
- 带有账户ID、品牌加CTA或销售文案的水印
- 带有价格、折扣、招聘或引流措辞的海报
- 带有联系或广告信号的角标文字、装饰背景文字或隐藏叠加文字
视频规则
拒绝或审核包含以下内容的视频:
- - 带有推广或联系细节的封面图片文字
- 引导用户离开平台的字幕或口头内容
- 带有联系信息的开场卡、结尾卡或固定水印
- 显示二维码、账户ID、电话号码或群邀请的闪帧
- 口头CTA如想了解私信我/主页联系/加V备注
默认审核策略
除非明确列入白名单,否则将以下内容视为违规:
1. 广告/推广
阻止明显推广以下内容:
- - 产品、服务、渠道、群组、网站、应用、商店或付费优惠
- 流量引流如加我、私聊了解、点击链接、扫码进群、代理/加盟/返利/推广
- 招聘、线索收集、账号出售、刷单、赌博、灰色市场推广或明显的营销文案
- 重复的品牌曝光加行动呼吁
- 引导用户离开平台联系或购买的图片或视频叠加层
常见广告信号:
- - 强烈的行动呼吁语言
- 价格、折扣、返利、代理、邀请、佣金、保证结果
- 外部平台重定向
- 用于推广的过多表情符号/符号
- 故意混淆的推广措辞
- 推广字幕、结尾卡、封面文字或水印文案
2. 联系信息
阻止直接或伪装的联系细节,包括:
- 电话号码或手机号码
- 微信/VX/V/vx/wx变体
- QQ号码或QQ群号
- 电子邮件地址
- URL、域名、短链接、以文本表达或在媒体中显示的二维码邀请
- WhatsApp、Line、Discord、Skype、社交账户ID
- 明确目的是离开平台联系的平台账号或ID
- 二维码、付款码、联系卡片、名片、个人资料截图或群邀请截图
当联系信息被故意混淆时,也视为违规,例如:
- - 用空格、符号、中文数字或同音字替换数字
- 混合字母和标点以绕过检测
- 用变体替换关键词,如v、vx、wx、薇、微、卫星、扣扣、邮箱、油箱
- 在空格或标点间拆分数字
- 使用中文数字、同音字或混合文字隐藏ID
- 微❤、薇、卫星、扣扣、油箱、点我头像、看签名
- 仅在图片角落、封面图片、视频结尾卡或字幕帧中显示联系文本
多模态审核工作流程
对于每个审核任务,按此顺序进行:
- 1. 审核标题。
- 审核正文。
- 审核每张图片:
- 可见文字
- 二维码
- 水印
- 联系卡片/截图/个人资料线索
- 促销海报或定价海报
- 4. 审核每个视频:
- 口头或字幕联系信息
- 封面图片文字
- 开场/结尾卡
- 水印和持续角标文字
- 帧中显示的二维码或账户ID
- 5. 合并所有组件的发现。
- 检查白名单和自定义规则。
- 产生一个最终结果:通过、拒绝或需人工复核。
快速决策树
当速度重要时使用此快捷方式:
- - 标题/正文/图片/视频中有任何明确联系信息 -> 拒绝
- 标题/正文/图片/视频中有任何明确广告/引流用语 -> 拒绝
- 白名单明确覆盖匹配的内容和场景 -> 通过
- 模型无法检查必填字段:
- 严格全自动模式 -> 拒绝
- 平衡模式 -> 需人工复核
跨字段判断规则
将帖子作为一个整体进行判断。
示例:
- - 标题正常但图片包含微信号 -> 拒绝
- 正文正常但视频结尾卡显示扫码领取 -> 拒绝
- 图片显示二维码但上下文不明确且无白名单 -> 人工审核
- 标题/正文正常提及品牌,但视频反复诱导购买或联系 -> 拒绝
白名单处理
白名单是例外层,而非全面绕过。
当白名单明确覆盖匹配项时允许内容,例如:
- - 允许的品牌名称
- 允许的官方账号或官方域名
- 批准的商家名称
- 批准的短语,否则看起来像促销
- 类似被屏蔽词的内部业务术语
- 在狭窄定义场景中批准的官方二维码或批准的官方服务账号
应用白名单时需遵守以下约束:
- - 仅白名单用户批准的精确项或精确场景
- 不要将狭窄的白名单扩展为广泛豁免
- 如果白名单片段之外仍存在促销意图,则拒绝
- 如果帖子包含超出白名单范围的额外联系细节,则拒绝或发送人工审核
-