Agent skill · Audited from source
Phy Content Safety Guard
skill · LeoYeAI/openclaw-master-skillsMIT licenceAudited 8 Oct 2026 · source 4f3b4a2a472e
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
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
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
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | WARN | 1 |
L2 Instructions | Prompt injection, authority framing, hidden directives | FAIL | 3 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: instruction override, no behavioural pass.
Findings (4)
HIGHPrompt injectionprompt.override · SKILL.md:286
| 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
<key>k5Ey9KFlkqpj+SDkUw+5ED9lTA3En/qUi0zdrydUCH3kMWTE3Eh65NXnFCaxlY2omY2JHnlEoK7Li7oOEvM7eG5VPdcO/sFlMfoCRdnLYdepJ+uLzYwOWR8W4yQVve/clxVFTVRL4DFleKInGdpAxIbHZT2yi4ADAMENls1N1XSLojRuqXePXDeAT/4Mv4TTx0s
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWPrompt injectionprompt.override · SKILL.md:351
name: "DAN mode output",
- Why
- asks the agent to drop prior instructions or safety
- Fix
- remove the instruction
LOWPrompt injectionprompt.override · SKILL.md:353
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
npm install node-fetch # if not using native fetch
git clone https://github.com/LeoYeAI/openclaw-master-skills git -C openclaw-master-skills checkout 4f3b4a2a472e
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
| Agent | Status | More |
|---|---|---|
| OpenClaw | Mentioned in its text, not tested | Skills for OpenClaw · About OpenClaw |
Audit history
Every audit, every source change
- !CAUTION C 79 / 100
first audit · source
4f3b4a2a472e
README badge
For maintainers · shows the latest audit
[](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
LeoYeAI/openclaw-master-skills
Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".
LeoYeAI/openclaw-master-skills
Analyze test coverage gaps. Use when user says "test coverage", "what's not tested", "coverage gaps", "missing tests", "coverage report", or "what needs testing".
LeoYeAI/openclaw-master-skills
Generate Playwright tests. Use when user says "write tests", "generate tests", "add tests for", "test this component", "e2e test", "create test for", "test this page", or "test this feature".
LeoYeAI/openclaw-master-skills
Set up Playwright in a project. Use when user says "set up playwright", "add e2e tests", "configure playwright", "testing setup", "init playwright", or "add test infrastructure".
LeoYeAI/openclaw-master-skills
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding…
LeoYeAI/openclaw-master-skills
PDF conversion toolkit featuring AI layout analysis and OCR. Converts PDFs to Word, Markdown, JSON, PPT, CSV, HTML, and XML for seamless LLM data processing.
Add this badge to your README
[](https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/)
<a href="https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/"><img src="https://modelsatlas.com/skills/leoyeai/phy-content-safety-guard/badge.svg" alt="ModelsAtlas: CAUTION C"></a>
Questions about Phy Content Safety Guard
What does the Phy Content Safety Guard skill do?
Is Phy Content Safety Guard safe to install?
What can Phy Content Safety Guard access on my machine?
Which assistants does Phy Content Safety Guard work with?
How current is this page?
Sources
- github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/phy-c — the audited source at commit 4f3b4a2a472e and every finding aboveObserved · 8 Oct 2026
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.
- What does the Phy Content Safety Guard skill do?
- Is Phy Content Safety Guard safe to install?
- What can Phy Content Safety Guard access on my machine?