ViteHub is still experimental. Expect bugs and breaking changes.

Skills

Require a Workspace skill file for an Agent Invocation.

skills() adds a Workspace requirement for a skill file. Use it when an Agent must have a SKILL.md file available before it runs.

Installation

Import the Capability factory from -hub/agent/capabilities and add it to defineAgent({ capabilities }). Use the configuration example below as the starting point, then tighten modes, policies, stores, and providers for the Agent boundary.

What it adds

The Capability records the configured skill path in metadata and requires the Workspace path to exist. It does not expose model-facing tools by itself.

Configuration

The default path is skills/SKILL.md. Pass a custom path when the Workspace stores the skill somewhere else.

server/agents/support.ts
import { defineAgent } from '@vite-hub/agent'
import { skills } from '@vite-hub/agent/capabilities'

export default defineAgent({
  driver: { model },
  workspace,
  capabilities: [
    skills(),
  ],
})

Runtime behavior

ViteHub validates the Workspace read requirement before the Agent Driver runs. The Capability metadata includes the directory path and the resolved SKILL.md path.

Requirements

skills() requires an explicit Workspace with read access to the configured skill file. The path can point to a directory or directly to a SKILL.md file.

Driver support

Agent DriverSupport
Model-backedValidates the skill file requirement; reading or rendering the file remains Agent or Workspace behavior.
Harness-backedValidates the skill file requirement before harness execution.
Custom-run-backedValidates the skill file requirement before driver.run.

Inspect and verify

Run the Agent with the configured Workspace. A missing skill file should fail before model execution with a Workspace path requirement error.

Inspect Capability metadata for the normalized path and skillPath values.

Options

OptionTypeDefaultDescription
pathstring"skills"Directory or SKILL.md path required in the Workspace.
shellExecution"read" | "write"noneOptional Workspace Shell execution mode declared by the skill requirement.

Reference

Copyright © 2026