Zhang, Gao, Zhao, Tan, Yao, Wang, Wang and Tong Yang, arXiv 2605.19604; code at PKULab1806/FairyClaw.
This is "formal" in the engineering sense: replace prose skills with typed, executable ones. The claim is that workflow order, safety rules and completion criteria written as SKILL.md prose cost tokens, read ambiguously and enforce nothing.
Mechanism. A Formal Skill has five parts: JSON metadata and action schemas, Python executors that validate deterministically, lifecycle hooks around LLM and tool calls, skill-local state (phase, verification status, artifacts, why a gate failed), and routing metadata. The worked example, CodeRepairOps, runs reproduce, diagnose, patch, verify, report. Hooks show only the current phase's tools, guard patches (protected paths, hunk checks, size limits) and block completion until verification passes. The LLM picks actions; executors and hooks are trusted.
Results. On Harness-Bench (75 tasks, six harnesses): with gpt-5.4, FairyClaw scored 0.746 using 3.51M tokens (46.8K per task); the next two scored 0.744 and 0.740 using 6.29M and 7.28M. With gemini-3.1-pro it scored 0.635 on 3.84M, behind two others (0.689, 0.645). The authors report about 48% fewer tokens per task than the other five on average, with context compression off, and attribute it to phase-scoped tool exposure and routing.
Why it matters for efficiency. Showing only the tools a phase allows shrinks every prompt, and a completion gate stops premature "done" claims that trigger human or agent rework.
Caveats. Weak evidence: no ablation with the skill removed, no repeats or variance, a 0.002 lead on one model and third place on the two-model mean. Baselines are different harnesses, not the same harness with prose skills. Authoring cost rises: someone writes the schemas, executors and hooks. Affiliations are inferred from the repo.