release: skill discovery + skillTool (#587)

Merged
SW
5mo ago
+1071-19

Summary

Release of PR #587 — ports the `skill` composite tool from open-agents along with the skills discovery layer it depends on. The handler discovers globally-installed skills (`${HOME}/.agents/skills/`) before workflow start and registers the `skill` tool when the catalog is non-empty.

Verification

  • Full suite: 3055+ tests pass, lint clean, production build succeeds
  • E2E verified twice on preview against `recoupable/org-rostrum-pacific-...`:
    • First run: agent invoked `skill({skill: "recoup-api"})` → 11,173 chars of SKILL.md with the correct `/home/vercel-sandbox/.agents/skills/recoup-api` header
    • Second run (post SRP refactor): agent invoked `skill({skill: "artist-workspace"})` → 14,640 chars + natural-language summary
  • Resolution chain verified working: `resolveSandboxHomeDirectory` → `getGlobalSkillsDirectory` → `discoverSkills` → `findSkillFile` → SKILL.md load

🤖 Generated with Claude Code


Summary by cubic

Adds skill discovery and the skill tool. The chat workflow scans ${HOME}/.agents/skills/ before start and registers skill only when skills are found.

  • New Features
    • Discovery: discoverSkills scans ${HOME}/.agents/skills/, prefers SKILL.md (falls back to skill.md), parses frontmatter, dedupes by name, and skips built-in command names.
    • Wiring: handleChatWorkflowStream connects to the sandbox, resolves paths with getSandboxSkillDirectories, and threads the catalog into AgentContext.skills; runAgentStep passes it to buildAgentTools({ skills }).
    • Tool: skill does case-insensitive lookup, rejects skills with disable-model-invocation, loads SKILL.md, strips frontmatter, injects Skill directory: <path>, and substitutes $ARGUMENTS; returns available skills on unknown names.
    • Defaults: When no skills are discovered, skill is not registered; existing tools are unchanged.