Agent skills are becoming a standard way to extend AI agents, but they come with a security wrinkle: they pair instructions with executable resources, so a third-party package can run inside the agent's runtime. A new arXiv preprint, "PyCache Trap: The Inspection-Execution Gap in Agent Skill Scanners," argues that current safety scanners are not looking at the right artifact.
Scanners typically inspect documentation and visible source code. The paper points out that Python can execute bundled bytecode—for example, .pyc files—without that code appearing in the source that a reviewer sees. The result is an inspection-execution gap: a skill can pass review and then run behavior that was never inspected.
The finding matters because agent skills are often treated as trusted extensions. If third-party packages can hide executable code in bytecode, then a skill's apparent safety may not match its actual runtime behavior.