SuperAPI AI Directory

wechat-prohibited-word

General & other

View repository

Updated 10-16 00:03

About this skill

Official Account Prohibited Word Check

Overview

Official Account Prohibited Word Checkis a compliance detection tool designed specifically for official account content creators and operators. It syncs in real time based on the official prohibited word database and covers 10+ categories such as advertising law, medical aesthetics, and financial risk.

By simply entering your copy, you can:

  • 🔍 Quickly scan prohibited words and sensitive expressions in the copy,boldflag risk locations
  • 💡 Get replacement suggestions for each prohibited word based on the preceding context
  • ✏️ Directly receive a compliant copy after replacement, ready to publish by copying
  • 📎 Automatically generate a plain text file for easy archiving and collaboration

Suitable for scenarios such as official account operations, new media editors, brand marketing teams, and designers who need to ensure compliant publication of copy.

This Skill is based on a Python script and calls a remote prohibited word detection service through an API, supporting four input methods: text, file, web page, and image.


Features

Core Features

Feature Description
Prohibited Word Scanning Based on the official prohibited word database, covering 10+ categories such as advertising law superlative terms, medical aesthetics, financial risk, and education and training
Risk Flagging Matched prohibited words in the original text areboldeddisplayed, while also summarizing the types and quantities of prohibited words
Smart Replacement Each prohibited word is provided with a replacement expression based on context, along with the reason for the change, rather than mechanical synonym replacement
Optimized Copy Generation Directly outputs the complete compliant version after replacement, with replacement locationsboldedand marked, preserving the original tone and style

Highlights

  • Four Input Methods: Supports directly pasting copy, uploading TXT/DOC/DOCX files, uploading images to automatically extract text, and pasting web page links
  • Batch Detection for Long Copy: Automatically reminds when exceeding 3000 characters, supports splitting into batches at natural sentence breaks for detection, and automatically merges results
  • English False Match Filtering: Built-in English word recognition will not mistakenly identify "ass" in "Glasswing" as a prohibited word
  • Network Exception Fault Tolerance: Automatically retries when API requests encounter 5xx, timeouts, or connection failures, without manual intervention
  • Data Privacy Protection: Copy is sent to the detection service through an encrypted connection and is not stored locally

One-Click Installation

Prerequisites

  • Python 3.7+ Runtime Environment
  • pip Package Manager
  • Registered Red Fox Hub account and obtained API Key

Installation Steps

  1. Place this Skill folder into your platform's Skill directory
  2. Install Python dependencies:
pip install requests python-docx beautifulsoup4 playwright
playwright install chromium
  1. Configure API Key (see below)

API Key Configuration

Get API Key

  1. Visit Red Fox Hub official website to learn more about the service
  2. Go to registration page Register an account
  3. Newly registered users will receive free credits, and can immediately start using the API service
  4. After registering and logging in, get the API Key in the personal center, in the format ak_xxxxxxxx

Configuration method

Configuration method Operation Description
Environment variables (recommended) export REDFOX_API_KEY=ak_xxxxxxxx Takes effect in the current terminal session
Shell configuration file Write the above export statement into ~/.bashrc or ~/.zshrc, execute source ~/.bashrc takes effect permanently, the script automatically reads it

Priority for the script to obtain the Key: environment variable REDFOX_API_KEY → Shell configuration file automatic scan → prompt the user to configure


Usage Guide

Basic Usage

Method 1: Paste the copy directly

The most commonly used method, suitable for quickly checking drafts:

User: Help me check whether this WeChat official account draft contains prohibited words: this whitening miracle product is really so effective, after using it for three days I became one shade whiter

Assistant: Automatically detects and outputs prohibited word annotations, a replacement suggestions table, and optimized copy

Method 2: Upload a file

Supports TXT, DOC, and DOCX formats; upload directly and it will be automatically read and checked.

Method 3: Upload an image

Upload a poster screenshot or a post screenshot, and the system automatically extracts the text in the image for detection (only extracts text content, does not analyze the image's visual style).

Method 4: Paste a web link

Provide the article URL, and the system automatically scrapes the page body content for detection.

Notes:

  • The platform is fixed as WeChat official account, no need to specify manually
  • It is recommended that a single submission not exceed 3000 characters; if it exceeds, you will be asked whether to check it in batches
  • Content exceeding 10000 characters is not currently supported; it is recommended to split it manually into batches
  • PDF files are not supported; please convert them to images or text files before uploading

Command Quick Reference

Command Purpose
python scripts/check_sensitive_words.py --content="文案" Detect text content
python scripts/check_sensitive_words.py --file=/path/file.txt Detect file content
python scripts/check_sensitive_words.py --url=https://... Detect web content
python scripts/check_sensitive_words.py --file=/path/file.txt --extract-only Extract text only, no detection

Usage Scenarios

Scenario 1: Self-check before publishing a WeChat official account post

Role: WeChat official account operator

Need: Before publishing a post, confirm there are no superlative terms or prohibited promotional wording, to avoid deletion, modification, or account suspension by the platform

How to use:

  1. After writing the post, paste it directly into the conversation
  2. View the prohibited word annotation results
  3. Copy the optimized copy to replace the original and publish

Expected effect: Eliminate compliance risks in advance and reduce the probability of deletion


Scenario 2: Batch pre-review of multiple short copies

Role: New media editor

Need: Produce multiple short articles daily and need to run a unified compliance check before publishing

How to use:

  1. Merge multiple copies into one TXT file and upload it
  2. The system automatically checks all content in batches
  3. Download the merged optimized copy file

Expected effect: Complete multiple checks at once and improve review efficiency


Scenario 3: Activity landing page copy spot check

Role: Brand/Marketing team

Requirement: Confirm there is no violation risk in the copy before the H5 page or activity landing page goes live

How to use:

  1. Provide the page URL
  2. The system automatically extracts the body text and checks it
  3. Correct the violating wording according to the replacement suggestions

Expected result: Avoid the activity page being reported or taken down due to prohibited words


Scenario 4: Poster/Tweet image text compliance check

Role: Designer

Requirement: The marketing copy in the poster needs to be ensured not to violate advertising law

How to use:

  1. Upload a screenshot of the poster
  2. The system extracts the text from the image for checking
  3. Modify the design draft after confirming the replacement plan

Expected result: Eliminate text risks at the design stage and reduce rework


Project architecture

Directory structure

wechat-prohibited-word/
├── SKILL.md                  # Skill 说明文档(本文件)
├── scripts/
│   └── check_sensitive_words.py  # 核心检测脚本
└── references/
    └── core_workflow.md      # Agent 执行规程(输出模板、格式铁律等)

Tech stack

Component Technology Description
Runtime environment Python 3.7+ Script execution environment
HTTP requests requests Standard HTTP library, calls the detection API
Document parsing python-docx Word document (.doc/.docx) text extraction
Web page parsing beautifulsoup4 + playwright Static HTML parsing + JS dynamic page rendering
API service RedFox Hub Official prohibited word database, called via POST+JSON

Data flow

用户输入(文本/文件/网页/图片)
    → 脚本提取文本内容
    → HTTPS POST 发送至红狐Hub API
    → API 匹配违禁词库,返回标注结果
    → 脚本过滤英文误匹配,格式化输出 JSON
    → Agent 按模板呈现三板块结果 + 写入优化文案文件

FAQ

Installation and configuration

Q: What should I do if an error occurs when installing dependencies? A: Please confirm that the Python version is ≥3.7 and run the following in order:

pip install --upgrade pip
pip install requests python-docx beautifulsoup4 playwright
playwright install chromium

Q: What should I do if it says "REDFOX_API_KEY is not configured"? A: Please handle it as follows:

  1. Visit redfox.hk to register an account
  2. Copy the API Key in the personal center (format ak_xxxxxxxx)
  3. Run export REDFOX_API_KEY=ak_xxxxxxxx or write to ~/.bashrc

Feature usage

Q: What types of prohibited words are supported for detection? A: Covers 10+ categories including advertising law superlatives ("best", "first", etc.), prohibited medical beauty claims, financial return promises, exaggerated education and training promotion, false advertising wording, and induced sharing phrases.

Q: How should long copy be handled? A: Copy within 3,000 characters is checked directly; if it exceeds 3,000 characters, it will automatically ask whether to check in batches, splitting at natural sentence breaks to ensure semantic integrity; if it exceeds 10,000 characters, manual batching is recommended.

Q: Will English content be misjudged? A: No. The script has built-in filtering for false English matches, and substrings within normal English words will not be flagged as prohibited words.


Troubleshooting

Q: The detection interface times out or reports an error? A: The script has a built-in automatic retry mechanism (up to 2 times). If it still fails, please try again later. If the issue persists, please contact the service provider.

Q: Web page content extraction failed? A: Some pages that require login or have anti-scraping mechanisms cannot be extracted. It is recommended to directly copy the page text and paste it for detection.

Q: The uploaded file cannot be recognized? A: Supported text file formats: TXT, DOC, DOCX, CSV, MD, LOG, JSON, XML, HTML. PDF is not supported; please convert it to an image or text file.


Get Help

If you have other questions, you can get support through the following methods:

  • 🌐 Visit Red Fox Hub to view the documentation
  • 📧 Contact the service provider by email

Agent Execution Protocol: Before performing detection and formatted output,you must first read and strictly follow references/core_workflow.md the full text. This document contains complete execution details such as output templates, formatting iron rules, batch inquiry scripts, and an exception handling table.