跳到正文
TakoAPI
返回技能列表

message-injector

由 harukaon 提供

Web & Frontend Development
401下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

OpenClaw plugin that prepends custom text to every user message before it reaches the agent.

描述

该技能的功能

A workspace extension for OpenClaw that prepends custom text to every user message before the agent processes it. Uses the `before_agent_start` hook to inject text at the Gateway level, making it impossible for the agent to bypass. Works across all channels.

Unlike system prompt edits that vary per session or client, this injects at the Gateway level so the instruction applies universally regardless of which channel or client is used.

何时使用

  • Force memory search before every agent reply
  • Inject current project context into each conversation turn
  • Enforce safety rules like confirming before file deletion
  • Add persistent reminders without modifying each prompt manually
  • Maintain consistent persona or language instructions across sessions

示例工作流

输入

User asks: 'Delete the old logs folder'

智能体
  1. 1

    before_agent_start hook fires on incoming message

  2. 2

    Plugin reads prependText from config: '[RULE: Always verify file paths before deletion. Never run rm -rf without confirmation.]'

  3. 3

    prependContext prepends the rule to the user message

  4. 4

    Agent receives combined message: rule + original user request

  5. 5

    Agent processes message with injected constraint in context

输出

Agent responds by asking for confirmation before proceeding with deletion

前置要求

  • OpenClaw Gateway installed and running

安装

clawhub install harukaon/message-injector

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接