Files
Arnav Naval 38c6717fb7 [arnav] feat: enable SDK skill auto-discovery via directory layout migration
Skills previously lived as flat `<slug>.md` files injected directly into
the user prompt, which bypassed Claude Code CLI's native discovery entirely.
Switch to the CLI's expected `<slug>/SKILL.md` layout so the SDK can surface
each skill's frontmatter to the model and let it call `Skill(slug)` lazily
on its own — without having to eagerly inject every skill body every turn.
Key changes:
- One-shot startup migration moves existing flat files into the directory
  layout (idempotent, crash-safe, preserves existing dir if already migrated)
- `get_installed_slugs()` with module-level cache (keyed by SKILLS_DIR) so
  the per-turn allowlist query is effectively free on the hot path
- `_ensure_frontmatter()` stamps a valid YAML block on every write so the
  CLI listing never silently drops a skill with missing frontmatter
- `_resolve_sdk_skill_allowlist()` replaces the old `skills=[]` kill-switch:
  passes only user-installed slugs to the SDK, filtering out bundled Claude
  Code skills (/init, /review, etc.) by not including them, and dropping
  manually-attached skills that are already injected into the user message
- CRUD endpoints and tests updated to the new directory layout throughout
2026-05-10 17:56:23 -05:00
..
2026-05-04 12:31:21 -07:00
2026-03-13 12:09:25 -07:00
2026-03-13 12:09:25 -07:00