# Add the ViteHub skill

The ViteHub skill is a small set of Markdown instructions that gives a coding agent one repeatable process. The agent reads the project, loads only the references the task needs, checks the installed package contract, writes the files, and proves each requested behavior.

We publish the skill at [`/.well-known/skills/vitehub/SKILL.md`](https://vitehub.dev/.well-known/skills/vitehub/SKILL.md). The [skills CLI](https://github.com/vercel-labs/skills) reads the [skill index](https://vitehub.dev/.well-known/skills/index.json) and installs it from `vitehub.dev`.

## Install for your agent

Run the command from your project root. The index lists other skills too, so `--skill vitehub` picks this one. `--agent` picks your coding agent.

### Claude Code

```bash [Terminal]
npx skills add https://vitehub.dev --skill vitehub --agent claude-code
```

The CLI writes the skill to `.agents/skills/vitehub/` and links it from `.claude/skills/vitehub/`.

### Cursor

```bash [Terminal]
npx skills add https://vitehub.dev --skill vitehub --agent cursor
```

The CLI writes the skill to `.agents/skills/vitehub/`.

### VS Code

```bash [Terminal]
npx skills add https://vitehub.dev --skill vitehub --agent github-copilot
```

The CLI writes the skill to `.agents/skills/vitehub/` for GitHub Copilot.

### Windsurf

```bash [Terminal]
npx skills add https://vitehub.dev --skill vitehub --agent windsurf
```

The CLI writes the skill to `.agents/skills/vitehub/` and links it from `.windsurf/skills/vitehub/`.

### Codex

```bash [Terminal]
npx skills add https://vitehub.dev --skill vitehub --agent codex
```

The CLI writes the skill to `.agents/skills/vitehub/`.

- To install for several agents at once, list them after `--agent`, such as `--agent claude-code cursor codex`.
- Add `--global` to install for all your projects instead of one.
- Run `npx skills list` to see installed project skills.

### Install from the Console

The [ViteHub Console](https://vitehub.dev/docs/console) serves the skill of the `vite-hub` version that it runs. A self-hosted Console serves the skill of the version that you built it with:

```bash [Terminal]
npx skills add https://console.example.com --skill vitehub --agent claude-code
```

Add `/skills/<version>` to the URL, such as `https://console.vitehub.dev/skills/0.4.0`, to install only that version. The Console answers `404` when it runs a different version. Apps do not serve the skill.

To serve your own app's skills for `npx skills add` and MCP clients, use [`vite-hub/skills`](https://vitehub.dev/docs/console/skills).

## Ask for an outcome

Normal ViteHub prompts trigger the skill. Describe the result you want and any host or runtime constraints.

| Task | Example prompt |
| --- | --- |
| Server Primitive | `Add ViteHub KV to this route and prove that a value survives a restart.` |
| Agent | `Create a provider-backed review Agent with repository context and invoke it locally.` |
| Host boundary | `Build this ViteHub application for Cloudflare and inspect its Provider Output.` |

The skill picks one main product area, reads only matching references and the smallest live docs pages, and checks your installed exports and types. It reports proof for each requested behavior. If the docs and the installed package differ, the installed package wins and the agent reports the difference.

The bundled references teach how parts fit together, not the API reference. They cover project shapes, preview contracts, Server Primitives, framework composition, Agent Definitions and Drivers, Workspaces and Sources, Channels and Triggers, Capabilities, orchestration, Sandboxes and hosts, proof and recovery, and public project patterns.

## Add live docs lookups

Because the skill links to raw docs pages, your agent needs network access. To let it search the docs with tools, [connect the docs MCP server](https://vitehub.dev/docs/console/mcp). If your tool cannot install skills, start from [`llms.txt`](https://vitehub.dev/llms.txt) and give the agent one [raw Markdown page](https://vitehub.dev/docs/getting-started/ai-resources/markdown-pages).

## Keep instruction sources distinct

Each instruction source has a different reader. Keep them separate so repository rules do not leak into runtime Agent behavior.

| Source | Audience | Purpose |
| --- | --- | --- |
| Public ViteHub skill | Coding agents that build a ViteHub app | Guides work through live docs, installed contracts, explicit authority, and runtime proof. |
| Repository `AGENTS.md` | Coding agents that contribute to a repository | Sets local development rules and project boundaries. |
| [Agent Driver Instructions](https://vitehub.dev/docs/agents/instructions) | Agents that run inside an app | Sets runtime behavior for the model. |
| Agent-local `skills/` | Provider-backed Agent runs | Installs Skills that a folder Agent Definition owns. |
| [`skills()` Capability](https://vitehub.dev/docs/agents/capabilities/skills) | ViteHub Agent runs | Gives the Agent Skills from its Workspace or an external Source. |

Agent-local Skills need a folder Definition. Put them beside `server/agents/<name>/agent.ts` at `server/agents/<name>/skills/<skill>/SKILL.md`. A model Driver reads them from the Agent Workspace at `.agents/skills/<skill>/SKILL.md`. A Provider Driver gets them from a private folder outside its working directory, or from the Sandbox Home. ViteHub does not write them into the Workspace or the checkout. See [Give the provider its Skills](https://vitehub.dev/docs/agents/agent-drivers#give-the-provider-its-skills). A flat Definition like `server/agents/review.ts` cannot own Skills. Move it to `server/agents/review/agent.ts` first.

<!-- vitehub-docs:section-links -->
## In this section

- [Get started](https://vitehub.dev/raw/docs/getting-started.md)
- [Next steps](https://vitehub.dev/raw/docs/getting-started/server-primitives.md)
- [Build and deploy](https://vitehub.dev/raw/docs/getting-started/build-and-deploy.md)
- Coding agents
  - [Overview](https://vitehub.dev/raw/docs/getting-started/ai-resources.md)
  - [ViteHub skill](https://vitehub.dev/raw/docs/getting-started/ai-resources/agent-instructions-skills.md) (this page)
  - [Markdown pages](https://vitehub.dev/raw/docs/getting-started/ai-resources/markdown-pages.md)

Next: [Markdown pages](https://vitehub.dev/raw/docs/getting-started/ai-resources/markdown-pages.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
