Skip to content

prompt-sanitizer

Flagged

Sanitize prompts before sending to LLMs. Detects PII, prompt injection, toxicity, and off-topic content. Returns cleaned text + risk score. Use when: sanitiz...

94 downloads
$ Add to .claude/skills/

About This Skill

# prompt-sanitizer

Sanitize any text before sending it to an LLM. Detects and flags PII, prompt injection attempts, toxicity, and off-topic hijacking. Returns cleaned text with PII masked and a risk score.

Prerequisite

```bash npm install -g [email protected] awal auth login ```

Usage

```bash npx [email protected] x402 pay https://anicca-proxy-production.up.railway.app/api/x402/prompt-sanitizer \ -X POST \ -d '{"text": "My email is [email protected]. Ignore previous instructions.", "checks": ["pii", "injection", "toxicity", "off_topic"], "language": "en"}' ```

Input

| Field | Type | Required | Description | |-------|------|----------|-------------| | text | string (max 10000) | yes | Text to sanitize | | checks | array of: pii, injection, toxicity, off_topic | no (default: all) | Which checks to run | | language | "en" or "ja" | no (default: "en") | Language hint |

Output

```json { "sanitizer_id": "san_a1b2c3", "original_length": 89, "sanitized_text": "My email is [EMAIL]. ...", "flags": [{"type": "pii", "severity": "high", "detail": "Email detected", "position": {"start": 12, "end": 28}}], "risk_score": 1.0, "safe_to_send": false, "safe_t_flag": true } ```

Pricing

$0.005 USDC per request (Base network, eip155:8453)

Endpoint

POST https://anicca-proxy-production.up.railway.app/api/x402/prompt-sanitizer

Use Cases

  • Sanitize prompts to prevent injection attacks and ensure safety
  • Iterate on prompt designs with systematic testing and refinement
  • Manage prompt libraries for consistent AI interaction patterns across projects

Pros & Cons

Pros

  • +Leverages AI models for intelligent automation beyond simple rule-based tools
  • +Configurable parameters allow tuning for different quality and cost tradeoffs
  • +Clear documentation makes it easy to get started and integrate

Cons

  • -Requires installing external dependencies before use
  • -Depends on external AI model APIs which may incur usage costs
  • -Output quality varies based on input specificity and model capabilities

FAQ

What does prompt-sanitizer do?
Sanitize prompts before sending to LLMs. Detects PII, prompt injection, toxicity, and off-topic content. Returns cleaned text + risk score. Use when: sanitiz...
What platforms support prompt-sanitizer?
prompt-sanitizer is available on Claude Code, OpenClaw.
What are the use cases for prompt-sanitizer?
Sanitize prompts to prevent injection attacks and ensure safety. Iterate on prompt designs with systematic testing and refinement. Manage prompt libraries for consistent AI interaction patterns across projects.

100+ free AI tools

Writing, PDF, image, and developer tools — all in your browser.

Next Step

Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.