← Lab /Security & privacy

Prompt-space security skills cut malware severity and attack success for LLM coding agents

SkillShield reduces malware-generation severity and execution-attack success rates of coding agents

Security & privacy arXiv 26 Aug 2026 Defense Prototype evidence

Published as “SkillShield: Prompt-Space Security Skills for LLM Coding Agents”

Why it matters

Prompt-space security skills give API-only deployments a practical, low-overhead defense that markedly cuts harmful code generation and execution with minimal impact on legitimate use.

Summary

SKILLSHIELD cuts malware-generation severity from 3.37 to 0.58 and lowers execution attack success rate to 43.6% with an all-classes skill, matching Llama Guard 3’s 42.7% without a separate classifier; per-class skills drive ASR down to 14.5% and benign safety-grounded refusal stays under 0.14%. The evidence spans six LLMs on the RedCode benchmark and 731 benign SWE-Bench tasks, showing strong overall protection but broader-scope skills lose parity under jailbreaks and some configurations (e.g., reactive all-classes) perform worse than the strongest baseline.

What they found 2

  1. All-classes skill dramatically reduces both malware generation severity and execution attack success.

    “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.”

  2. Per-class provisioning further lowers execution attack success rate.

    “The per-bundle and class-fixed per-class settings further reduce this rate to 36.2% and 14.5%, respectively.”

Caveats 4

  • Reactive all-classes reaches 47.8% under AgentHarm, compared with 43.2% for LG, making it worse than the strongest baseline in that jailbreak scenario.
  • The broader configurations lose their clean-input parity with LG under jailbreaks.
  • Due to the limited system-prompt space, we examine three fixed-budget provisioning scopes
  • This experiment does not measure end-to-end task completion.

What’s new here 4

  • Synthesizes security policies as natural-language “skills” injected into the system prompt, requiring no model-weight changes or runtime classifiers.
  • Evaluates fixed-budget prompt provisioning across three scopes (all-classes, per-bundle, per-class) to study trade-offs between coverage and detail.
  • Shows that prompt-space defenses can approach or exceed a heavyweight runtime classifier (Llama Guard 3) while adding only ~2,400 tokens per session.
  • Provides both proactive (attack-corpus) and reactive (failure-trajectory) skill synthesis methods.