SkillShield: Prompt-Space Security Skills for LLM Coding Agents
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
A coding agent edits files and executes shell commands with its developer's privileges, allowing malicious requests to translate directly into harmful actions or functional malware. Existing defenses have complementary limitations: weight-level alignment is unavailable to API-only deployers, whereas input filters and execution-boundary monitors require auxiliary classification or checking components along the agent's trajectory. We therefore introduce SkillShield, a system-prompt defense that synthesizes security skills offline from known attacks or recorded agent failures. These skills are injected into the system prompt at session start and remain active throughout the tool-use loop. Unlike a reference monitor, they protect the system by defining the security policies the model should follow during execution. Due to the limited system-prompt space, we examine three fixed-budget provisioning scopes: all-classes, with one skill covering all threat classes, per-bundle, with one skill targeting a related subset, and per-class, with one skill dedicated to a single known class and used as the upper-bound reference. None requires runtime request classification or routing. Across six large language models on RedCode, the default all-classes skill reduces malware-generation severity from 3.37 to 0.58 and achieves a 43.6% execution attack success rate, comparable to Llama Guard 3's 42.7% without its separate 8B classifier. The per-bundle and class-fixed per-class settings further reduce this rate to 36.2% and 14.5%, respectively. Under two non-adaptive jailbreak families, SkillShield continues to outperform all baselines on malware generation. Across 731 benign task descriptions, SkillShield yields a mean safety-refusal rate of 0.14%. These results demonstrate the potential of prompt-space security skills to prevent harmful actions and malware generation for LLM coding agents.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 31 of its 46 references that are in the map. First posted on arXiv 26 Aug 2026.
Builds on
31 of 46 references.
Closest ancestors · 10
Same direction, newest first
- 2025SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarios26 Sep
- 2025IPIGuard: A Novel Tool Dependency Graph-Based Defense Against Indirect Prompt Injection in LLM Agents21 Aug
- 2025SecRepoBench: Benchmarking Code Agents for Secure Code Completion in Real-World Repositories29 Apr
- 2025CVE-Bench: A Benchmark for AI Agents' Ability to Exploit Real-World Web Application Vulnerabilities21 Mar
- 2025AGrail: A Lifelong Agent Guardrail with Effective and Adaptive Safety Detection17 Feb
- 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agents21 Dec
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agents12 Nov
- 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
- 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
- 2023Identifying the Risks of LM Agents with an LM-Emulated Sandbox25 Sep
Other references · 21
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2024A Survey on LLM-as-a-Judgecited by 1,384
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
9 more
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
- 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 401
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 254
- 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easilycited by 242
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Surveycited by 215
- 2024ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMscited by 197
- 2024What is in Your Safe Data? Identifying Benign Data that Breaks Safetycited by 114
- 2024FATH: Authentication-based Test-time Defense against Indirect Prompt Injection Attackscited by 19
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Towards a Risk Assessment of Malicious Skill Files in Coding Agents
- 2026Skill-Inject: Measuring Agent Vulnerability to Skill File Attacks
- 2026"Do Not Mention This to the User": Detecting and Understanding Malicious Agent Skills in the Wild
- 2026PhantomSkill: Malicious Code Injection in Agent Skill Ecosystems
- 2025Agent Skills Enable a New Class of Realistic and Trivially Simple Prompt Injections
- 2026SkillBloat: Token Amplification Attacks via Skill Injection in LLM Coding Agents
- 2026SkillGate: Cost Efficient Runtime Malicious Skill File Detection in Coding Agents
- 2026SkillJect: Effectively Automating Skill-Based Prompt Injection for Skill-Enabled Agents