moai-ref-llm-security

moai-ref-llm-security is a skill for Claude Code from modu-ai/moai-adk. It costs 159 tokens per session (3,898 once invoked), scanned B, original, Apache-2.0.

A defensive security reference for applications and agents that use large language models, including chat tools, retrieval systems, and MCP servers.

In plain words
What is it for?
Use it when reviewing or building LLM systems, to address prompt injection, unsafe tool calls, poisoned data, output validation, and security governance.
Why use it?
It explains how untrusted prompts, documents, tool results, and model outputs can introduce security risks and how to detect or prevent them.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it when reviewing or building LLM systems, to address prompt injection, unsafe tool calls, poisoned data, output validation, and security governance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modu-ai/moai-adk/moai-ref-llm-security
About the project

MoAI-ADK is a Go-based harness that organizes and verifies Claude Code work across planning, implementation, synchronization, and review stages. Developers use it to structure agentic coding tasks, apply quality gates, and route work across language models, while the catalogue entries extend its workflow with skills, hooks, commands, MCP servers, instructions, and settings.

modu-ai/moai-adk · 1,264 stars · on GitHub · adk.mo.ai.kr

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 modu-ai/moai-adk --skill moai-ref-llm-security
Clone the repo
git clone --depth 1 https://github.com/modu-ai/moai-adk

Made for: Claude Code.

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 moai-ref-llm-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-llm-security/github.svg)](https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-llm-security)
Your own site
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-llm-security"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-llm-security/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 moai-ref-llm-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/modu-ai/moai-adk/moai-ref-llm-security"><img src="https://agentmods.dev/badge/skills/modu-ai/moai-adk/moai-ref-llm-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,898 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 8 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 77
    This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
    Fix: Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.
  • high Memory Poisoning · line 169
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
  • high Memory Poisoning · line 203
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
  • high Prompt Injection · line 246
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 264
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 277
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • medium Excessive Agency · line 66
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 283
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00159 $0.03898
Opus 5.5 $0.00064 $0.01559
Sonnet 5.5 $0.00032 $0.00780
Haiku 4.5 $0.00016 $0.00390

Measured 3mo ago against content hash 0d8ec550434e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

moai-ref-llm-security scanned grade B with 1 finding 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 3mo ago.

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.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

| LLM01 | Prompt Injection | Can external text override system instructions? | Instruction-hierarchy enforcement, input/output screening, content isolation |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/skills/moai-ref-llm-security/SKILL.md · 290 lines

How it starts

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

LLM / AI Defensive Security Reference

Defensive practitioner reference for hardening LLM-backed applications and agents. Every section is framed as defense, hardening, detection, or verification — it describes the misconfiguration, how to detect it, and how to prevent it, never how to exploit it. Cross-domain web-app vulnerabilities live in moai-ref-owasp-checklist; API design lives in moai-ref-api-patterns.

Target Use

Apply when reviewing or building an LLM-backed system — a chat product, a retrieval-augmented application, an autonomous agent, or an MCP server. The material assumes an untrusted-input threat model: any text the model reads (user turns, retrieved documents, tool results, file contents) may carry adversarial instructions, and any text the model emits may be acted on downstream.

Trust Boundaries in an LLM System

The core defensive insight: an LLM does not distinguish "data" from "instructions" the way a parser does. Treat every text channel that reaches the model as a boundary where adversarial instructions can enter.

Channel Entry risk Primary defense
End-user prompt Direct prompt injection Instruction-hierarchy enforcement, input screening
Retrieved documents (RAG) Indirect prompt injection Provenance tagging, content isolation, retrieval allowlist
Tool / function results Injected instructions in tool output Treat tool output as untrusted data, re-validate before re-prompting
System / developer prompt Leakage, override Minimize secrets in prompt, assume prompt is recoverable
Model output Improper downstream handling Schema validation, encoding, never auto-execute raw output
Training / fine-tuning data Poisoning Data lineage, provenance verification, canary detection

OWASP LLM Top 10 — Defensive Mapping

The OWASP Top 10 for LLM Applications (2025 edition) is the canonical risk index for LLM systems. Each row below states the risk, the defensive check, and the hardening control. Citations are for defensive correlation only.

Read the full file on GitHub · 290 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. 3mo ago First seen · 290 lines · 159 tokens per session scan B 0d8ec550434e

Subscribe to this mod's changes

moai-ref-llm-security is a skill published in the GitHub repository modu-ai/moai-adk (1,264 stars, last pushed today), licensed Apache-2.0. It adds 159 tokens to every session and 3,898 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

moai-ref-llm-security compared with skills from other repositories

moai-ref-llm-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
moai-ref-llm-securitymodu-ai/moai-adkSkill1.3ktodayApache-2.0B159Claude Code
code-revieweralirezarezvani/claude-code-tresorSkill79020d agoMITA54Claude Code
test-generatoralirezarezvani/claude-code-tresorSkill79020d agoMITA55Claude Code
api-documenteralirezarezvani/claude-code-tresorSkill79020d agoMITA48Claude Code
readme-updateralirezarezvani/claude-code-tresorSkill79020d agoMITA49Claude Code
security-auditoralirezarezvani/claude-code-tresorSkill79020d agoMITA63Claude Code
hn-summarizeykdojo/claude-code-tipsSkill10k2mo agononeA57Claude Code