Content moderation plugin for OpenClaw (formerly Moltbot/Clawdbot) - Profanity detection in 24 languages for AI agents
npm install openclaw-profanity> Part of glin-profanity - Content moderation plugin for OpenClaw (formerly Moltbot / Clawdbot)



The official glin-profanity plugin for OpenClaw AI agents. Provides 24-language profanity detection across WhatsApp, Telegram, Discord, Slack, iMessage, and all other supported platforms.
> Note: This package wraps glin-profanity for seamless OpenClaw integration. For standalone use, install glin-profanity directly.
- 24 Language Support - Arabic, Chinese, Czech, Danish, Dutch, English, Esperanto, Finnish, French, German, Hindi, Hungarian, Italian, Japanese, Korean, Norwegian, Persian, Polish, Portuguese, Russian, Spanish, Swedish, Thai, Turkish
- Multiple Integration Methods - Skills, Plugin API, Hooks, and MCP
- Leetspeak Detection - Catches obfuscated profanity like "f0ck", "sh1t"
- Unicode Normalization - Detects homoglyph attacks like "fück"
- Context-Aware - Understands when words are used appropriately (gaming, quotes)
- Platform Agnostic - Works across all OpenClaw-supported messaging platforms
``bashVia npm
npm install openclaw-profanity
Quick Start
$3
Skills are automatically available after installation. Just ask your OpenClaw agent:
`
"Check this message for profanity: Hello world"
"Censor this text: What the fuck is this?"
"Is this appropriate to send?"
`$3
`typescript
// In your OpenClaw plugin
import { registerProfanityTools } from 'openclaw-profanity';export default function(api) {
registerProfanityTools(api);
}
`Or use individual tools:
`typescript
import { profanityTools } from 'openclaw-profanity';export default function(api) {
api.registerTool(profanityTools.checkProfanity);
api.registerTool(profanityTools.censorText);
}
`$3
`bash
Enable the profanity guard hook
openclaw hooks enable profanity-guard
`Configure via environment variables:
`bash
export PROFANITY_MODE=moderate # strict | moderate | lenient
export PROFANITY_BLOCK=false # Block profane messages
export PROFANITY_CENSOR=true # Censor profane words
export PROFANITY_LANGUAGES=english,spanish,french
`$3
`json5
// openclaw.config.json5
{
mcp: {
servers: {
"glin-profanity": {
command: "npx",
args: ["-y", "openclaw-profanity", "mcp-server"]
}
}
}
}
`Available Tools
| Tool | Description |
|------|-------------|
|
check_profanity | Check text for profanity in 24 languages |
| censor_text | Censor profanity with custom replacement |
| batch_check_profanity | Check multiple texts at once |
| analyze_profanity_context | Context-aware analysis |
| get_supported_languages | List all 24 supported languages |Skills
| Skill | Description |
|-------|-------------|
|
profanity_check | Check messages for inappropriate content |
| censor_message | Automatically censor profanity |
| content_guard | Proactive content moderation |Hooks
| Hook | Description |
|------|-------------|
|
profanity-guard | Auto-moderate all messages |Configuration
$3
- Strict: No tolerance, blocks all profanity
- Moderate: Context-aware, allows appropriate usage
- Lenient: Only flags severe profanity
$3
`typescript
import { createProfanityGuard } from 'openclaw-profanity';const guard = createProfanityGuard({
mode: 'moderate',
languages: ['english', 'spanish', 'french', 'german'],
censorProfanity: true,
censorReplacement: '[CENSORED]',
});
`Platform Support
Works with all OpenClaw-supported platforms:
- WhatsApp (via WhatsApp Web / Baileys)
- Telegram (Bot API / grammY)
- Discord (Bot API)
- Slack
- iMessage (imsg CLI)
- Microsoft Teams
- Matrix
- Google Chat
- Signal
- And more...
API Reference
$3
`typescript
// Register all tools
registerProfanityTools(api: OpenClawAPI): void// Individual tools
profanityTools.checkProfanity
profanityTools.censorText
profanityTools.batchCheck
profanityTools.analyzeContext
profanityTools.getSupportedLanguages
`$3
`typescript
// Create custom guard
createProfanityGuard(config: ProfanityGuardConfig): ProfanityGuard// Quick one-time check
quickGuard(message: string, options?: GuardOptions): HookResult
`$3
`typescript
// Create MCP handler
createMCPHandler(): MCPHandler// Execute tool directly
executeMCPTool(toolName: string, args: Record): Promise
``This plugin is compatible with:
- OpenClaw v1.x+ (current)
- Moltbot (legacy name, January 2026)
- Clawdbot (original name, December 2025)
Contributions are welcome! Please see the main repository for guidelines.
- glin-profanity - Core profanity detection library
- OpenClaw - Open-source personal AI assistant
- Awesome OpenClaw Skills - Community skills collection
MIT
---
Built with glin-profanity - The most comprehensive profanity detection library for JavaScript/TypeScript.