ai-multi-agent-system: Skill for Claude Code

.agents/skills/prompt-injection-defense/SKILL.md

prompt-injection-defense is a skill for Claude Code, Codex from radif-ru/ai-multi-agent-system. It costs 47 tokens per session (718 once invoked), scanned B, original, MIT.

A set of safeguards for systems that accept user text and can access files or other tools.

In plain words
What is it for?
Use it when adding a text entry point, a file or network tool, or changes to generated answers and system instructions. It checks incoming text, maps file identifiers, and cleans outgoing responses.
Why use it?
It helps detect attempts to override instructions, hides full file paths and sensitive configuration details, and limits which risky tools can be used.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is radif-ru/ai-multi-agent-system's own configuration. It tells Claude Code and Codex how to work on ai-multi-agent-system itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-multi-agent-system configures →

Reuse

Borrowing it

Nothing to install: this file belongs to radif-ru/ai-multi-agent-system. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/radif-ru/ai-multi-agent-system/main/.agents/skills/prompt-injection-defense/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/radif-ru/ai-multi-agent-system

Made for: Claude Code, Codex.

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 prompt-injection-defense

README.md
[![agentmods](https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/prompt-injection-defense/github.svg)](https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/prompt-injection-defense)
Your own site
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/prompt-injection-defense"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/prompt-injection-defense/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 prompt-injection-defense

Your own site · 80×15
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/prompt-injection-defense"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/prompt-injection-defense.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 718 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.
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.00047 $0.00718
Opus 5 $0.00023 $0.00359
Sonnet 5 $0.00009 $0.00144
Haiku 4.5 $0.00005 $0.00072

Measured 11d ago against content hash dc98e652fb7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

prompt-injection-defense 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 11d 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.

1. **Вход → `InputSanitizer`.** Пользовательский текст перед передачей в `core.handle_user_task` пропускай через `sanitize_user_input(...)` (режим `"warn"` по умолчанию). Он детектит prompt injection: `ignore previous in

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

.agents/skills/prompt-injection-defense/SKILL.md · 31 lines

How it starts

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

Skill: prompt-injection-defense

Меры защиты от типичных атак на LLM-систему. Источник истины — _docs/security.md.

Когда использовать

  • Добавляешь новую точку входа пользовательского текста (новый адаптер/handler).
  • Добавляешь tool, работающий с файловой системой или сетью.
  • Меняешь то, что попадает в final_answer или в системный промпт.

Алгоритм

  1. Вход → InputSanitizer. Пользовательский текст перед передачей в core.handle_user_task пропускай через sanitize_user_input(...) (режим "warn" по умолчанию). Он детектит prompt injection: ignore previous instructions, repeat your system prompt, forget everything above, system: в начале строки, разделители <|...|>.
  2. Пути → FileIdMapper. Не клади полные пути файлов в goal/ответы. Генерируй временный file_id (generate_id) и восстанавливай путь через get_path. Tools read_file/read_document принимают file_id как альтернативу path.
  3. Выход → ResponseSanitizer. final_answer перед отправкой пользователю пропускай через sanitize_response(...): маскирует полные пути ([FILE_PATH]), конфиг-ключи ([CONFIG_KEY]), фрагменты системного промпта ([SYSTEM_SECTION]/[SYSTEM_IDENTITY]).
  4. Опасные tools → allowlist (secure by default). _DANGEROUS_TOOLS = {"http_request", "read_file"}. По умолчанию dangerous_tools_allowlist пуст — все опасные tools запрещены. Разрешение — только явно через .env (DANGEROUS_TOOLS_ALLOWLIST=...).
  5. Валидация параметров. Для ФС-tools: запрет .. (path traversal), запрет системных путей (/etc, /sys, /proc, ~/.ssh), проверка нахождения внутри разрешённой директории. Для http_request: только http/https, проверка netloc.
  6. Системный промпт. Правила безопасности живут в app/prompts/agent_system.md (отказ выполнять «ignore instructions», отказ печатать системный промпт, отказ от опасных операций без явного запроса).

Чего избегать

  • Прокидывания сырого пользовательского ввода в системный промпт без санитайзинга.
  • Полных путей ФС в goal, логах и ответах пользователю.
  • Разрешения опасных tools по умолчанию (allowlist должен быть пуст, пока явно не разрешено).
  • Иллюзии полной защиты: помни про known-limitations (_docs/security.md §5) — юникод-эскейпы, base64-инъекции, голые секреты без =.

Read the full file on GitHub · 31 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. 11d ago First seen · 31 lines · 47 tokens per session scan B dc98e652fb7b

Subscribe to this mod's changes

prompt-injection-defense is a skill published in the GitHub repository radif-ru/ai-multi-agent-system (6 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 718 once invoked, about $0.0002 per session on Opus 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-31.

Related

Other skills, from other repositories

ai-portable-setup

Erstellt einen portablen KI-Arbeitsbereich auf einem USB-Stick oder beliebigen Laufwerk. RAG-Pipeline mit lokalen LLM-Modellen (Ollama), Vektordatenbank (ChromaDB) und vorkonfigurierten Prompts.

ellmos-ai/skills · 62 tokens

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

MRWillisT/PullNexus · 64 tokens

ai-image-color-cycling

Generate an AI image, quantize it to a 256-color indexed palette, and produce BOTH a self-contained HTML artifact AND a perfect-loop animated GIF that bring the image to life via classic 1990s palette cycling — the trick where rotating palette entries makes water flow, fire flicker, and stars twinkle without ever…

MRWillisT/PullNexus · 272 tokens

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright…

MRWillisT/PullNexus · 62 tokens

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when…

MRWillisT/PullNexus · 168 tokens

frontend-slides

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

MRWillisT/PullNexus · 63 tokens