Datadog discloses Claude Code skill supply chain risk: dynamic context commands can bypass model defenses
Malicious Coding Agent Skills and the Risk of Dynamic Context
Datadog Security Labs analyzed the supply chain risks posed by Claude Code skills, noting that dynamic context commands in skills execute before the model sees the skill content, depriving model-level prompt injection defenses of the opportunity to intervene. Claude Code can load skills from enterprise management policies, personal directories, project .claude/skills/, plugins, nested project folders, and directories added via --add-dir, so cloned repositories can bring skills into trusted sessions. The authors cite the Clawsights skill found in the wild as an example, which uses gh auth token to obtain a GitHub token and uploads it to clawsights[.]com/api/upload; under Opus 4.6 with maximum reasoning, the model identified and refused to execute it, but when switched to a dynamic context version, the token theft command had already executed during preprocessing, and the model only then stated it would not execute the skill. The authors also mention that on Opus 4.7, the same skill was not identified as credential theft.
The material reveals the attack path in which dynamic context commands in Claude Code skills execute before model intervention, and provides reproducible detection commands and mitigation configurations.