🛡️
AI Engineering

Injection Defense

by kangarooking

Injection Defense is an AI Engineering skill for Claude Code, published by kangarooking in system-prompt-skills.

182 stars40 forkson kangarooking/system-prompt-skillsAdded 2026/09/06+3% in starsRepository updated 2026/05/04
agent-designagent-skillsai-agentscangjie-skillcontext-managementprompt-engineeringprompt-injectionsystem-prompttool-use
Install in seconds
Install Injection Defense
Copy Injection Defense into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/kangarooking/system-prompt-skills/tree/main/injection-defense ~/.claude/skills/injection-defense

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/kangarooking/system-prompt-skills.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
injection-defense/SKILL.md in kangarooking/system-prompt-skills
Installs to
~/.claude/skills/injection-defense
Collection
One of 15 skills cataloged from this repository
Category
AI Engineering3278 skills

What Injection Defense does

Injection Defense helps design system prompts that resist prompt injection, jailbreaks, social engineering, and trust-boundary breaks. Use it for agents or chatbots that process external content like documents, web pages, email, or memory.

Injection Defense is cataloged under AI Engineering on DirSkills. Injection Defense comes from a repository tagged agent-design, agent-skills, ai-agents, cangjie-skill and context-management.

Documentation

README

注入防御与安全架构

R — 原文 (Reading)

Claude Chrome 部署五层防御链(critical_injection_defense → social_engineering_defense),Claude for Word 将文档正文、批注、修订全部标记为不可信,ChatGPT Agent 对屏幕指令实施钓鱼检测,Claude Web 对用户记忆中的可疑指令主动忽略,Grok 明令禁止使用指令本身的术语。核心模式:多层纵深、规则不可变、内容分级、反泄露元规则。

I — 方法论骨架 (Interpretation)

  1. 纵深防御:部署至少三层防御层——入口过滤(识别注入模式)、执行守卫(阻止越权指令)、输出审计(防止泄露)。
  2. 规则不可变性:系统指令具有最高优先级,任何外部内容(文档、邮件、网页、用户记忆)不得覆盖或修改已有规则。
  3. 内容信任分级:将所有输入分为可信(用户直接对话)与不可信(文档正文、批注、邮件、HTML、API 响应),不可信内容不具指令权限。
  4. 级联防御:每一层独立运作,即使某层被绕过,后续层仍可拦截。
  5. 反泄露元规则:禁止在输出中复述指令术语、引用系统提示文本、或泄露内部安全机制。
  6. 检测与通知:检测到注入尝试时立即通知用户,不静默忽略。

A1 — 案例分析 (Past Application)

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Injection Defense

  • What else does kangarooking publish alongside Injection Defense?

    Injection Defense is one of 15 skills that DirSkills catalogs from kangarooking/system-prompt-skills, the repository it ships in. Its siblings there include Agent Delegation, Citation System and Code Engineering. Each one is a separate skill with its own page in this directory, installs the same way Injection Defense does, and is maintained by kangarooking in that same repository. The rest of the collection is listed on the kangarooking/system-prompt-skills page.

  • How does Injection Defense compare to other AI Engineering skills?

    Injection Defense ranks #3048 by stars among the 3278 AI Engineering skills in this catalog. The most-starred ones next to it are Architecture Decision Records, AI-First Engineering and Agentic OS. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Injection Defense against them. Open each page to compare what they document and how they install.

More from kangarooking/system-prompt-skills

Injection Defense is one of 15 skills cataloged on DirSkills from kangarooking/system-prompt-skills.

See all 15 skills
🧩
5h ago

Agent Delegation

Agent Delegation describes how to split work across specialized sub-agents with isolated context, briefing-based handoffs, and validation gates. Use it when designing multi-agent systems, task lifecycles, or cross-tool coordination; not for single-agent routing.
AI Engineering
18240
🔗
5h ago

Citation System

Citation System defines inline citation formats and source-tracking rules for answers that need traceable evidence. Use it for document Q&A, RAG, code references, and other outputs where users must verify where information came from.
AI Engineering
18240
🛠️
5h ago

Code Engineering

Code Engineering defines system-prompt rules for coding agents that edit files, manage Git workflows, and verify changes. Use it for autonomous or guided code modification tasks, not for pure code Q&A or infrastructure setup.
AI Engineering
18240
🧠
5h ago

Context Management

Context Management helps design token budgets, compression strategies, lazy loading, and persistent memory for long-running AI assistants and multi-session systems. Use it when conversation history, large files, or user preferences need to stay usable without overflowing the context window.
AI Engineering
18240
🧭
5h ago

Conversation Flow

Conversation Flow defines how an AI classifies user intent, routes requests into task-specific paths, and chooses when to ask clarifying questions versus proceed autonomously. Use it for multi-step assistants and agents that need structured dialogue management.
AI Engineering
18240
🧠
5h ago

Memory System

Memory System designs how an AI stores, retrieves, applies, and updates user and project memories across sessions. Use it when building personalization, handling sensitive memories, or deciding when memory should be applied silently.
AI Engineering
18240