Install
openclaw skills install prompt-inspectorDetect prompt injection attacks and adversarial inputs in user text before passing it to your LLM. Use when you need to validate or screen user-provided text for jailbreak attempts, instruction overrides, role-play escapes, or other prompt manipulation techniques. Returns a safety verdict, risk score (0–1), and threat categories. Ideal for guarding AI pipelines, chatbots, and any application that feeds user input into a language model.
openclaw skills install prompt-inspectorPrompt Inspector is a production-grade API service that detects prompt injection attacks, jailbreak attempts, and adversarial manipulations in real time.
📖 For detailed product information, features, and threat categories, see references/product-info.md
Provide your API key via either:
PMTINSP_API_KEY=your-api-key, or~/.openclaw/.env line: PMTINSP_API_KEY=your-api-keyGet your API key at promptinspector.io by creating an app.
Manage custom sensitive words in your dashboard at promptinspector.io.
# Basic detection — prints verdict and score
python3 {baseDir}/scripts/detect.py --text "..."
# JSON output
python3 {baseDir}/scripts/detect.py --text "..." --format json
# Override API key inline
python3 {baseDir}/scripts/detect.py --api-key pi_xxx --text "..."
# Basic detection
node {baseDir}/scripts/detect.js --text "..."
# JSON output
node {baseDir}/scripts/detect.js --text "..." --format json
# Override API key inline
node {baseDir}/scripts/detect.js --api-key pi_xxx --text "..."
# Each line in the file is treated as one text to inspect
python3 {baseDir}/scripts/detect.py --file inputs.txt
# JSON output for automation
python3 {baseDir}/scripts/detect.py --file inputs.txt --format json
Request ID : a1b2c3d4-...
Is Safe : False
Score : 0.97
Category : prompt_injection, jailbreak
Latency : 34 ms
--format json){
"request_id": "a1b2c3d4-...",
"is_safe": false,
"score": 0.97,
"category": ["prompt_injection", "jailbreak"],
"latency_ms": 34
}
Prompt Inspector detects 10 threat categories:
📖 For complete category descriptions, see references/product-info.md
POST /api/v1/detect/sdk
Header: X-App-Key: <your-api-key>
Body: {"input_text": "<text to inspect>"}
Response:
{
"request_id": "string",
"latency_ms": 34,
"result": {
"is_safe": false,
"score": 0.97,
"category": ["prompt_injection"]
}
}
Full API reference: docs.promptinspector.io
--format json when piping output to other tools.--file to minimise round-trip overhead.