OpenClaw Profanity:自动化 AI 内容审核 - Openclaw Skills
作者:互联网
2026-04-09
什么是 OpenClaw 违禁词插件?
OpenClaw Profanity 插件是一个专门的审核层,旨在提高 AI 智能体的可靠性和安全性。作为 Openclaw Skills 生态系统中的关键组件,该插件允许开发者实时自动过滤、拦截或屏蔽冒犯性语言。它专门针对现代数字通信的复杂性而设计,确保聊天机器人和自动化助手在各种平台上保持专业语调。
通过将此工具集成到您的 Openclaw Skills 中,您可以保护社区免受辱骂行为侵害,并确保符合内容指南。该插件通过采用先进的归一化技术来捕捉模糊文本,超越了简单的关键词匹配,使其成为任何生产级 AI 部署不可或缺的资产。
下载入口:https://github.com/openclaw/skills/tree/main/skills/thegdsks/openclaw-profanity
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install openclaw-profanity
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 openclaw-profanity。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
OpenClaw 违禁词插件 应用场景
- 在使用 Openclaw Skills 构建的社区 Discord 或 Slack 机器人中审核用户交互。
- 为企业级 AI 客户服务智能体实施严格的内容准则。
- 在多语言 T@elegrimm 机器人环境中防止冒犯性内容的传播。
- 追踪并记录重复违规行为,自动识别和管理有问题的用户。
- 插件在 AI 智能体开始处理之前拦截发送给它的每一条消息。
- 应用 Unicode 归一化来解析相似字符并识别谐音(leetspeak)模式。
- 将处理后的文本与全球语言字典和开发者自定义词库进行对比扫描。
- 根据配置的操作,插件将警告用户、屏蔽特定词汇、拦截整个消息或静默记录违规行为。
- 如果定义了自定义处理程序,插件将在 Openclaw Skills 核心响应之前执行复杂逻辑,如封禁用户或发送外部通知。
OpenClaw 违禁词插件 配置指南
使用您偏好的包管理器安装:
npm install openclaw-profanity
要将其集成到智能体中,请导入插件并将其添加到配置数组中:
import { OpenClaw } from 'openclaw';
import { profanityPlugin } from 'openclaw-profanity';
const bot = new OpenClaw({
plugins: [
profanityPlugin({
action: 'warn',
detectLeetspeak: true,
languages: ['english']
})
]
});
OpenClaw 违禁词插件 数据架构与分类体系
该插件利用配置对象在 Openclaw Skills 框架内定义其行为:
| 参数 | 类型 | 用途 |
|---|---|---|
| action | string | 决定响应方式:warn(警告)、censor(屏蔽)、block(拦截)或 log(记录)。 |
| detectLeetspeak | boolean | 启用对 f4ck 或 @$$ 等谐音模式的检测。 |
| normalizeUnicode | boolean | 解析西里尔字母和其他 Unicode 字符技巧。 |
| languages | array | 检测引擎支持的语言列表。 |
| customWords | array | 开发者定义的额外禁用词列表。 |
| ignoreWords | array | 永远不应被标记的白名单词汇。 |
name: openclaw-profanity
description: Content moderation plugin for OpenClaw/Moltbot AI agents. Use when building ch@tbots that need profanity filtering, moderating user messages in Discord/Slack/T@elegrimm bots, or adding content moderation to OpenClaw agents.
OpenClaw Profanity Plugin
Profanity detection plugin for OpenClaw and Moltbot AI agents. Adds automated content moderation to your ch@tbot with leetspeak, Unicode, and multi-language support.
Installation
npm install openclaw-profanity
Setup with OpenClaw
import { OpenClaw } from 'openclaw';
import { profanityPlugin } from 'openclaw-profanity';
const bot = new OpenClaw({
plugins: [
profanityPlugin({
action: 'warn', // warn | censor | block | log
detectLeetspeak: true,
normalizeUnicode: true,
languages: ['english'],
customWords: [],
ignoreWords: []
})
]
});
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
action |
string | 'warn' |
Action on profanity: warn, censor, block, log |
detectLeetspeak |
boolean | true |
Catch f4ck, sh1t patterns |
normalizeUnicode |
boolean | true |
Catch Cyrillic lookalikes |
languages |
array | ['english'] |
Languages to check |
customWords |
array | [] |
Additional words to flag |
ignoreWords |
array | [] |
Words to whitelist |
onViolation |
function | - | Custom handler for violations |
Actions
warn - Respond with warning
profanityPlugin({ action: 'warn' })
// Bot responds: "Please keep the ch@t clean."
censor - Replace and continue
profanityPlugin({ action: 'censor', replaceWith: '***' })
// "What the ***" is processed normally
block - Ignore message entirely
profanityPlugin({ action: 'block' })
// Message is not processed
log - Log and continue
profanityPlugin({ action: 'log' })
// Logs violation, processes normally
Custom Violation Handler
profanityPlugin({
action: 'custom',
onViolation: async (message, result, context) => {
// Track repeat offenders
await trackViolation(message.userId, result.profaneWords);
// Custom response
if (getViolationCount(message.userId) > 3) {
await banUser(message.userId);
return { blocked: true };
}
return { blocked: false, warning: "First warning..." };
}
})
Platform Examples
Discord Bot
const bot = new OpenClaw({
platform: 'discord',
plugins: [
profanityPlugin({
action: 'censor',
detectLeetspeak: true,
languages: ['english', 'spanish']
})
]
});
T@elegrimm Bot
const bot = new OpenClaw({
platform: 'telegram',
plugins: [
profanityPlugin({
action: 'warn',
onViolation: (msg, result) => {
return {
reply: `Watch your language, ${msg.username}!`,
deleteOriginal: true
};
}
})
]
});
Slack Bot
const bot = new OpenClaw({
platform: 'slack',
plugins: [
profanityPlugin({
action: 'log',
onViolation: (msg, result) => {
notifyModerators(msg.channel, msg.user, result);
}
})
]
});
Detection Capabilities
The plugin catches:
- Direct profanity: Standard bad words
- Leetspeak:
f4ck,sh1t,@$$,b1tch - Unicode tricks: Cyrillic
аinstead ofa, etc. - Spaced letters:
f u c k,s.h.i.t - Mixed obfuscation:
fü?k,$h!t
Resources
- npm: https://www.npmjs.com/package/openclaw-profanity
- GitHub: https://github.com/GLINCKER/glin-profanity/tree/release/packages/openclaw
- Core library docs: https://www.typeweaver.com/docs/glin-profanity
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
阿里云大模型服务平台百炼新人免费额度如何申请?申请与使用免费额度教程及常见问题解答
办公 AI 工具 OpenClaw 部署 Windows 系统一站式教程
Qwen3.6 正式发布!阿里云百炼同步开启“AI大模型节省计划”超值优惠
【新手零难度操作 】OpenClaw 2.6.4 安装误区规避与快速使用指南(包含最新版安装包)
OpenClaw 2.6.4 可视化部署 打造个人 AI 数字员工(包含最新版安装包)
【小白友好!】OpenClaw 2.6.4 本地 AI 智能体快速搭建教程(内有安装包)
零基础部署 OpenClaw v2.6.2,Windows 系统完整教程
【适合新手的】零基础部署 OpenClaw 自动化工具教程
开发者们的第一台自主进化的“爱马仕”来了
极简部署 OpenClaw 2.6.2 本地 AI 智能体快速启用(含最新版安装包)
AI精选
