Openclaw Defender banner
nyosegawa nyosegawa

Openclaw Defender

Communication community

Description

3-layer prompt injection defence for chat bots

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

openclaw-defender

**[日本語](./README.ja.md)** | **[中文](./README.zh.md)** | **[한국어](./README.ko.md)** | **[Español](./README.es.md)** | **[Français](./README.fr.md)** | **[Deutsch](./README.de.md)** | **[Русский](./README.ru.md)** | **[Português](./README.pt.md)** | **[العربية](./README.ar.md)**

3-layer prompt injection defence for chat bots. Protect LLM-powered applications from prompt injection, jailbreaks, and indirect attacks with zero runtime dependencies.

[![npm version](https://img.shields.io/npm/v/openclaw-defender)](https://www.npmjs.com/package/openclaw-defender) [![tests](https://img.shields.io/github/actions/workflow/status/nyosegawa/openclaw-defender/ci.yml?label=tests)](https://github.com/nyosegawa/openclaw-defender/actions) [![license](https://img.shields.io/npm/l/openclaw-defender)](./LICENSE)


Overview

openclaw-defender scans user input through a 3-layer pipeline before it reaches your LLM. Each layer adds increasing sophistication while remaining independently useful:

                        User Input
                            |
                    +-------v--------+
          Layer 1   |  20 Regex/KW   |   < 1 ms, sync
                    |  Rules (i18n)  |
                    +-------+--------+
                            |
                    +-------v--------+
          Layer 2   |  ML Classifier |   ~20 ms, async
                    | (PromptGuard / |
                    |  DeBERTa / API)|
                    +-------+--------+
                            |
                    +-------v--------+
          Layer 3   |  LLM Judgment  |   ~200 ms, async
                    | (Cerebras /    |
                    |  OpenAI / etc) |
                    +-------+--------+
                            |
                    +-------v--------+
                    | Action: block, |
                    | sanitize, warn,|
                    | or log         |
                    +----------------+
  • Layer 1 fires instantly with