v0
$
npx mdskill add vm0-ai/vm0-skills/v0Generate and manage full-stack React apps via v0.dev API
- Creates UI components and complete applications from natural language prompts
- Integrates with v0.dev API for chat management and code generation
- Executes requests using POST endpoints to create or modify chat sessions
- Delivers results through live sandbox previews and downloadable source files
SKILL.md
.github/skills/v0View on GitHub ↗
---
name: v0
description: v0 by Vercel AI app builder API. Use when user mentions "v0", "v0.dev", wants to generate UI components or full-stack apps with AI, or manage v0 projects, chats, and deployments programmatically.
---
## How to Use
Base URL: `https://api.v0.dev/v1`
### 1. Generate App or UI from Prompt
Create a new chat to generate code from a natural language prompt:
Write to `/tmp/v0_request.json`:
```json
{
"message": "Build a React dashboard with a sidebar, stats cards, and a line chart using Tailwind CSS"
}
```
Then run:
```bash
curl -s -X POST "https://api.v0.dev/v1/chats" --header "Authorization: Bearer $V0_TOKEN" --header "Content-Type: application/json" -d @/tmp/v0_request.json
```
The response includes:
- `id` — chat ID (used for follow-up messages)
- `webUrl` — link to the chat on v0.app
- `latestVersion.demoUrl` — live sandbox preview of the generated app
- `latestVersion.files` — generated source files
### 2. Iterate — Send Follow-up Message
Refine generated code by sending a follow-up to an existing chat. Replace `<chat-id>` with the ID from the previous response:
Write to `/tmp/v0_request.json`:
```json
{
"message": "Add a dark mode toggle to the header and make the sidebar collapsible"
}
```
Then run:
```bash
curl -s -X POST "https://api.v0.dev/v1/chats/<chat-id>/messages" --header "Authorization: Bearer $V0_TOKEN" --header "Content-Type: application/json" -d @/tmp/v0_request.json
```
### 3. Get Chat Details (Retrieve Generated Code)
Fetch the full chat including generated files. Replace `<chat-id>` with the target chat ID:
```bash
curl -s "https://api.v0.dev/v1/chats/<chat-id>" --header "Authorization: Bearer $V0_TOKEN"
```
The `latestVersion.files` array contains the generated source code files.
### 4. List All Chats
```bash
curl -s "https://api.v0.dev/v1/chats" --header "Authorization: Bearer $V0_TOKEN" | jq '.data[] | {id, name, webUrl}'
```
### 5. Create Project
Organize related chats under a named project:
Write to `/tmp/v0_request.json`:
```json
{
"name": "Customer Dashboard",
"description": "Internal analytics dashboard for customer team",
"privacy": "private"
}
```
Then run:
```bash
curl -s -X POST "https://api.v0.dev/v1/projects" --header "Authorization: Bearer $V0_TOKEN" --header "Content-Type: application/json" -d @/tmp/v0_request.json
```
To create a chat within a project, add `"projectId": "<project-id>"` to the chat creation request.
### 6. List Projects
```bash
curl -s "https://api.v0.dev/v1/projects" --header "Authorization: Bearer $V0_TOKEN" | jq '.data[] | {id, name, privacy}'
```
### 7. List Deployments
```bash
curl -s "https://api.v0.dev/v1/deployments" --header "Authorization: Bearer $V0_TOKEN" | jq '.data[] | {id, webUrl, status}'
```
### 8. Chat Completions (OpenAI-compatible)
Use the `v0-1.0-md` model directly for lightweight code generation without project context. This follows the standard OpenAI chat completions format:
Write to `/tmp/v0_request.json`:
```json
{
"model": "v0-1.0-md",
"messages": [
{"role": "user", "content": "Create a login form with email and password fields using shadcn/ui and Tailwind CSS"}
]
}
```
Then run:
```bash
curl -s -X POST "https://api.v0.dev/v1/chat/completions" --header "Authorization: Bearer $V0_TOKEN" --header "Content-Type: application/json" -d @/tmp/v0_request.json | jq '.choices[0].message.content'
```
**Context window:** 128,000 tokens input · 32,000 tokens output
## Guidelines
1. **Premium plan required**: API access requires a v0 Premium or Team subscription with Vercel usage-based billing enabled
2. **Iterate with follow-ups**: Use `POST /chats/<id>/messages` to refine code — it preserves full conversation context and is more token-efficient than creating a new chat
3. **demoUrl is the live preview**: Each chat response contains `latestVersion.demoUrl` — the live sandbox URL to preview the generated app; `webUrl` is the link to the v0.app chat interface
4. **Use projects for organization**: Group related chats under a project (via `projectId`) to share instructions and context across conversations
5. **Rate limits**: 1,000 chat messages and 100 deployments per day — prefer iterating within existing chats over creating new ones
More from vm0-ai/vm0-skills
- account-reconciliationPerform account reconciliations comparing general ledger balances against subledgers, bank statements, or external records. Use for bank reconciliation, GL-to-subledger reconciliation, intercompany reconciliation, balance sheet reconciliation, reconciling item analysis, outstanding item aging, or clearing open items.
- agentphoneBuild AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything related to telephony, phone numbers, or voice AI.
- ahrefsAhrefs SEO API for backlink and keyword analysis. Use when user mentions
- amplitudeAmplitude product analytics API. Use when user mentions "Amplitude",
- analysis-qaQuality-check a data analysis before sharing — verify joins, aggregations, denominators, time ranges, and metric definitions. Detect pitfalls like survivorship bias, average-of-averages, join explosion, timezone mismatches, incomplete periods, and selection bias. Includes documentation templates for reproducible analyses.
- anthropic-managed-agentsAnthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
- apifyApify web scraping platform. Use when user mentions "scrape website",
- asanaAsana API for tasks and projects. Use when user mentions "Asana", "asana.com",
- atlassianAtlassian API for Confluence and Jira. Use when user mentions "Confluence
- attioAttio REST API for AI-native CRM operations — manage companies, people, deals, and custom objects, plus notes, tasks, lists, and comments. Use when the user mentions "Attio", "CRM record", "create company", "add person", "list entry", "CRM note", or "CRM task".