SkCC:跨框架大型語言模型代理之可攜式與安全技能編譯
SkCC: Portable and Secure Skill Compilation for Cross-Framework LLM Agents
May 5, 2026
作者: Yipeng Ouyang, Yi Xiao, Yuhao Gu, Xianwei Zhang
cs.AI
摘要
LLM-Agent已演化為能執行複雜任務的自動化系統,其中SKILL.md規格已成為封裝Agent能力的實際標準。然而,一個關鍵瓶頸依然存在:不同Agent框架對提示格式的敏感度差異顯著,導致高達40%的效能變異,但幾乎所有技能僅以單一、無視格式的Markdown版本存在。針對各平台手動改寫會造成難以持續的維護負擔,而先前的審查發現超過三分之一的社群技能存在安全漏洞。為解決此問題,我們提出SkCC,一個將經典編譯器設計引入Agent技能開發的編譯框架。其核心SkIR——一個強型別中間表示——將技能語意與平台特定格式脫鉤,實現跨異質Agent框架的可移植部署。在此IR周圍,編譯時分析器(Compile-time Analyzer)透過部署前的反技能注入(Anti-Skill Injection)機制執行安全限制。經由四階段管線,SkCC將適應複雜度從O(m × n)降至O(m + n)。在SkillsBench上的實驗顯示,編譯後的技能在Claude Code上將通過率從21.1%提升至33.3%,在Kimi CLI上從35.1%提升至48.7%,同時達成次10毫秒的編譯延遲、94.8%的主動安全觸發率,以及跨平台10%至46%的執行時令牌節省。
English
LLM-Agents have evolved into autonomous systems for complex task execution, with the SKILL.md specification emerging as a de facto standard for encapsulating agent capabilities. However, a critical bottleneck remains: different agent frameworks exhibit starkly different sensitivities to prompt formatting, causing up to 40% performance variation, yet nearly all skills exist as a single, format-agnostic Markdown version. Manual per-platform rewriting creates an unsustainable maintenance burden, while prior audits have found that over one third of community skills contain security vulnerabilities. To address this, we present SkCC, a compilation framework that introduces classical compiler design into agent skill development. At its core, SkIR - a strongly-typed intermediate representation - decouples skill semantics from platform-specific formatting, enabling portable deployment across heterogeneous agent frameworks. Around this IR, a compile-time Analyzer enforces security constraints via Anti-Skill Injection before deployment. Through a four-phase pipeline, SkCC reduces adaptation complexity from O(m times n) to O(m + n). Experiments on SkillsBench demonstrate that compiled skills consistently outperform their original counterparts, improving pass rates from 21.1% to 33.3% on Claude Code and from 35.1% to 48.7% on Kimi CLI, while achieving sub-10ms compilation latency, a 94.8% proactive security trigger rate, and 10-46% runtime token savings across platforms.