ai-elements
O que ela faz
Ele orienta a IA na adição de componentes de chat com IA, construídos sobre o shadcn/ui, a um projeto Next.js. É para desenvolvedores que criam chatbots ou telas de assistente de IA.
Quando usar
- ✓Quando você quer criar uma tela de chatbot ou de assistente de IA em um app Next.js.
- ✓Quando precisa de componentes prontos para mensagens de chat, saída de ferramentas ou campo de prompt.
- ✓Quando quer adicionar o AI Elements a um projeto que já usa shadcn/ui.
Link da skill
https://github.com/trycompai/crm/blob/release/.agents/skills/ai-elements/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Você pode me ajudar a adicionar uma tela de chat com balões de mensagem e uma caixa de prompt ao meu app Next.js?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A IA instala os componentes com o executor de pacotes do projeto, adiciona-os ao projeto e os conecta à interface de chat.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
AI Elements
AI Elements is a component library and custom registry built on top of shadcn/ui 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, orbunx --bun ai-elements@latest— based on the project'spackageManager. Examples below usenpx ai-elements@latestbut substitute the correct runner for the project.
Prerequisites
Before installing AI Elements, make sure your environment meets the following requirements:
- Node.js, version 18 or later
- A Next.js project with the AI SDK installed.
- shadcn/ui 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 and adding
AI_GATEWAY_API_KEYto yourenv.localso 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.
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:
"use client";
import {
Message,
MessageContent,
MessageResponse,
} from "@/components/ai-elements/message";
import { useChat } from "@ai-sdk/react";
const Example = () => {
const { messages } = useChat();
return (
<>
{messages.map(({ role, parts }, index) => (
<Message from={role} key={index}>
<MessageContent>
{parts.map((part, i) => {
switch (part.type) {
case "text":
return (
<MessageResponse key={`${role}-${i}`}>
{part.text}
</MessageResponse>
);
}
})}
</MessageContent>
</Message>
))}
</>
);
};
export default Example;
In the example above, we import the Message component from our AI Elements directory and include it in our JSX. Then, we compose the component with the MessageContent and MessageResponse subcomponents. You can style or configure the component just as you would if you wrote it yourself – since the code lives in your project, you can even open the component file to see how it works or make custom modifications.
Extensibility
All AI Elements components take as many primitive attributes as possible. For example, the Message component extends HTMLAttributes<HTMLDivElement>, so you can pass any props that a div supports. This makes it easy to extend the component with your own styles or functionality.
Customization
After installation, no additional setup is needed. The component’s styles (Tailwind CSS classes) and scripts are already integrated. You can start interacting with the component in your app immediately.
For example, if yo
Perguntas frequentes
O que é preciso ter antes?
A skill lista Node.js 18 ou mais novo, um projeto Next.js com o AI SDK e o shadcn/ui.
Qual executor de pacotes ele usa?
Usa o que combina com o projeto, como npx, pnpm dlx ou bunx.
Ele recomenda um AI gateway?
Sim. Sugere usar o AI Gateway e adicionar sua chave de API ao arquivo de ambiente local.
Detalhes
Descrição original do autor
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.
repo: trycompai/crm
Popularidade
- Estrelas no GitHub
- 12 mil
- Posição no ranking
- #11506
- Licença
- MIT
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
ai-sdk
12 milAjuda seu agente a criar recursos de IA com o Vercel AI SDK, incluindo geração de texto, streaming, chamada de ferramentas e agentes.
better-accessibility
12 milAjuda seu agente a tornar interfaces utilizáveis com teclado e leitores de tela, cobrindo foco, rótulos, ARIA e formulários.
better-auth-best-practices
12 milAjuda seu agente a configurar o Better Auth para login, sessões, OAuth e plugins em um app TypeScript, seguindo os passos documentados.
better-colors
12 milAjuda seu agente a converter, escolher e verificar cores para uma interface web, incluindo paletas OKLCH, contraste e modo escuro.
Skills parecidas
angular-developer
280 milAjuda seu agente a criar código Angular e a dar conselhos sobre a estrutura do projeto. É útil para iniciar novos projetos, criar partes do código ou melhorar a performance e acessibilidade.
frontend-a11y
280 milAjuda seu agente a tornar interfaces web acessíveis para todos. Ele garante que sites e apps funcionem bem com leitores de tela e navegação por teclado.
frontend-patterns
280 milFaz seu agente aplicar padrões modernos no desenvolvimento frontend. Ele otimiza performance, gerencia estado e segue boas práticas em React e Next.js.