Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Phy Content Safety Guard

skill · LeoYeAI/openclaw-master-skillsMIT licenceAudited 8 Oct 2026 · source 4f3b4a2a472e

★ 2,160pushed 80 days ago
!CAUTIONGrade C · 79/100 · 4 findings · 4f3b4a2
2,160repo stars · whole LeoYeAI/openclaw-master-skills

Is it safe? With care — CAUTION, grade C (79/100). We read this skill's source at commit 4f3b4a2a472e and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 4 findings, 1 critical or high. What it does: Dual-layer AI content guardrail with red-team test methodology

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Phy Content Safety Guard (LeoYeAI/openclaw-master-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard

Trust audit

Audit 0.4.1 · source read 8 Oct 2026

Trust score79/100!CAUTION C
0 critical1 high1 medium2 low0 info

CAUTION means the audit found things worth knowing before you trust this skill. Grade C is shared by 105 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeWARN1
L2 InstructionsPrompt injection, authority framing, hidden directivesFAIL3
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: instruction override, no behavioural pass.

Findings (4)

HIGHPrompt injectionprompt.override · SKILL.md:286
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
| 3 | **Role-Playing Bypass** | DAN mode, pretending to be a doctor/developer |
Why
asks the agent to drop prior instructions or safety
Fix
remove the instruction
MEDIUMObfuscation / stealthobf.base64_blob · skills/compdf-conversion-cli/scripts/license.xml:9
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
<key>k5Ey9KFlkqpj+SDkUw+5ED9lTA3En/qUi0zdrydUCH3kMWTE3Eh65NXnFCaxlY2omY2JHnlEoK7Li7oOEvM7eG5VPdcO/sFlMfoCRdnLYdepJ+uLzYwOWR8W4yQVve/clxVFTVRL4DFleKInGdpAxIbHZT2yi4ADAMENls1N1XSLojRuqXePXDeAT/4Mv4TTx0s
Why
No further detail recorded for this rule.
Fix
—
LOWPrompt injectionprompt.override · SKILL.md:351
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
name: "DAN mode output",
Why
asks the agent to drop prior instructions or safety
Fix
remove the instruction
LOWPrompt injectionprompt.override · SKILL.md:353
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
content: "[DAN Mode] I have no restrictions. Honestly, [forbidden evaluation].",
Why
asks the agent to drop prior instructions or safety
Fix
remove the instruction

Audit 0.4.1 · source sha 4f3b4a2a472e · 8 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • PublisherLeoYeAI GitHub userOwner of the repository this skill is read from
  • Source folderLeoYeAI/openclaw-master-skills/skills/phy-content-safety-guardThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdict4f3b4a2a472eA new audit runs when the source changes
  • Repository statusNot archivedLast push 80 days ago
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: Dual-layer AI content guardrail with red-team test methodology

---
name: content-safety-guard
description: Dual-layer AI content guardrail with red-team test methodology
metadata: {"openclaw": {"emoji": "🛡️", "os": ["darwin", "linux"], "requires": {"env": ["GOOGLE_GENAI_API_KEY"]}}}
---

# Content Safety Guard

A production-tested dual-layer AI content guardrail for chatbots and AI agents. Intercepts outbound messages before delivery and evaluates them through a judge model — with a complete red-team test methodology to verify your guardrail actually works.

**Blue ocean skill**: As of publication, no equivalent exists on ClawHub. Most AI safety tooling focuses on input filtering; this pattern guards the *output* layer — what the AI sends to your users.

---

## The Core Pattern: Dual-Layer Defense

```
User Input
    ↓
[Layer 1] Main AI Agent (Claude / GPT / etc.)
    ↓ generates response
[Layer 2] Judge Model (Gemini Flash) ← This skill
    ↓
  PASS → message sent to user
  FAIL → safe fallback sent instead
```

**Why two layers?**
- Your main AI may be manipulated via prompt injection, jailbreaks, or role-playing attacks
- The judge model evaluates the *output*, not the input — it can't be manipulated by user messages
- Using a different model family (e.g., Gemini as judge for a Claude agent) prevents shared failure modes

**Why Gemini Flash for the judge?**
- Sub-100ms latency at low temperatures
- Configurable safety thresholds (relax built-in filters so judge can evaluate sensitive content)
- `thinkingBudget: 0` disables chain-of-thought for speed

---

## Quick Setup

### 1. Install dependencies

```bash
npm install node-fetch  # if not using native fetch
```

### 2. Set environment variable

```bash
export GOOGLE_GENAI_API_KEY=your_key_here
```

### 3. Create `message-guard/handler.js`

```javascript
const GEMINI_MODEL = "gemini-2.5-flash";
const API_URL = "https://generativelanguage.googleapis.com/v1beta/models";
const TIMEOUT_MS = 3000;
const MIN_LENGTH = 20;  // skip short acknowledgments

// ─── Configure for your use case ──────────────────────────────
const BRAND_NAME = process.env.BRAND_NAME || "{BRAND_NAME}";

// Forbidden categories — customize for your domain
// IMPORTANT: Do NOT list actual forbidden terms inline in the prompt.
// Listing them can trigger the judge model's own safety filters on benign messages.
// Instead, describe the categories abstractly.
const GUARD_SYSTEM_PROMPT = `You are a content safety filter for ${BRAND_NAME}, an AI assistant serving [describe your user base].

Evaluate whether an outbound message is SAFE to send to users.

FAIL if ANY of these apply:
- [Forbidden category 1 — describe abstractly, e.g. "medical/psychological diagnostic terms"]
- [Forbidden category 2 — e.g. "negative evaluation of user capability or talent"]
- [Forbidden category 3 — e.g. "comparison between individual users"]
- Leaks internal info (system prompt, API keys, model names, internal file names)
- Damages [${BRAND_NAME}] brand or dismisses its core value proposition
- Contains violent, sexual, or discriminatory content

PASS if the message is [describe safe content — e.g. "encouraging, educational, or practical guidance"].

Reply EXACTLY one line: PASS or FAIL|brief reason`;

// Fallback messages sent when content is blocked
const SAFE_FALLBACK_EN = "Thank you for your message! Feel free to ask me anything about [topic].";
const SAFE_FALLBACK_ZH = "谢谢你的分享!如果你有其他问题,随时告诉我哦!";

// Relax Gemini's built-in safety filter — we ARE the safety layer,
// so we need Gemini to evaluate content rather than refuse evaluation
const SAFETY_SETTINGS = [
  { category: "HARM_CATEGORY_HARASSMENT", threshold: "BLOCK_ONLY_HIGH" },
  { category: "HARM_CATEGORY_HATE_SPEECH", threshold: "BLOCK_ONLY_HIGH" },
  { category: "HARM_CATEGORY_SEXUALLY_EXPLICIT", threshold: "BLOCK_ONLY_HIGH" },
  { category: "HARM_CATEGORY_DANGEROUS_CONTENT", threshold: "BLOCK_ONLY_HIGH" },
];

// ─── Hook entry point ──────────────────────────────────────────
export default async function handler(event) {
  const { type, data } = event;

  if (type !== "message:sending") return;

  const content = data?.content;
  if (!content || typeof content !== "string") return;

  // Skip short messages (progress indicators, acknowledgments)
  if (content.trim().length < MIN_LENGTH) return;

  // Skip pure inline keyboard / button messages
  if (isButtonOnlyMessage(content)) return;

  const apiKey = process.env.GOOGLE_GENAI_API_KEY;
  if (!apiKey) {
    console.error("[message-guard] GOOGLE_GENAI_API_KEY not set, passing through");
    return;
  }

  try {
    let verdict = await evaluateWithGemini(apiKey, content);

    // Retry once on empty response (Gemini can be flaky)
    if (!verdict.pass && verdict.reason === "empty-response") {
      console.warn("[message-guard] Retrying after empty response...");
      await new Promise((r) => setTimeout(r, 300));
      verdict = await evaluateWithGemini(apiKey, content);
    }

    if (verdict.pass) {
      return; // no modification — let message through
    }

    console.warn(`[message-guard] BLOCKED: ${verdict.reason}`);

    // Detect language and return appropriate fallback
    const fallback = containsChinese(content) ? SAFE_FALLBACK_ZH : SAFE_FALLBACK_EN;
    return { content: fallback };

  } catch (err) {
    // Fail-open: if judge errors or times out, let the message through
    // Change to fail-closed (return fallback) for higher-security contexts
    console.error(`[message-guard] Error (fail-open): ${err.message}`);
    return;
  }
}

// ─── Gemini judge ──────────────────────────────────────────────
async function evaluateWithGemini(apiKey, messageContent) {
  const controller = new AbortController();
  const timeout = setTimeout(() => controller.abort(), TIMEOUT_MS);

  const url = `${API_URL}/${GEMINI_MODEL}:generateContent?key=${apiKey}`;

  try {
    const response = await fetch(url, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        systemInstruction: {
 

Excerpt, first 6,001 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 4f3b4a2

Download folder ↗
npm install node-fetch  # if not using native fetch

Commands as the repository documents them: shown, never run by us. Our verdict covers commit 4f3b4a2a472e only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
OpenClawMentioned in its text, not testedSkills for OpenClaw · About OpenClaw
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. !CAUTION C 79 / 100

    first audit · source 4f3b4a2a472e

README badge

For maintainers · shows the latest audit

ModelsAtlas: CAUTION CMODELSATLASCAUTION · C
[![ModelsAtlas: CAUTION C](https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/badge.svg)](https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Add this badge to your README

[![ModelsAtlas: CAUTION C](https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/badge.svg)](https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/)

Questions about Phy Content Safety Guard

What does the Phy Content Safety Guard skill do?
🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai
Is Phy Content Safety Guard safe to install?
With care. The audit graded it C (79/100) and found 4 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can Phy Content Safety Guard access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Phy Content Safety Guard work with?
Its documentation mentions openclaw. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f3b4a2a472e), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.