ai-elements
하는 일
Next.js 프로젝트에 shadcn/ui 기반 AI 채팅 컴포넌트를 추가하도록 AI 에이전트를 안내합니다. 챗봇이나 AI 어시스턴트 화면을 만드는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Next.js 앱에서 챗봇이나 AI 어시스턴트 화면을 만들고 싶을 때.
- ✓채팅 메시지, 도구 출력, 프롬프트 입력을 위한 기성 컴포넌트가 필요할 때.
- ✓이미 shadcn/ui를 쓰는 프로젝트에 AI Elements를 추가하고 싶을 때.
스킬 링크
https://github.com/trycompai/crm/blob/release/.agents/skills/ai-elements/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Next.js 앱에 메시지 말풍선과 프롬프트 상자가 있는 채팅 화면을 추가하도록 도와줄 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 프로젝트의 패키지 실행기로 컴포넌트를 설치하고, 프로젝트에 추가한 뒤 채팅 인터페이스에 연결합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
먼저 무엇이 필요한가요?
스킬은 Node.js 18 이상, AI SDK가 있는 Next.js 프로젝트, shadcn/ui를 필요로 한다고 나열합니다.
어떤 패키지 실행기를 쓰나요?
npx, pnpm dlx, bunx처럼 프로젝트에 맞는 실행기를 사용합니다.
AI 게이트웨이를 추천하나요?
네. AI Gateway 사용을 제안하고, 그 API 키를 로컬 환경 파일에 추가하라고 조언합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 12k
- 순위
- #11506
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
ai-sdk
12k에이전트가 Vercel AI SDK로 텍스트 생성, 스트리밍, 도구 호출, 에이전트를 포함한 AI 기능을 만들도록 돕습니다.
better-accessibility
12k에이전트가 키보드와 스크린 리더로도 사용할 수 있도록 인터페이스를 만들며, 포커스, 레이블, ARIA, 양식을 다루도록 돕습니다.
better-auth-best-practices
12k에이전트가 TypeScript 앱에서 문서에 나온 단계에 따라 Better Auth로 로그인, 세션, OAuth, 플러그인을 설정하도록 돕습니다.
better-colors
12k에이전트가 웹 인터페이스의 색상을 변환하고, 고르고, 확인하도록 돕습니다. OKLCH 팔레트, 대비, 다크 모드를 포함합니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.