Skip to content
pawaca edited this page Aug 30, 2026 · 1 revision

Skills

Edge adaptation of the upstream skill provider and model-facing skill tool.

Upstream reference: Skills

What Upstream Provides

Skills are reusable instruction sets that both the model and the user can invoke. The subsystem has three layers:

  • SkillRegistry (ctx.skills) — layered provider registry. Merges catalogs from multiple sources (project files, user home, bundled). Resolves duplicates by rank then registration order.
  • ToolSkill — registers the model-facing skill tool. When the model calls it, the registry loads the skill body and injects it as <skill_content> context. Enforces invocation policies (model-only, user-only, both, hidden).
  • Skill Providers — pluggable backends that discover and serve skills. Upstream includes a filesystem provider that watches .dsh/skills/ and .agents/skills/ directories.

Current Edge Status: Not Implemented on main

Neither SkillRegistry, ToolSkill, nor any skill provider is installed on the current main branch. The model has no skill tool, and /skill slash commands are not available.

A commands/list stub in edge-remotes.ts returns an empty array — this exists because the client-side ui-commands plugin queries the command catalog on connect, and without a response the UI would error.

Feature Branch: feat/tool-skill

A complete implementation exists on the feat/tool-skill branch but has not been merged:

  • SkillRegistry + ToolSkill — installed as upstream plugins (Direct Reuse)
  • EdgeSkillProvider — custom provider backed by DO KV storage (dsh-edge:skill:{name} keys). Implements the upstream SkillProvider interface with list(), lookup(), and load()
  • Skill CRUD routes/api/skills REST endpoint in instance.ts for PUT (create/update), DELETE, and GET (list names)
  • Unit tests — EdgeSkillProvider test coverage

The branch replaces the filesystem-based skill discovery (impossible on Workers — no persistent filesystem) with DO KV storage. Skills are created via the REST API rather than file watching.

Why Not Merged

  • SkillRegistry lacks @Remote decorators — the commands/list Typert RPC cannot be auto-routed by the gateway, requiring the manual stub to remain
  • The branch was developed in parallel with other 0.7.0 work and needs rebasing

Plan Requirements

Feature Plan Notes
Skill storage (DO KV) All plans Uses existing DO storage, no additional services
Skill CRUD API All plans REST routes on the existing DO fetch handler
Model skill tool All plans Upstream ToolSkill plugin, no platform dependencies

Architecture Summary

Component Category Status
SkillRegistry Reuse On feature branch, not merged
ToolSkill Reuse On feature branch, not merged
EdgeSkillProvider Replace On feature branch, not merged
Skill CRUD routes Bridge On feature branch, not merged
commands/list stub ⚠️ Workaround On main, awaiting skill merge

TODO

Merge feat/tool-skill branch. Rebase onto current main, resolve conflicts, and merge. The implementation is complete with tests. After merging, the commands/list stub remains until SkillRegistry gains @Remote decorators upstream.

Evaluate skill UI integration. The upstream dsh-client-ui-commands plugin (already in the 33-plugin client bundle) renders slash command menus. Verify it correctly displays skills from the EdgeSkillProvider catalog after the merge.

English

中文

Clone this wiki locally