moltguard-zh

moltguard-zh is a skill for Claude Code, Codex from L-LesterYu/OpenClaw-hot-skills-zh. It costs 58 tokens per session (1,241 once invoked), scanned A, original, MIT.

A security plugin for OpenClaw that checks messages and tool results for prompt-injection attacks, where hidden instructions try to redirect an AI agent. It can also run a local gateway to remove personal data before sending prompts to a language model.

In plain words
What is it for?
It is for scanning agent messages and tool output, blocking risky tool calls, recording security events, and optionally masking sensitive data before requests are sent.
Why use it?
It helps stop malicious instructions in external content from causing unwanted tool calls. Optional local cleaning can keep details such as card numbers and passwords out of model requests.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit It is for scanning agent messages and tool output, blocking risky tool calls, recording security events, and optionally masking sensitive data before requests are sent.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add L-LesterYu/OpenClaw-hot-skills-zh --skill moltguard-zh
Clone the repo
git clone --depth 1 https://github.com/L-LesterYu/OpenClaw-hot-skills-zh

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for moltguard-zh

README.md
[![agentmods](https://agentmods.dev/badge/skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh/github.svg)](https://agentmods.dev/skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh)
Your own site
<a href="https://agentmods.dev/skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh"><img src="https://agentmods.dev/badge/skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for moltguard-zh

Your own site · 80×15
<a href="https://agentmods.dev/skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh"><img src="https://agentmods.dev/badge/skills/l-lesteryu/openclaw-hot-skills-zh/moltguard-zh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,241 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.01241
Opus 5 $0.00029 $0.00620
Sonnet 5 $0.00012 $0.00248
Haiku 4.5 $0.00006 $0.00124

Measured 9d ago against content hash 16a164cc67e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

moltguard-zh scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 19 executable files (agent/config.ts, agent/index.ts, agent/runner.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/moltguard-zh/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MoltGuard 安全防护

OpenClaw 原生安全插件,检测和防止提示注入攻击

🛡️ 功能特性

  • 提示注入检测 - 通过 MoltGuard API 分析工具结果和消息中的恶意提示注入
  • 本地净化网关 - 可选的本地提示词净化,在发送到 LLM 前保护敏感数据
  • 自动注册 - 首次使用时自动注册 API 密钥
  • 灵活配置 - 支持超时、日志记录、拦截策略等高级配置

🚀 快速开始

基本配置

启用基本防护:

{
  "enabled": true
}

启用本地净化网关

{
  "enabled": true,
  "sanitizePrompt": true,
  "gatewayAutoStart": true
}

⚙️ 配置选项

参数 类型 默认值 描述
enabled boolean true 启用或禁用防护
sanitizePrompt boolean false 启用本地提示词净化网关
gatewayPort number 8900 本地净化网关端口
gatewayAutoStart boolean true 插件加载时自动启动网关
blockOnRisk boolean true 检测到注入时拦截工具调用
apiKey string - MoltGuard API 密钥(可选)
timeoutMs number 60000 分析超时时间(毫秒)
autoRegister boolean true apiKey 为空时自动注册 API 密钥
apiBaseUrl string https://api.moltguard.com MoltGuard API 基础 URL

🔍 工作原理

1. 检测模式

  • 工具结果分析 - 扫描工具执行结果中的恶意注入内容
  • 消息检测 - 检测输入消息中的提示注入攻击
  • 风险评估 - 基于上下文评估风险级别

2. 净化模式(可选)

  • 本地网关 - 在本地运行提示词净化服务
  • PII 脱敏 - 自动检测并脱敏敏感信息
  • 隐私保护 - 确保敏感数据不会发送到 LLM

🛡️ 安全特性

防护机制

  • 拦截策略 - 检测到风险时自动拦截工具调用
  • 日志记录 - 详细的安全事件日志
  • 实时监控 - 实时监控工具执行和消息内容

合规性

  • 数据本地化 - 敏感数据本地处理,不上传外部服务
  • 透明度 - 所有可能的拦截都会记录日志
  • 可控性 - 用户可以随时调整安全级别

📊 使用建议

高安全性场景

{
  "enabled": true,
  "sanitizePrompt": true,
  "blockOnRisk": true,
  "logPath": "~/.openclaw/logs/security"
}

严格环境(无网络)

{
  "enabled": true,
  "sanitizePrompt": true,
  "autoRegister": false,
  "blockOnRisk": true
}

🔧 故障排除

常见问题

  1. API 密钥问题

    • 确保网络连接正常
    • 检查 API 密钥是否正确
    • 查看日志文件了解详情
  2. 网关启动失败

    • 检查端口是否被占用
    • 确保 gatewayAutoStart 设置正确
    • 查看系统日志了解错误信息
  3. 性能问题

    • 调整 timeoutMs 参数
    • 启用日志记录查看性能瓶颈

📝 日志记录

所有安全事件都会记录到 JSONL 格式的日志文件中:

# 默认日志位置
~/.openclaw/logs/

# 查看日志
cat ~/.openclaw/logs/moltguard-*.jsonl | jq '.'

日志内容包括:

  • 检测到的时间戳
  • 风险级别
  • 检测到的内容
  • 处理结果
  • 相关上下文

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 162 lines · 58 tokens per session scan A 16a164cc67e8

Subscribe to this mod's changes

moltguard-zh is a skill published in the GitHub repository L-LesterYu/OpenClaw-hot-skills-zh (54 stars, last pushed 5mo ago), licensed MIT. It adds 58 tokens to every session and 1,241 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

implementing-cloud-workload-protection

Implements cloud workload protection using boto3 and google-cloud APIs for runtime security monitoring, process anomaly detection, and file integrity checking on EC2/GCE instances. Scans for cryptomining, reverse shells, and unauthorized binaries. Use when building runtime security controls for cloud compute workloads.

xalgorix/xalgorix · 65 tokens

dotnet-reactor

Use when protecting .NET assemblies from reverse engineering — obfuscation, string encryption, control flow obfuscation, anti-debugging, licensing. .NET Reactor: commercial-grade .NET code protection and licensing tool.

znlgis/opengis-skills · 48 tokens

convex-security-audit

Deep security review patterns for authorization logic, data access boundaries, action isolation, rate limiting, and protecting sensitive operations.

waynesutton/convexskills · 28 tokens

convex-security-audit

Deep security review patterns for authorization logic, data access boundaries, action isolation, rate limiting, and protecting sensitive operations.

igor9silva/meseeks · 28 tokens

convex-security-audit

Deep security review patterns for authorization logic, data access boundaries, action isolation, rate limiting, and protecting sensitive operations.

J-StaR-Films-Studios/VibeCode-Protocol-Suite · 28 tokens

git-guardrails

Use this skill to enforce strict safety boundaries on git operations, branch management, and destructive shell commands. Prevents accidental force pushes, hard resets, secret commits, unstashed code loss, and unauthorized production branch modifications.

karthikrshet/aiskills · 50 tokens