Input Validator for Openclaw

A lightweight security utility designed to detect and block malicious commands or prompt injections within AI agent data streams.

sandmark78
v1.0.0
Feb 28, 2026
0
363
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install input-validator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install input-validator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Input Validator?

Input Validator is a specialized security component for AI coding agents, providing a robust layer of protection against malicious inputs. By analyzing text from web pages, uploaded files, and API responses, it identifies dangerous patterns like system-level commands, unauthorized downloads, or unauthorized system access without disrupting the normal developer experience.

As a core part of the Openclaw Skills ecosystem, this tool ensures that automated workflows remain safe from both external threats and internal prompt injection attempts. It is designed to be gentle and non-intrusive, only flagging content that poses a genuine risk while maintaining high-speed performance for real-time applications.

Input Validator Use Cases

  • Validating scraped content after web fetching to prevent executing hidden malicious scripts or shell commands.
  • Scanning user-uploaded files for system-damaging patterns like recursive deletions or permission escalations.
  • Monitoring RSS feeds and external API responses for suspicious strings or unexpected administrative instructions.
  • Neutralizing prompt injection and jailbreak attempts by identifying phrases designed to bypass safety filters.

How Input Validator Works

  1. The skill receives raw input text, a file path, or an API response for security analysis.
  2. It performs a high-speed regex scan against ten categories of dangerous content, including shell injections and miners.
  3. If a critical threat is identified, the skill immediately flags the content as unsafe and provides a block list.
  4. The system then evaluates the input for suspicious patterns related to jailbreaking and prompt manipulation.
  5. A structured result is returned to the agent, allowing for conditional logic based on the safety status of the data.

Input Validator Setup

To get started with this component in the Openclaw Skills environment, ensure Python 3 is available on your system. You can run the validator directly from the command line:

# Validate a simple string
python3 scripts/input-validator.py "Check this content for safety"

# Validate a specific local file
python3 scripts/input-validator.py --file dangerous-script.txt

Input Validator Data Schema & Taxonomy

The skill returns a standardized JSON object that can be easily parsed by other agents or scripts.

Field Type Description
safe Boolean Final safety determination (False if dangerous patterns exist).
warnings Array List of suspicious patterns detected, such as jailbreak attempts.
dangerous Array List of critical security threats detected, such as 'rm -rf' commands.

Input Validator Advanced Features

  • Customizable pattern matching allows developers to add new regex rules to the dangerous or suspicious categories.
  • Multi-agent integration support enables the validator to act as a middleware for other Openclaw Skills.
  • Strict mode toggle for higher-security environments that require more aggressive filtering.
  • Lightweight performance profile with sub-50ms execution time and less than 5MB of memory usage.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*