Azure AI Content Safety SDK for Python
Detect harmful content with Azure AI Content Safety
User-generated and AI-generated content can contain harmful material that violates community guidelines. This skill helps you automatically detect hate speech, self-harm content, sexual content, and violence with configurable severity thresholds.
Скачать ZIP навыка
Загрузить в Claude
Перейдите в Settings → Capabilities → Skills → Upload skill
Включите и начните использовать
Протестировать
Использование «Azure AI Content Safety SDK for Python». Text containing mild profanity but no hate speech
Ожидаемый результат:
Hate: severity 0 (Safe), SelfHarm: severity 0 (Safe), Sexual: severity 0 (Safe), Violence: severity 0 (Safe)
Использование «Azure AI Content Safety SDK for Python». Image containing weapons or violent imagery
Ожидаемый результат:
Violence: severity 4 (Medium), other categories: severity 0 (Safe). Content flagged for review based on threshold settings.
Использование «Azure AI Content Safety SDK for Python». Text matching custom blocklist term with halt_on_blocklist_hit enabled
Ожидаемый результат:
BlocklistsMatch: true. Blocked term: [TERM]. Analysis halted before AI processing. Action: reject submission.
Аудит безопасности
БезопасноThis skill contains only documentation for the Azure AI Content Safety Python SDK. Static analysis scanned 0 files with 0 security issues detected. The skill provides legitimate instructions for content moderation using Azure services with proper credential handling via environment variables. No executable code or malicious patterns found.
Оценка качества
Что вы можете построить
Social Media Content Moderation
Automatically screen user posts and comments for harmful content before publishing to your platform.
AI Output Safety Filtering
Pre-screen AI-generated responses to ensure they meet safety guidelines before displaying to end users.
Chat Application Safety
Real-time monitoring of chat messages to detect and block harmful content in customer support or community chats.
Попробуйте эти промпты
Analyze this text for harmful content: [INSERT TEXT]. Report severity levels for hate, self-harm, sexual, and violence categories.
Create a blocklist named [BLOCKLIST_NAME] for my domain. Add these terms: [TERM1, TERM2, TERM3]. Configure text analysis to halt when blocked terms are detected.
Analyze this image for harmful visual content: [IMAGE_FILE or URL]. Use 8-severity scale and return results for all harm categories.
Build a content moderation pipeline that: 1) Checks text against custom blocklists first, 2) Analyzes remaining content with Azure AI, 3) Applies different actions based on severity thresholds (0-2: allow, 4: flag for review, 6+: block). Log all results for audit.
Лучшие практики
- Set severity thresholds appropriate for your audience and platform guidelines
- Use custom blocklists for domain-specific terms that Azure AI may not recognize
- Log all analysis results for audit trails and continuous improvement of moderation policies
Избегать
- Do not rely solely on automated moderation for high-stakes content decisions
- Avoid using default severity thresholds without testing against your specific content types
- Do not store or log raw harmful content in analysis results for compliance reasons
Часто задаваемые вопросы
What Azure subscription do I need for Content Safety?
How do I choose between 4-level and 8-level severity?
Can I analyze content in multiple languages?
What is the difference between blocklists and AI analysis?
How do I handle false positives in content moderation?
Is API Key or Entra ID authentication more secure?
Сведения для разработчиков
Автор
sickn33Лицензия
MIT
Репозиторий
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/azure-ai-contentsafety-pyСсылка
main
Структура файлов
📄 SKILL.md