Guardian Shield — Prompt Injection Protection for Openclaw

A local-first security layer designed to detect and block prompt injection, jailbreaks, and malicious instructions before they reach your AI agent.

jtil4201
v1.1.1
Mar 4, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install guardian-shield

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 guardian-shield 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 Guardian Shield — Prompt Injection Protection?

Guardian Shield is a robust, privacy-focused security tool built for the Openclaw Skills ecosystem. It provides a defensive barrier against sophisticated adversarial attacks, including instruction overrides, system prompt spoofing, and data exfiltration attempts. By running 100% locally with zero external network calls, it ensures that your sensitive data and agent logic remain secure without compromising performance or privacy.

This skill is essential for developers building autonomous agents that interact with untrusted input, such as web content, user-generated messages, or third-party documents. Guardian Shield uses a combination of curated regex patterns and machine learning models to provide real-time threat detection and automated response handling within Openclaw Skills workflows.

Guardian Shield — Prompt Injection Protection Use Cases

  • Scanning incoming group chat messages from untrusted users to prevent agent hijacking.
  • Validating content retrieved via web search or scraping tools to strip out hidden instructions.
  • Analyzing uploaded PDF or HTML documents for embedded prompt injection attacks.
  • Protecting against social engineering attempts designed to leak system prompts or credentials.
  • Monitoring context history to prevent memory poisoning or indirect injection through external data.

How Guardian Shield — Prompt Injection Protection Works

  1. The skill intercepts or receives input from untrusted sources like web fetches, user messages, or file contents.
  2. It runs the content through a multi-tier scanner utilizing 100 curated patterns and optional machine learning models.
  3. A safety verdict is generated with a numerical threat score ranging from 0 to 100 based on the detected risk.
  4. Based on the score and local configuration, the skill either clears the content for processing, issues a warning, or blocks the input entirely.
  5. Detailed reports are generated for detected threats, including the source, specific category, and the final action taken.

Guardian Shield — Prompt Injection Protection Setup

Ensure you have Python 3.10+ installed. To use the scanner as part of your Openclaw Skills setup, you can run it via the CLI or integrate it directly into your Python scripts.

# Install optional dependencies for ML and document support
pip install onnxruntime PyPDF2 beautifulsoup4

# Run a scan on a specific file
python3 scripts/scan.py --file document.txt

# Check the scanner status and configuration
python3 scripts/scan.py --info

Configuration is managed via config.json where you can define scan_mode (auto, thorough, or regex) and set your preferred min_score_to_block threshold.

Guardian Shield — Prompt Injection Protection Data Schema & Taxonomy

Guardian Shield categorizes threats and organizes data based on the following taxonomy:

Score Verdict Recommended Action
0-39 clean Process normally
40-69 suspicious Warn the user and proceed with caution
70-100 threat Block the content and notify the user

It detects 100 curated patterns across categories including Prompt Injection, Jailbreak, Data Exfiltration, Social Engineering, Code Execution, and Context Manipulation. Integration via Openclaw Skills allows for structured reporting of these results in a standardized format.

Guardian Shield — Prompt Injection Protection Advanced Features

  • Local Machine Learning inference using ONNX Runtime for high-accuracy threat detection without cloud latency.
  • Multilingual support covering attacks in Spanish, French, German, Japanese, and Chinese.
  • Customizable response actions (warn vs. block) based on granular, configurable score thresholds.
  • Hardware acceleration support via CUDA for high-throughput scanning environments.
  • Comprehensive document scanning for PDF and HTML files to catch indirect injections.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*