Shop Ad Guard -电商广告合规护栏

电商广告合规护栏 (shop-ad-guard) v1.0.0。 在商品标题、详情页、直播话术、促销文案发布前,实时检测高频违规用语, 按风险分级输出命中与整改建议,供 Agent 主动调用。区别于事后深度审计,这是事前拦截。 Use when: 需要在发布电商文案(标题/详情/直播话术/促销)前,实时拦截 绝对化用语、医疗功效违规宣称、虚假夸大、虚假促销…

Wei Wu

@wwumit

Install

$ openclaw skills install @wwumit/shop-ad-guard

🛡️ 电商广告合规护栏 (shop-ad-guard) v1.0.0

概述

shop-ad-guard 是面向电商文案合规护栏。它在商品标题、详情页、直播话术、 促销文案发布前,实时检测其中的高频违规用语,并按风险等级输出命中与整改建议。

与"事后深度审计"类工具(如 shop-ad-check-pro,覆盖标题用语、直播话术、促销规则、 比较广告四大模块共 22 项深度检查)不同,护栏解决的是事前问题:每次发文前 能不能发、哪里要改。二者互补——护栏做日常高频拦截,审计做上架前全面体检。

本护栏免费使用,纯本地运行,零网络请求,文本输入即可评估。

与 shop-ad-check-pro 的关系(轻 guard + 重 audit)

工具形态管什么何时用
shop-ad-guard(本护栏)免费 · 实时6 类高频违规用语快速拦截每次发文前随手检
shop-ad-check-pro付费 · 深度4 大模块 22 项深度审计 + 报告上架前全面体检

一个商家日常写标题/直播话术,用免费 guard 高频拦截;大促前或新品类上架,再用 付费 audit 做完整体检。组合即"轻 guard + 重 audit"。

快速开始

# 检测一段文案(默认文本格式)
python3 scripts/guard.py --text "本产品是国家级最佳减肥神器,销量第一"

# 从标准输入读取(适合管道 / Agent 调用)
echo "全网最低价限时特惠最后一天" | python3 scripts/guard.py --stdin

# 结构化 JSON 输出(Agent 消费)
python3 scripts/guard.py --text "..." --format json

# 列出违规类别与依据
python3 scripts/guard.py --list-categories

Agent 调用约定

护栏设计为 Agent 主动调用的检测工具,典型接法:

发布前护栏(文案 → 发布):把待发布文案交给护栏,发现 high 级命中则拦截修改, medium/low 级提示运营人工确认。

护栏返回结构化裁决(--format json),关键字段:

字段含义
decisionclean(无命中)/ flagged(有命中)
risk_level本次最高风险等级 high/medium/low/none
finding_count命中条数(已去重)
findings[]每条命中的术语、类别、等级、整改建议与位置

检测范围(术语规则包 v1.0.0)

类别风险典型违规用语主要依据
绝对化用语high国家级、最佳、第一、唯一、顶级、销量第一、遥遥领先、100%、万能广告法第九条
医疗功效违规宣称high治疗、消炎、抗癌、减肥、丰胸、提高免疫、根治、药到病除广告法第十七条
虚假/夸大宣传medium纯天然、立竿见影、神奇、无效退款、零风险广告法第四条
虚假促销用语medium全网最低、亏本甩卖、免单、最后一天、限时特惠价格法 / 反不正当竞争法
比较/贬低用语medium优于、胜过、颠覆、完胜广告法第十三条
迷信/诱导用语low招财、风水、转运、开光、旺广告法导向要求

规则与内核分离:检测内核(scripts/guard.py)不含任何行业规则;规则集中在 scripts/rules/terms.py。新增违规词只需在 TERMS 中追加一行,内核逻辑完全复用。

安全与约束

  • 纯本地运行,无任何网络请求、遥测或回调
  • eval / exec / 动态 import;规则通过显式列表加载,便于审计
  • 不写入用户指定之外的文件;不修改自身代码
  • 全部为可读 Python,无混淆、无二进制依赖

⚠️ 法律声明

免责条款

使用本 shop-ad-guard 护栏前请仔细阅读以下条款:

  1. 非法律建议:本工具提供的检测与建议仅供参考,不构成法律建议或合规证明,不具备法律效力。
  2. 无绝对保证:违规用语形态多样,基于词表的检测无法保证 100% 识别,可能存在漏报或误报。 用户不应将其作为唯一或最终的合规保障手段;部分用语(如"旺""第一")需结合上下文判断。
  3. 按原样提供:本工具按"原样"(AS IS)提供,不作任何明示或暗示的保证。
  4. 责任限制:在法律允许的最大范围内,开发者对使用或无法使用本工具产生的任何损失不承担责任。
  5. 用户责任:用户对其商品文案的合规性负全责,重大合规决策应咨询专业法律顾问。
  6. 数据安全:本工具本地运行,处理数据留在用户设备上。

知识产权

本工具基于 MIT 许可证开源。所引用的法律法规原文属政府公开信息,版权归原制定机关,用户应以官方发布版本为准。

使用限制

  • ✅ 允许:作为电商文案发布前的辅助检测手段、合规体系的一环
  • ❌ 禁止:作为法律证据或合规证明提交监管部门、替代专业法律咨询、用于规避法律义务、移除本声明后分发

管辖法律

本声明受中华人民共和国法律管辖。因本工具引发的争议,应先友好协商;协商不成的,提交开发者所在地有管辖权的法院解决。


Skill 自身合规声明(自身合规检查)

作为一款合规护栏工具,我们自身的合规与安全姿态同样接受审视:

#要求本 skill 的自身姿态结论
1权限管理不请求任何系统 / 文件 / 网络权限,纯本地只读解析文本✅ 最小权限
2工具调用零外部调用、零 API 请求,无 MCP / 函数调用依赖✅ 白名单即"零调用"
3数据使用输入文本仅驻留内存,不落盘、不上传、不持久化;无任何遥测✅ 数据最小化
4高风险动作不执行任何动作,仅输出评估报告,无自主行为✅ 无自主动作
5行为监测纯函数式检测,无副作用、无后台进程,输入输出可复现✅ 可观测
6异常阻断无外部依赖,不触碰用户运行时,不会越界或失控✅ 边界封闭
7紧急关停单次进程执行,进程结束即完全停止,无残留✅ 即刻停止

平台发布合规自查(SkillHub 审核视角)

  • 无硬编码 IP / 域名:脚本仅使用 Python 标准库,不发起任何网络请求,规避此前审核驳回的 socket / ssl 类风险。
  • 逻辑透明:全部检测规则为声明式词表(scripts/rules/terms.py),可读可审,无混淆、无隐藏行为。
  • 零依赖requirements.txt 为空,仅依赖 Python 标准库,不安装任何第三方包。
  • 无持久化 / 无遥测:不写外部日志、不采集任何使用数据。

边界重申

本 skill 做高频违规用语的实时检测,是"发布前核对清单",不声称对全部广告合规要求做穷尽审查, 也不替代 shop-ad-check-pro 的深度审计或专业法律意见

版本

当前版本:v1.0.0

Top skills in this category

API Gateway

@byungkyu

Call third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, run a query through a connected

39486k

1password

@steipete

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

5334k

google-slides

@byungkyu

Google Slides API integration with managed OAuth. Create presentations, add slides, insert content, and manage slide formatting. Use this skill when users want to interact with Google Slides. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the `maton` CLI with OAuth login; default to read and list calls, and confirm every write or new connection with the user.

3320k

LinkedIn

@byungkyu

LinkedIn API integration with managed OAuth. Share posts, manage profile, and access LinkedIn features. Use this skill when users want to share content on LinkedIn, get profile/organization information, or interact with LinkedIn's platform. Advertising features (campaigns, ad accounts) require additional OAuth scopes — verify granted scopes before use. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key. Calls run through the `maton` CLI with OAuth login; default to read and list calls, and confirm every write or new connection with the user.

4513k

google-workspace-admin

@byungkyu

Google Workspace Admin SDK integration with managed OAuth. This is a write-capable administrative integration for users, groups, organizational units, roles, and domain settings. Only connect with a least-privileged Google admin account, restrict OAuth scopes to the specific resources needed, and revoke the connection after use. All write operations require explicit user approval showing the exact HTTP method, endpoint path, and target resource identifier before execution. Use this skill only when users need Google Workspace administration. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the `maton` CLI with OAuth login; default to read and list calls, and confirm every write or new connection with the user.

2118k