Skip to content
Back to skills

Content Sanitizer

ASecurity

Insulating layer between raw web content and agent context. Protects against prompt injection attacks by sanitizing HTML, detecting adversarial patterns, and extracting only safe text.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add Stranglehold/Exocortex --skill content-sanitizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Content Sanitizer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Content Sanitizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/stranglehold-content-sanitizer-e28fe7c6/badge)](https://www.skillsdirectory.com/skills/stranglehold-content-sanitizer-e28fe7c6)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Content Sanitizer Skill

## Overview
Insulating layer between raw web content and agent context. Protects against prompt injection attacks by sanitizing HTML, detecting adversarial patterns, and extracting only safe text.

## Capabilities
- **HTML Sanitization**: Strips scripts, iframes, event handlers, dangerous elements
- **Instruction Detection**: Identifies common prompt injection patterns
- **Safe Fetching**: Bounded extraction of web content with automatic sanitization
- **Content Flagging**: Reports suspicious patterns without exposing raw data

## Usage
```python
import sys
sys.path.insert(0, '/a0/usr/skills/content-sanitizer')
from content_sanitizer.sanitizer import ContentSanitizer

# Sanitize HTML/text
result = ContentSanitizer.clean(raw_html_or_text)
print(f"Safe: {result.is_safe()}")
print(result.clean_text)  # Only safe text content

# Fetch and sanitize a URL directly
result = ContentSanitizer.fetch_safe("https://example.com")
print(result.clean_text)
```

## Architecture
Raw Web Content → Content Sanitizer (Insulation Layer) → Safe Text Only
                    ↓
            • Strips scripts/iframes
            • Removes event handlers  
            • Detects instruction patterns
            • Extracts text only

Files in this skill

  • SKILL.md1.2 KB
  • content_sanitizer/__init__.py60 B
  • content_sanitizer/sanitizer.py5.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.