微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🛡️

AI 执行前的智能安全门

Skill · v0.6.3
这个包缺安装入口,装上也不会生效 缺 SKILL.md 或 frontmatter 不完整(BAD_NAME)。我们仍保留下载,方便你自行查看内容。
AI 增强 安全 A 级 作者 meshailabs 公开目录收录
2.2k 下载 3 安装 4.5k 收藏 12 浏览

简介

AI代理信任层,通过策略检查与代码验证在危险操作前拦截风险,适用于文件删除、权限提升等高风险场景

原始描述

Verification gating for AI-generated artifacts. Policy checks to catch dangerous patterns before execution.

通过你的 Agent 添加

安装目录:skill-22094/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/skill-22094/
Codex CLI~/.codex/skills/skill-22094/
DeepSeek Harness~/.agents/skills/skill-22094/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: moltblock — Trust Layer for AI Agents description: Verification gating for AI-generated artifacts. Policy checks and code verification to catch dangerous patterns before execution.

moltblock — Trust Layer for AI Agents

Description

Moltblock provides verification gating for AI-generated artifacts. Before any high-risk action (file deletion, credential access, system modification, network exfiltration), the moltblock_verify tool runs policy checks and optional code verification to catch dangerous patterns.

When to Use

Use moltblock_verify when the task involves:

  • High risk (always verify): Destructive operations (rm -rf, DROP TABLE), privilege escalation (sudo, chmod 777), credential/key access (.ssh/, id_rsa, .env), system modification, raw disk writes
  • Medium risk (verify when uncertain): Network requests (curl, wget, fetch), file writes, database modifications, subprocess spawning, dynamic code evaluation
  • Low risk (skip verification): Simple text responses, math, reading public information, code that doesn't touch the filesystem or network

Tool: moltblock_verify

Verify a task before execution.

Usage

npx moltblock "<task description>" --provider <provider> --json

Parameters

Parameter Required Description
task Yes The task description to verify
--provider No LLM provider: openai, google, zai, local (auto-detected from env)
--model No Model override
--test No Path to test file (for code verification)
--json No Output structured JSON result

Environment Variables

Set one of these for provider auto-detection:

  • OPENAI_API_KEY — OpenAI
  • GOOGLE_API_KEY — Google/Gemini
  • MOLTBLOCK_ZAI_API_KEY — ZAI

Example

# Verify a task
npx moltblock "implement a function that validates email addresses" --json

# Verify code with tests
npx moltblock "implement a markdown-to-html converter" --test ./tests/markdown.test.ts --json

Output (JSON mode)

{
  "verification_passed": true,
  "verification_evidence": "All policy rules passed.",
  "authoritative_artifact": "...",
  "draft": "...",
  "critique": "...",
  "final_candidate": "..."
}

Installation

npm install -g moltblock

Or use directly with npx (no install needed):

npx moltblock "your task" --json

Configuration

Optional. Place moltblock.json in your project root or ~/.moltblock/moltblock.json:

{
  "agent": {
    "bindings": {
      "generator": { "backend": "google", "base_url": "https://generativelanguage.googleapis.com/v1beta/openai/", "model": "gemini-2.0-flash" },
      "critic": { "backend": "google", "base_url": "https://generativelanguage.googleapis.com/v1beta/openai/", "model": "gemini-2.0-flash" },
      "judge": { "backend": "google", "base_url": "https://generativelanguage.googleapis.com/v1beta/openai/", "model": "gemini-2.0-flash" }
    }
  },
  "policy": {
    "rules": [
      {
        "id": "custom-allow-tmp",
        "description": "Allow operations in /tmp",
        "target": "artifact",
        "pattern": "\\/tmp\\/",
        "action": "allow",
        "category": "destructive-cmd",
        "enabled": true
      }
    ]
  }
}

Disclaimer

Moltblock reduces risk but does not eliminate it. Verification is best-effort — policy rules and LLM-based checks can miss dangerous patterns. Always review generated artifacts before executing them. The authors and contributors are not responsible for any damage, data loss, or security incidents resulting from the use of this tool. Use at your own risk.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

ai-safetycode-verificationpolicy-enginellm-securityagent-guardrailscli-toolnpm-package

同类 Skill