Anti-Injection Skill for Openclaw

A high-priority security framework providing multi-layered protection against prompt injections, memory poisoning, and unauthorized tool execution.

georges91560
v1.1.2
Feb 21, 2026
0
2.2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install anti-injection-skill

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 anti-injection-skill 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 Anti-Injection Skill?

The anti-injection-skill is a sophisticated defense mechanism designed to safeguard autonomous agents against modern prompt injection threats. Optimized for Openclaw Skills, this tool acts as a pre-ingestion firewall that intercepts all user inputs and tool outputs to ensure they conform to safe operational parameters. It follows OWASP LLM Top 10 2026 standards, providing a professional-grade security posture for developers building complex agentic workflows.

Beyond simple keyword filtering, this skill utilizes a dynamic security scoring system and semantic analysis to detect sophisticated evasion tactics, including role hijacking and system prompt leakage. By maintaining a high-priority position in the agent execution chain, it ensures that malicious instructions are neutralized before they can influence the agent's decision-making process or compromise sensitive data within Openclaw Skills environments.

Anti-Injection Skill Use Cases

  • Preventing jailbreak attempts such as ignore previous instructions or DAN-style overrides.
  • Safeguarding agent identity and system configuration from extraction probes.
  • Defending against memory and context poisoning in RAG-based systems.
  • Restricting tool execution to authorized paths and safe shell commands.
  • Automating security incident logging and alerting for high-risk environments.

How Anti-Injection Skill Works

  1. Pre-Ingestion Scan: Analyzes raw input for blacklisted patterns, semantic similarity to known attacks, and multimodal injection signatures.
  2. Memory Integrity Check: Verifies the SHA256 hashes of core identity and memory files to detect unauthorized tampering.
  3. Tool Security Wrapping: Intercepts tool calls to validate file paths, block dangerous shell commands, and enforce rate limits.
  4. Dynamic Scoring: Assigns a security score from 0-100; a score below 40 triggers an immediate lockdown of the agent's capabilities.
  5. Post-Output Sanitization: Scans agent responses for leaked secrets, API keys, or system fragments before the output is delivered to the user.

Anti-Injection Skill Setup

To deploy this defense within your Openclaw Skills architecture, set the skill to the highest priority in your agent configuration.

# Optional: Configure a security webhook for external alerts
export SECURITY_WEBHOOK_URL="https://your-siem.com/events"

Ensure your agent config includes the following:

{
  "skills": {
    "anti-injection-skill": {
      "enabled": true,
      "priority": "highest"
    }
  }
}

Anti-Injection Skill Data Schema & Taxonomy

The skill maintains local security logs to track the safety status of your Openclaw Skills workspace.

File Description Access
/workspace/AUDIT.md Continuous log of security events and tool call validations. Write
/workspace/INCIDENTS.md Detailed documentation of critical blocked attacks and violations. Write
/workspace/heartbeat-state.json Stores the current security score and health check state. Write
/workspace/SOUL.md Core identity file used for hash verification. Read

Anti-Injection Skill Advanced Features

  • Multimodal detection patterns for identifying hidden instructions in PDFs and images.
  • Fragmentation attack detection to prevent malicious payloads split across multiple messages.
  • Semantic intent mapping to block paraphrased attacks that bypass traditional keyword filters.
  • Automated lockdown mode that restricts meta-queries and sensitive tools during high-risk scenarios.
  • Recovery bonus system that gradually restores the security score after verified safe interactions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*