AI Elements skill

A Vercel skill for building chat interfaces from AI Elements components: conversations, messages, prompt input, tool output

  • 2,509 ★ on the repository
  • Last commit
SkillOfficial

Extended access

Why this level

  • The skill tells the agent to run npx commands that download component code from a registry and add dependencies to the project
  • Installation may set up shadcn/ui and change project files
All reasons and checks

vercel/ai-elements

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/ai-elements

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The skill tells the agent to run npx commands that download component code from a registry and add dependencies to the project
  • Installation may set up shadcn/ui and change project files

This is third-party code. Review the repository files before installing.

What it does

The ai-elements skill teaches an agent to build AI chat interfaces from AI Elements components, a library on top of shadcn/ui that Vercel builds alongside the AI SDK. The skill covers two ways to install components into a project: the CLI `npx ai-elements@latest` (all components at once or one with `add message`) and the regular shadcn/ui CLI with URLs like `https://elements.ai-sdk.dev/api/registry/message.json`. Component code lands in `@/components/ai-elements/`, so it becomes part of your project and can be edited. The skill's reference has a separate file for each of 48 components: conversation, message, prompt-input, reasoning, tool, code-block, sources, inline-citation, terminal, web-preview, voice-selector and others. TSX examples sit beside them. The skill reminds the agent to run commands with the package manager named in the project's `packageManager` field. Requirements: Node.js 18 or newer, a Next.js project with the AI SDK installed, initialized shadcn/ui and Tailwind CSS in CSS-variables mode. The developers recommend adding a `AI_GATEWAY_API_KEY` from Vercel AI Gateway to `.env.local` so you don't keep a key per provider. The README carries a warning at the top: AI Elements is moving to shadcn/ui, and this project will be deprecated.

Who it is for. Frontend developers on Next.js and the AI SDK who ask Claude Code or Cursor to build an AI chat from ready shadcn/ui-based components.

Good fit when

  • A chatbot or assistant exists only as a sketch: the agent installs conversation, message and prompt-input and wires up `useChat`
  • Model replies carry reasoning, sources and tool calls, and each needs its own interface block
  • Voice input and transcription are on the plan: the reference has speech-input, transcription and voice-selector
  • The components will be edited to match a design system: the code lives in your project, not in a dependency
  • You need a working assistant prototype fast: components install with one command

Not a fit when

  • The project is not on React or lacks Next.js: the components target Next.js and the AI SDK
  • A new project starts after November 2026: the developers recommend the shadcn/ui version
  • The project has no shadcn/ui and Tailwind CSS with CSS variables: the components need that base
  • You want a hosted chat service: AI Elements gives components, not hosting

Example request

Build a chat page with AI Elements: message list, input field, reasoning and sources blocks, wired to `useChat` from the AI SDK

Limitations

  • The project's lifespan ends in late November 2026. The developers advise new projects to wait for the shadcn/ui version.
  • Next.js with the AI SDK, shadcn/ui and Tailwind CSS in CSS-variables mode are required, otherwise the components will not fit.
  • The CLI downloads code from the `elements.ai-sdk.dev` registry, so installation needs network access.
  • The `AI_GATEWAY_API_KEY` key is optional but recommended for reaching models through one gateway.

How to disable. Delete the skill folder from the agent's skills directory. Installed components stay in `@/components/ai-elements/` as ordinary code: remove the folder and the imports if the interface is no longer needed.

FAQ

How do I install the AI Elements skill in Claude Code?

Run `npx skills add vercel/ai-elements` at the project root. The components themselves come from `npx ai-elements@latest`, and for a single component use `npx ai-elements@latest add message`.

What does a project need for AI Elements?

Node.js 18 or newer, Next.js with the AI SDK installed, initialized shadcn/ui and Tailwind CSS in CSS-variables mode. If shadcn/ui is not set up yet, the first install command configures it.

Is AI Elements being shut down?

Yes, at the end of November 2026 the shadcn/ui version of AI Elements takes its place. The code of already installed components stays with you, and the developers advise new projects to start on the new version.

Do I need an AI Gateway key?

No, but the developers recommend adding `AI_GATEWAY_API_KEY` to `.env.local`: one key reaches several providers, so you don't need separate keys.

Which components does AI Elements include?

The skill's reference splits into 48 files: conversation, message, prompt-input, reasoning, tool, code-block, sources, terminal, web-preview and others. Each component installs separately with `npx ai-elements@latest add <name>`.

Discussion

No questions or reviews yet.

Skills

The skill teaches an agent to build an AI agent chat from 26 Agent Elements components: tool cards, input bar, streaming

SkillMinimal access110Repository stars
Official

A skill that picks and installs beUI animated React components through the public MCP or the shadcn registry instead of hand-built widgets

SkillExtended access1.9KRepository stars
Editors’ pick

Official shadcn/ui skill and MCP server: the agent searches registries, adds components via the CLI and follows the library's rules

SkillExtended access127.5KRepository stars

Official NVIDIA skill: the agent builds interfaces from web components and design tokens, with CLI and MCP supplying the API.

SkillExtended access115Repository stars
Official

Magic UI skill: an agent adds animated components to React and Next.js through the shadcn registry and checks accessibility

SkillExtended access23.1KRepository stars
Official

The shadcn-vue skill reads your project settings and teaches an agent to add components, forms and themes of the Vue port of shadcn/ui by its rules

SkillExtended access10.8KRepository stars

README in short

The README opens with a warning about the project moving to shadcn/ui, then covers install via `npx ai-elements@latest` and the shadcn/ui CLI, requirements and a chat example on `useChat`. It then explains how the CLI works: it detects the package manager, fetches the component registry and puts the code into the directory from `components.json`. Setup recommendations and contribution steps close it.

README badge

Original SKILL.md

---
name: ai-elements
description: Build AI chat interfaces using ai-elements components — conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chatbot, AI assistant UI, or any AI-powered chat interface.
---

# AI Elements

[AI Elements](https://www.npmjs.com/package/ai-elements) is a component library and custom registry built on top of [shadcn/ui](https://ui.shadcn.com/) to help you build AI-native applications faster. It provides pre-built components like conversations, messages and more.

Installing AI Elements is straightforward and can be done in a couple of ways. You can use the dedicated CLI command for the fastest setup, or integrate via the standard shadcn/ui CLI if you've already adopted shadcn's workflow.

> **IMPORTANT:** Run all CLI commands using the project's package runner: `npx ai-elements@latest`, `pnpm dlx ai-elements@latest`, or `bunx --bun ai-elements@latest` — based on the project's `packageManager`. Examples below use `npx ai-elements@latest` but substitute the correct runner for the project.

## Prerequisites

Before installing AI Elements, make sure your environment meets the following requirements:

- [Node.js](https://nodejs.org/en/download/), version 18 or later
- A [Next.js](https://nextjs.org/) project with the [AI SDK](https://ai-sdk.dev/) installed.
- [shadcn/ui](https://ui.shadcn.com/) installed in your project. If you don't have it installed, running any install command will automatically install it for you.
- We also highly recommend using the [AI Gateway](https://vercel.com/docs/ai-gateway) and adding `AI_GATEWAY_API_KEY` to your `env.local` so you don't have to use an API key from every provider. AI Gateway also gives $5 in usage per month so you can experiment with models. You can obtain an API key [here](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys&title=Get%20your%20AI%20Gateway%20key).

## Installing Components

You can install AI Elements components using either the AI Elements CLI or the shadcn/ui CLI. Both achieve the same result: adding the selected component’s code and any needed dependencies to your project.

The CLI will download the component’s code and integrate it into your project’s directory (usually under your components folder). By default, AI Elements components are added to the `@/components/ai-elements/` directory (or whatever folder you’ve configured in your shadcn components settings).

After running the command, you should see a confirmation in your terminal that the files were added. You can then proceed to use the component in your code.

## Usage

Once an AI Elements component is installed, you can import it and use it in your application like any other React component. The components are added as part of your codebase (not hidden in a library), so the usage feels very natural.

## Example

After installing AI Elements components, you can use them in your application like any other React component. For example:

```tsx title="conversation.tsx"
"use client";

import {
  Message,
  MessageContent,
  MessageResponse,
} from "@/components/ai-elements/message";
import { useChat } from "@ai-sdk/react";

const Example = () => {
  const { messages } = useChat();

Report a problem

Foxx AIAI Elements
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.