Claude Skills, anywhere: making them first-class in Codex CLI (www.robert-glaser.de)

🤖 AI Summary
Anthropic’s simple, vendor‑agnostic “Skills” format (a SKILL.md with YAML front‑matter: name, description, optional allowed-tools, and a body read only when needed) was made first‑class in the Codex CLI by implementing a tiny, standard‑compliant skills enumerator. The author added a one‑paragraph boot instruction to AGENTS.md and a single‑file enumerator (with minimal uv inline deps) that walks skills/**/SKILL.md, parses front‑matter, and emits a compact JSON array. On boot Codex runs list-skills, holds the small JSON in memory for discovery, and lazily loads a skill’s body only when a match is chosen — demonstrated by generating a one‑page PDF via a PDF skill that produced a reportlab script and executed it with uv. This approach is significant because it reproduces Claude’s progressive discovery and tool‑selection behavior without vendor lock‑in or heavy context bloat. By relocating the skills directory to a global path (~/.codex/skills) and putting list-skills in PATH (~/bin/list-skills, with a path override), multiple repositories share the same skillset and updates are immediate. The contract stays intentionally minimal — metadata only until needed — so agent behavior remains predictable while leaving the complex logic to skill authors.
Loading comments...
loading comments...