What are Skills?
Skills are reusable capabilities that AI coding assistants can invoke to perform specific tasks. Prompt Inspector provides a Skill that enables tools like OpenClaw and Claude Code to detect prompt injection attacks directly within your development workflow.Supported Clients
The Prompt Inspector Skill works with:- OpenClaw — AI-powered development assistant
- Claude Code — Anthropic’s coding agent
- Any other Skill-compatible AI coding tool
Installation
Get Your API Key
Create an App at promptinspector.io and copy your App API Key.Set Up Environment Variable
Provide your API key via either: Option 1: System environment variable~/.openclaw/.env:
Install the Skill
Clone the Skills repository:Available Commands
The Skill exposes two commands:/inspect — Detect Single Text
Analyze a piece of text for prompt injection attacks.
Python:
--text— The text to analyze (required)--format json— Output in JSON format for automation--api-key— Override the API key inline
/inspect_batch — Detect Multiple Texts
Analyze multiple texts from a file (one text per line).
Python:
--file— Path to input file (required)--format json— Output in JSON format--api-key— Override the API key inline
Detection Results
Risk Score
Thescore field ranges from 0.0 (safe) to 1.0 (certain threat). Higher scores indicate stronger evidence of malicious intent.
Threat Categories
Prompt Inspector detects 10 threat categories:Usage in AI Coding Tools
When using OpenClaw or Claude Code, you can invoke the Skill naturally: Example conversation:API Endpoint
The Skill uses the following API endpoint:Best Practices
- Input Length: Keep text under the limit for your plan tier. Very long inputs may be rejected with HTTP 413.
- Automation: Use
--format jsonwhen piping output to other tools or scripts. - Batch Processing: For bulk workloads, use
--filewith/inspect_batchto minimize round-trip overhead. - Custom Words: Configure custom sensitive words in your dashboard for tenant-specific filtering.
Troubleshooting
API Key Not Found
If you see an error about missing API key:- Verify
PMTINSP_API_KEYis set in your environment - Check
~/.openclaw/.envcontains the correct key - Try passing
--api-keydirectly to the command
Connection Errors
If detection requests fail:- Verify your API key is valid at promptinspector.io
- Check your network connection
- Ensure you haven’t exceeded your plan’s rate limits
Skill Not Recognized
If OpenClaw or Claude Code doesn’t recognize the Skill:- Verify the Skill directory is in the correct location
- Check that
SKILL.mdexists and is properly formatted - Restart your AI coding assistant
View Source on GitHub
Find the complete Skill source code, scripts, and setup instructions in the repository.

