Jump to related tools in the same category or review the original source on GitHub.

Web & Frontend Development @harukaon Updated 6/28/2026 1,189 downloads 0 stars Security: Pass

Message Injector OpenClaw Plugin & Skill | ClawHub

Looking to integrate Message Injector into your AI workflows? This free OpenClaw plugin from ClawHub helps you automate web & frontend development tasks instantly, without having to write custom tools from scratch.

What this skill does

OpenClaw plugin that prepends custom text to every user message before it reaches the agent. Use for: enforcing memory_search before replies, injecting system-level instructions, adding persistent reminders to every conversation turn. Install as a workspace extension — works on all channels including WebChat, Telegram, Slack, etc.

Install

ClawHub CLI
openclaw skills install @harukaon/message-injector
Node.js (npx)
npx clawhub@latest install message-injector

Full SKILL.md

Open original
Metadata table.
namedescription
message-injectorOpenClaw plugin that prepends custom text to every user message before it reaches the agent. Use for: enforcing memory_search before replies, injecting system-level instructions, adding persistent reminders to every conversation turn. Install as a workspace extension — works on all channels including WebChat, Telegram, Slack, etc.

SKILL.md content below is scrollable.

Message Injector

A lightweight OpenClaw workspace extension that uses the before_agent_start hook to inject custom text into every user message via prependContext.

Installation

1. Create the extension directory

mkdir -p ~/.openclaw/workspace/.openclaw/extensions/message-injector

2. Copy the plugin files

Copy scripts/index.ts and scripts/openclaw.plugin.json to the extension directory:

cp scripts/index.ts ~/.openclaw/workspace/.openclaw/extensions/message-injector/
cp scripts/openclaw.plugin.json ~/.openclaw/workspace/.openclaw/extensions/message-injector/

3. Add configuration

Add the following to ~/.openclaw/openclaw.json under plugins.entries:

"message-injector": {
  "enabled": true,
  "config": {
    "enabled": true,
    "prependText": "Your custom text here"
  }
}

4. Restart Gateway

openclaw gateway restart

Configuration

Field Type Default Description
enabled boolean true Enable or disable the injector
prependText string "" Text to prepend before every user message

Example Use Cases

Force memory search:

"prependText": "[⚠️ 回答前必须先 memory_search 检索相关记忆,禁止凭印象回答]"

Add persistent context:

"prependText": "[当前项目:my-app | 技术栈:React + Node.js | 部署环境:AWS]"

Inject safety rules:

"prependText": "[RULE: Always verify file paths before deletion. Never run rm -rf without confirmation.]"

How It Works

The plugin registers a before_agent_start hook. When triggered, it returns { prependContext: prependText } which OpenClaw prepends to the user's message before the agent processes it. This is a hard injection at the Gateway level — the agent cannot skip or ignore it.

Source Code

GitHub: https://github.com/Harukaon/openclaw-message-injector

ClawHub Registry URL: https://clawhub.ai/harukaon/skills/message-injector

Related skills

If this matches your use case, these are close alternatives in the same category.