错敏信息检测 API (Sensitive Content Detection)
一个基于 FastAPI 的错敏信息检测服务,用于检测文本中的敏感词、错别字和规范表述问题。
About this skill
This AI agent skill provides a modular capability for comprehensive text content analysis, focusing on sensitive information, typographical errors, and adherence to specific linguistic standards. Built with FastAPI, it offers a robust RESTful API that can be integrated into various applications or automated workflows by AI agents. It is particularly useful for content moderation, compliance checks, and improving text quality in applications dealing with user-generated content, official documents, or any text requiring careful scrutiny. The service can identify potential compliance risks, improve readability, and ensure brand consistency across digital platforms. Developers and content creators can leverage this skill to automatically pre-screen text, significantly reducing manual review efforts and ensuring that published or stored content meets desired standards before deployment, contributing to safer and more professional communication.
Best use case
The primary use case for this skill is automated content moderation and quality assurance for text-based content. Organizations and individuals dealing with large volumes of text, such as online platforms, publishers, or internal communication systems, can benefit significantly by automatically ensuring their content is free from sensitive information, common errors, and non-compliant phrasing before it reaches its audience.
一个基于 FastAPI 的错敏信息检测服务,用于检测文本中的敏感词、错别字和规范表述问题。
Users should expect a detailed JSON response indicating identified issues like sensitive words, misspellings, and style inconsistencies within the provided text, along with relevant contextual information and suggestions for correction.
Practical example
Example input
Please set up the Sensitive Content Detection API service locally using the provided instructions, then use its `/api/safeguard/check` endpoint to analyze the Chinese text: '这是一段包含错别字和潜在敏感信息的测试文本。' (This is a test text containing typos and potentially sensitive information.) Use 'your-user-key' for the userKey parameter.
Example output
The text '这是一段包含错别字和潜在敏感信息的测试文本。' was successfully analyzed. The service identified a misspelling related to '错别字' and flagged '敏感信息' as potentially sensitive content. The operation returned a success code (0) and message 'ok'.
When to use this skill
- To moderate user-generated content for sensitive material or policy violations.
- When ensuring text compliance with specific industry or company-defined standards and terminology.
- For automatically identifying and correcting common typos and grammatical errors in written content.
- To integrate automated content quality checks into CI/CD pipelines or content publishing workflows.
When not to use this skill
- When an offline, client-side only detection solution is strictly required without any server component.
- For real-time, ultra-low latency detection on extremely high-volume data streams without specialized infrastructure.
- If no programming or API integration is desired, and a simple graphical user interface tool is sufficient.
- For highly nuanced linguistic analysis requiring human-level contextual understanding beyond pattern matching.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/hj-check-test/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How 错敏信息检测 API (Sensitive Content Detection) Compares
| Feature / Agent | 错敏信息检测 API (Sensitive Content Detection) | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
一个基于 FastAPI 的错敏信息检测服务,用于检测文本中的敏感词、错别字和规范表述问题。
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for ChatGPT
Find the best AI skills to adapt into ChatGPT workflows for research, writing, summarization, planning, and repeatable assistant tasks.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
SKILL.md Source
# 错敏信息检测 API (Sensitive Content Detection)
一个基于 FastAPI 的错敏信息检测服务,用于检测文本中的敏感词、错别字和规范表述问题。
## 功能特性
- 敏感词检测:识别文本中的敏感词汇
- 错别字检测:发现拼写错误和输入错误
- 规范表述检测:检查专用表述是否符合规范
- RESTful API:简单的 HTTP 接口调用
- 详细日志记录:完整的请求/响应日志
## 快速开始
### 环境要求
- Python 3.11+
- pip
### 安装依赖
```bash
pip install -r requirements.txt
```
### 启动服务
```bash
python main.py
```
服务将在 `http://localhost:8080` 启动。
## API 接口
### 检测接口
**请求**
```
POST /api/safeguard/check
Content-Type: application/json
```
**请求参数**
| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| userKey | string | 是 | 用户密钥 |
| content | string | 是 | 待检测的文本内容 |
| sensitiveCodeList | array | 否 | 指定检测的错敏类型 |
**请求示例**
```json
{
"userKey": "your-user-key",
"content": "这是一段需要检测的文本"
}
```
**响应示例**
```json
{
"code": 0,
"message": "ok",
"content": [
{
"sentencePos": 0,
"termPos": 0,
"wrongTerm": "错误的词",
"expectTerms": ["正确的词"],
"errLevel": 3,
"type": 3,
"newType": "A0200E01",
"explain": "错误说明",
"sentence": "错误词所在句子",
"newTypeMeaning": "错误类型含义"
}
]
}
```
**响应字段说明**
| 字段 | 类型 | 说明 |
|------|------|------|
| code | number | 响应码,0表示成功,1表示失败 |
| message | string | 响应消息 |
| content | array | 检测到的问题列表 |
### 其他接口
| 接口 | 方法 | 说明 |
|------|------|------|
| `/` | GET | 服务信息 |
| `/health` | GET | 健康检查 |
| `/docs` | GET | API 文档(Swagger UI) |
## 配置说明
### 环境变量
| 变量 | 默认值 | 说明 |
|------|--------|------|
| PORT | 8080 | 服务监听端口 |
| SAFEGUARD_API_URL | https://safeguard-pre.ucap.com.cn/... | 上游API地址 |
| API_TIMEOUT | 30 | API请求超时时间(秒) |
## 日志
日志文件位于 `logs/app.log`,记录了:
- 服务启动/关闭信息
- 每个请求的详细信息
- 上游API调用情况
- 错误和异常信息
## 使用示例
### cURL
```bash
curl -X POST "http://localhost:8080/api/safeguard/check" \
-H "Content-Type: application/json" \
-d '{
"userKey": "your-key",
"content": "待检测文本"
}'
```
### Python
```python
import requests
response = requests.post(
"http://localhost:8080/api/safeguard/check",
json={
"userKey": "your-key",
"content": "待检测文本"
}
)
print(response.json())
```
### JavaScript
```javascript
fetch("http://localhost:8080/api/safeguard/check", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({
userKey: "your-key",
content: "待检测文本"
})
})
.then(res => res.json())
.then(data => console.log(data));
```
## 项目结构
```
python-app/
├── main.py # 主应用文件
├── models.py # 数据模型定义
├── client.py # HTTP客户端(已废弃)
├── service.py # 业务服务(已废弃)
├── requirements.txt # 依赖清单
├── .env # 环境变量配置
├── logs/ # 日志目录
│ └── app.log # 应用日志
└── SKILL.md # 本文件
```
## 许可证
MIT LicenseRelated Skills
content-parser
Extract and parse content from URLs. Triggers on: user provides a URL to extract content from, another skill needs to parse source material, "parse this URL", "extract content", "解析链接", "提取内容".
content-automation
内容创作自动化工具 Skill。支持社交媒体内容生成、视频脚本创作、定时发布任务管理。当用户需要批量生成内容、自动化社交媒体运营或创建视频脚本时触发。
daily-fun-content
每日趣味内容生成器 - 每天早上搜索网络,预缓存一天的笑话、热梗、聊天技巧。包括搞笑段子、网络热梗解释、高情商对话示例。用 cron 触发,内容缓存到文件,心跳时随机取用。
wechat-content-creator
Create high-quality WeChat public account articles with high eCPM. Use when writing WeChat articles, optimizing titles, selecting topics, or improving content quality. Covers 8 golden opening templates, SCQA structure, long-tail keyword integration, high-value niches like legal, finance, career, and compliance guidelines. Triggers on requests like write WeChat article, 公众号文章, 爆款文案, title optimization, 选题, eCPM optimization, or 长尾关键词.
content-factory
Multi-agent content production system. One piece of source content becomes many formats — social posts, email, scripts, headlines, and more. Five specialized agent personas: Writer, Remixer, Editor, Scriptwriter, and Headline Machine.
youtube-content-manager
YouTube内容管理后台,支持AI选题生成、脚本创作、标题优化、SEO描述生成、缩略图文案建议、发布记录管理和数据分析。集成SkillPay支付接口,每次调用收0.001USDT。
youtube-content-manager-pro
All-in-one YouTube Content Management Tool, AI generate topics, scripts, titles, SEO descriptions, tags, thumbnails, analytics. $0.005 USDT per use.
social-media-content-scraper-pro
Social Media Content Bulk Scraper, extract articles/posts from WeChat, Instagram, TikTok, YouTube, export to Markdown/HTML with full metadata. $0.005 USDT per use.
meshtastic-detection
Receive DETECTION_SENSOR_APP alerts from Meshtastic LoRa devices via USB. When the remote sensor GPIO triggers (preset target detected), store the event and alert the user immediately.
mia-content-creator
AI agent content creation and monetization across platforms
xhs-content-gen
小红书爆款内容生成器 - 自动创作标题、正文、标签,基于真实运营经验优化。 适用于:育儿、知识分享、生活方式等垂直领域。 触发词:"生成小红书内容"、"写小红书文案"、"爆款标题"
content-engine
Full-stack content creation pipeline from research to publication. Analyzes top-ranking competitor articles, identifies content gaps, generates SEO-optimized blog posts with brand voice, adds meta descriptions and internal link suggestions, formats for WordPress/Ghost/Notion/Hugo/Jekyll, and creates platform-specific social media promotion posts for LinkedIn, Twitter/X, and Reddit. Use this skill for: blog post writing, article creation, SEO content, keyword research, content gap analysis, content strategy, content calendar planning, "write a blog post about X", competitor content analysis, "what should I write about next", social media post generation from content, content marketing automation, editorial workflow, copywriting, long-form content, content optimization, meta description generation, or any request involving researching a topic and producing publish-ready content. Replaces manually chaining web research, writing, SEO tools, CMS formatting, and social scheduling into one step.