PromptDome × OpenClaw
API key required — Get yours free at https://promptdome.cyberforge.one/dashboard/api-keys
(Sign up → Dashboard → API Keys → Create Key)
Adds automatic prompt injection detection to any OpenClaw agent. Two components work together:
| Component | What it does | When it fires |
|---|
promptdome-gate hook | Auto-scans every incoming message; injects ⚠️ warning if injection detected | Every message:received — zero agent code required |
promptdome_scan tool |
Explicit scan agent can call on any content | On demand — web content, files, tool outputs |
Quick Setup (60 seconds)
CODEBLOCK0
That's it. The script:
- 1. Tests your API key against the PromptDome API
- Installs
promptdome-gate hook → INLINECODE4 - Installs
promptdome_scan plugin → INLINECODE6 - Saves API key to
openclaw.json env block - Enables the hook automatically
- Prompts you to restart the gateway
Get an API key: https://promptdome.cyberforge.one/dashboard/api-keys
Manual Setup
1. Copy files
CODEBLOCK1
2. Set API key
Add to ~/.openclaw/openclaw.json:
CODEBLOCK2
Or set PROMPTDOME_API_KEY in your shell environment.
3. Enable hook and restart
CODEBLOCK3
What Happens After Install
- - Every incoming message → scanned automatically before the model processes it
- BLOCK (score ≥ 70):
[PROMPTDOME BLOCK] warning injected into conversation - WARN (score ≥ 40): Soft caution note injected
- ALLOW: Silent — no overhead in conversation history
- Scan log: INLINECODE11
- Fail-open: if API is unreachable, messages pass through unblocked
Using the Agent Tool
Enable promptdome_scan in your agent's tool allowlist:
CODEBLOCK4
Then agents call it like any tool — before processing web fetches, search results, uploaded files, or any external content.
Self-Hosted PromptDome
Override the API endpoint:
{
"env": {
"PROMPTDOME_API_KEY": "sk_shield_live_...",
"PROMPTDOME_API_URL": "https://your-instance.com/api/v1/shield"
}
}
Detection Coverage
PromptDome engine covers 32 attack categories including:
- - Prompt injection & jailbreaks
- Fake system events / gateway spoofing
- PII & credential exfiltration
- ClickFix / social engineering
- HTML/DOM injection (browser agents)
- Agentic chain poisoning
- Multilingual evasion (18 languages)
Full category list: https://promptdome.cyberforge.one/docs
PromptDome × OpenClaw
需要 API 密钥 — 免费获取地址:https://promptdome.cyberforge.one/dashboard/api-keys
(注册 → 控制台 → API 密钥 → 创建密钥)
为任意 OpenClaw 智能体添加自动提示注入检测功能。两个组件协同工作:
| 组件 | 功能 | 触发时机 |
|---|
| promptdome-gate 钩子 | 自动扫描每条传入消息;检测到注入时插入 ⚠️ 警告 | 每次 message:received — 无需修改智能体代码 |
| promptdome_scan 工具 |
智能体可对任意内容主动调用扫描 | 按需使用 — 网页内容、文件、工具输出 |
快速配置(60 秒)
bash
bash skills/promptdome/scripts/setup.sh --api-key skshieldliveYOURKEY
完成。该脚本将:
- 1. 测试您的 API 密钥与 PromptDome API 的连接
- 安装 promptdome-gate 钩子 → ~/.openclaw/hooks/promptdome-gate/
- 安装 promptdome_scan 插件 → ~/.openclaw/extensions/promptdome/
- 将 API 密钥保存至 openclaw.json 环境变量块
- 自动启用钩子
- 提示您重启网关
获取 API 密钥: https://promptdome.cyberforge.one/dashboard/api-keys
手动配置
1. 复制文件
bash
钩子(自动扫描)
mkdir -p ~/.openclaw/hooks/promptdome-gate
cp skills/promptdome/hook/HOOK.md ~/.openclaw/hooks/promptdome-gate/
cp skills/promptdome/hook/handler.ts ~/.openclaw/hooks/promptdome-gate/
插件(显式工具)
mkdir -p ~/.openclaw/extensions/promptdome
cp skills/promptdome/plugin/index.ts ~/.openclaw/extensions/promptdome/
2. 设置 API 密钥
添加至 ~/.openclaw/openclaw.json:
json
{
env: {
PROMPTDOMEAPIKEY: skshieldliveYOURKEY
}
}
或在 shell 环境中设置 PROMPTDOMEAPIKEY。
3. 启用钩子并重启
bash
openclaw hooks enable promptdome-gate
openclaw gateway restart
安装后的效果
- - 每条传入消息 → 在模型处理前自动扫描
- 阻止(评分 ≥ 70):对话中注入 [PROMPTDOME BLOCK] 警告
- 警告(评分 ≥ 40):注入温和提醒
- 允许:静默处理 — 不增加对话历史负担
- 扫描日志:~/.openclaw/logs/promptdome-gate.log
- 故障开放:若 API 不可达,消息正常通过不受阻
使用智能体工具
在智能体的工具允许列表中启用 promptdome_scan:
json
{
agents: {
list: [{ id: main, tools: { allow: [promptdome_scan] } }]
}
}
之后智能体可像使用其他工具一样调用它 — 在处理网页抓取、搜索结果、上传文件或任何外部内容之前。
自托管 PromptDome
覆盖 API 端点:
json
{
env: {
PROMPTDOMEAPIKEY: skshieldlive_...,
PROMPTDOMEAPIURL: https://your-instance.com/api/v1/shield
}
}
检测覆盖范围
PromptDome 引擎覆盖 32 种攻击类别,包括:
- - 提示注入与越狱
- 虚假系统事件/网关欺骗
- PII 与凭证泄露
- ClickFix/社会工程
- HTML/DOM 注入(浏览器智能体)
- 智能体链式投毒
- 多语言规避(18 种语言)
完整类别列表:https://promptdome.cyberforge.one/docs