Skip to main content

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
Option 2: OpenClaw configuration file Add to ~/.openclaw/.env:

Install the Skill

Clone the Skills repository:
The Skill is now ready to use with your AI coding assistant.

Available Commands

The Skill exposes two commands:

/inspect — Detect Single Text

Analyze a piece of text for prompt injection attacks. Python:
Node.js:
Options:
  • --text — The text to analyze (required)
  • --format json — Output in JSON format for automation
  • --api-key — Override the API key inline
Example output (human-readable):
Example output (JSON):

/inspect_batch — Detect Multiple Texts

Analyze multiple texts from a file (one text per line). Python:
Node.js:
Options:
  • --file — Path to input file (required)
  • --format json — Output in JSON format
  • --api-key — Override the API key inline

Detection Results

Risk Score

The score 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:
Manage your custom sensitive words in the dashboard at promptinspector.io.

Usage in AI Coding Tools

When using OpenClaw or Claude Code, you can invoke the Skill naturally: Example conversation:
The AI assistant automatically calls the Skill and interprets the results for you.

API Endpoint

The Skill uses the following API endpoint:
Response:

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 json when piping output to other tools or scripts.
  • Batch Processing: For bulk workloads, use --file with /inspect_batch to 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:
  1. Verify PMTINSP_API_KEY is set in your environment
  2. Check ~/.openclaw/.env contains the correct key
  3. Try passing --api-key directly 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.md exists 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.

Enterprise Support

For enterprise plans, self-hosting options, or custom integrations, contact [email protected].