← Back to Skills Marketplace
thegdsks

Glin Profanity

by thegdsks · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
1805
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install glin-profanity
Description
Profanity detection and content moderation library with leetspeak, Unicode homoglyph, and ML-powered detection. Use when filtering user-generated content, moderating comments, checking text for profanity, censoring messages, or building content moderation into applications. Supports 24 languages.
README (SKILL.md)

Glin Profanity - Content Moderation Library

Profanity detection library that catches evasion attempts like leetspeak (f4ck, sh1t), Unicode tricks (Cyrillic lookalikes), and obfuscated text.

Installation

# JavaScript/TypeScript
npm install glin-profanity

# Python
pip install glin-profanity

Quick Usage

JavaScript/TypeScript

import { checkProfanity, Filter } from 'glin-profanity';

// Simple check
const result = checkProfanity("Your text here", {
  detectLeetspeak: true,
  normalizeUnicode: true,
  languages: ['english']
});

result.containsProfanity  // boolean
result.profaneWords       // array of detected words
result.processedText      // censored version

// With Filter instance
const filter = new Filter({
  replaceWith: '***',
  detectLeetspeak: true,
  normalizeUnicode: true
});

filter.isProfane("text")           // boolean
filter.checkProfanity("text")      // full result object

Python

from glin_profanity import Filter

filter = Filter({
    "languages": ["english"],
    "replace_with": "***",
    "detect_leetspeak": True
})

filter.is_profane("text")           # True/False
filter.check_profanity("text")      # Full result dict

React Hook

import { useProfanityChecker } from 'glin-profanity';

function ChatInput() {
  const { result, checkText } = useProfanityChecker({
    detectLeetspeak: true
  });

  return (
    \x3Cinput onChange={(e) => checkText(e.target.value)} />
  );
}

Key Features

Feature Description
Leetspeak detection f4ck, sh1t, @$$ patterns
Unicode normalization Cyrillic fսckfuck
24 languages Including Arabic, Chinese, Russian, Hindi
Context whitelists Medical, gaming, technical domains
ML integration Optional TensorFlow.js toxicity detection
Result caching LRU cache for performance

Configuration Options

const filter = new Filter({
  languages: ['english', 'spanish'],     // Languages to check
  detectLeetspeak: true,                 // Catch f4ck, sh1t
  leetspeakLevel: 'moderate',            // basic | moderate | aggressive
  normalizeUnicode: true,                // Catch Unicode tricks
  replaceWith: '*',                      // Replacement character
  preserveFirstLetter: false,            // f*** vs ****
  customWords: ['badword'],              // Add custom words
  ignoreWords: ['hell'],                 // Whitelist words
  cacheSize: 1000                        // LRU cache entries
});

Context-Aware Analysis

import { analyzeContext } from 'glin-profanity';

const result = analyzeContext("The patient has a breast tumor", {
  domain: 'medical',        // medical | gaming | technical | educational
  contextWindow: 3,         // Words around match to consider
  confidenceThreshold: 0.7  // Minimum confidence to flag
});

Batch Processing

import { batchCheck } from 'glin-profanity';

const results = batchCheck([
  "Comment 1",
  "Comment 2",
  "Comment 3"
], { returnOnlyFlagged: true });

ML-Powered Detection (Optional)

import { loadToxicityModel, checkToxicity } from 'glin-profanity/ml';

await loadToxicityModel({ threshold: 0.9 });

const result = await checkToxicity("You're the worst");
// { toxic: true, categories: { toxicity: 0.92, insult: 0.87 } }

Common Patterns

Chat/Comment Moderation

const filter = new Filter({
  detectLeetspeak: true,
  normalizeUnicode: true,
  languages: ['english']
});

bot.on('message', (msg) => {
  if (filter.isProfane(msg.text)) {
    deleteMessage(msg);
    warnUser(msg.author);
  }
});

Content Validation Before Publish

const result = filter.checkProfanity(userContent);

if (result.containsProfanity) {
  return {
    valid: false,
    issues: result.profaneWords,
    suggestion: result.processedText  // Censored version
  };
}

Resources

Usage Guidance
This skill is an instruction-only description of a profanity-detection library and appears internally consistent, but before installing or using it you should: 1) verify the npm and PyPI package names and the GitHub repository owners (confirm the code matches the documentation and is from a trusted maintainer); 2) inspect package dependencies and any postinstall scripts or native extensions; 3) check whether the ML functionality downloads models at runtime or contacts external endpoints (this can raise privacy and bandwidth concerns); 4) review license and GDPR/privacy implications for sending user content to models; and 5) test the package in an isolated environment (sandbox/container) before deploying to production. If you cannot locate a legitimate package/repo matching these docs, treat it as untrusted and do not install.
Capability Analysis
Type: OpenClaw Skill Name: glin-profanity Version: 1.0.0 The skill bundle consists of metadata and a `SKILL.md` file describing a profanity detection library. The `SKILL.md` content provides standard installation instructions (`npm install`, `pip install`) and usage examples for the library. There is no evidence of prompt injection against the AI agent, data exfiltration, malicious execution, persistence mechanisms, or obfuscation within the provided files. All content appears to be aligned with the stated purpose of a content moderation library.
Capability Assessment
Purpose & Capability
The name, description, and usage examples all describe a profanity-detection library. The SKILL.md does not request unrelated credentials, binaries, or system access — everything requested is consistent with a content-moderation library.
Instruction Scope
The instructions are example code snippets (JS/Python/React) and do not instruct the agent to read local files, environment secrets, or exfiltrate data. However the ML-related examples (TensorFlow.js toxicity model) imply that runtime behavior may include downloading ML models or loading third-party model files; that could cause network activity and bring in additional dependencies not visible in the SKILL.md.
Install Mechanism
There is no install spec in the skill bundle (instruction-only). The README suggests installing via npm or pip (public registries), which is a common approach. Because the skill does not bundle code, you should verify the actual npm/PyPI package(s) and their maintainers before installing; third-party packages can include additional dependencies or postinstall steps.
Credentials
The skill declares no required environment variables, credentials, or config paths. That is proportional for a library that operates on text and does not require external service authentication.
Persistence & Privilege
The skill is not always-enabled, does not request persistent agent privileges, and contains no install-time code in the bundle that would modify agent configuration. Autonomy flags are default and appropriate for a user-invocable skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install glin-profanity
  3. After installation, invoke the skill by name or use /glin-profanity
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Profanity detection library with leetspeak, Unicode homoglyph, and ML support. 24 languages.
Metadata
Slug glin-profanity
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Glin Profanity?

Profanity detection and content moderation library with leetspeak, Unicode homoglyph, and ML-powered detection. Use when filtering user-generated content, moderating comments, checking text for profanity, censoring messages, or building content moderation into applications. Supports 24 languages. It is an AI Agent Skill for Claude Code / OpenClaw, with 1805 downloads so far.

How do I install Glin Profanity?

Run "/install glin-profanity" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Glin Profanity free?

Yes, Glin Profanity is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Glin Profanity support?

Glin Profanity is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Glin Profanity?

It is built and maintained by thegdsks (@thegdsks); the current version is v1.0.0.

💬 Comments