抖音/短视频违禁词和敏感词检测(本地词库版,无需 API Key)。每天首次使用自动从 GitHub 开源词库更新本地缓存,离线检测文案合规性。支持多词库合并(广告极限词、平台限流词、暴恐、色情、涉枪涉爆等)。使用场景:(1) 生成短视频文案后自动检测违禁词,(2) 用户要求检查某段文字是否有问题,(3) 抖音/...
本地词库 + 每日自动更新,无需 API Key,离线可用。
scripts/
check.py # 主检测脚本(入口)
update_words.py # 词库更新模块(每天首次自动触发)
data/ # 运行时生成,词库缓存目录(.gitignore 排除)
sensitive_words.txt
.update_state.json
SKILL=~/.agents/skills/douyin-sensitive-check
# 检测一段文案
python3 $SKILL/scripts/check.py "今天给大家推荐史上最好用的护肤品,加我微信领优惠券"
# 检测文件
python3 $SKILL/scripts/check.py -f /path/to/script.txt
# 管道
echo "文案内容" | python3 $SKILL/scripts/check.py
# 强制更新词库
python3 $SKILL/scripts/check.py --update
# 查看词库状态
python3 $SKILL/scripts/check.py --status
update_words.py 从 3 个 GitHub 开源词库拉取最新内容合并data/sensitive_words.txt(去重合并,含数万词条)konsheng/Sensitive-lexicon:广告、政治、暴恐、色情、涉枪涉爆、补充词库bigdata-labs/sensitive-stop-words:广告、政治、色情、涉枪涉爆jkiss/sensitive-words:广告、政治、色情data/.update_state.json 记录最后更新日期--updatecheck.py 的 CATEGORY_PATTERNS 中补充data/sensitive_words.txt 删除误报词ZIP package — ready to use