Skip to main content

prompt-guard

Detects prompt injection patterns in graph content with risk classification

来源信息

仓库
ApiliumCode/mayros
最近来源活动
2026年2月26日 12:53
检测到的 SKILL.md 语言
英语
星标
12
分支
1

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
10 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
prompt-guard
description
Detects prompt injection patterns in graph content with risk classification
type
semantic
user-invocable
true
semantic
{"skillVersion":1,"permissions":{"graph":["read","write"],"proofs":["request"],"memory":["recall"]},"assertions":[{"predicate":"guard:injection-detected","requireProof":true},{"predicate":"guard:scan-result","requireProof":false}],"queries":[{"predicate":"guard:history","scope":"agent"}]}
# prompt-guard Detects prompt injection patterns in graph content and classifies findings by risk level. ## When to Use Use this skill when: - Inspecting user-submitted text stored in the knowledge graph for injection attempts - Auditing graph content before it reaches downstream agents or tools - Monitoring for adversarial inputs such as role overrides, encoding evasion, or jailbreak prompts ## Risk Classification Each finding is classified into one of three levels: - **dangerous** -- Active injection attempts (role overrides, system overrides, jailbreak, shell commands) - **suspicious** -- Evasion techniques or anomalies (zero-width characters, homoglyphs, encoding tricks, template injection) - **safe** -- No injection patterns detected The overall classification for a scanned item is `dangerous` if any dangerous finding exists, `suspicious` if only suspicious findings exist, and `safe` otherwise. ## Instructions 1. Store text content in the graph using `skill_assert` or `skill_graph_query` 2. Query with predicate `guard:scan-result` to trigger the prompt-guard runtime 3. The skill enriches each result with a `classification` field and a `findings` array 4. Use `guard:injection-detected` (with proof) to record confirmed injection attempts 5. Query `guard:history` to review past scan results for the current agent
在 GitHub 查看