AI Elements Chat Components
mweinbach/agent-coworker
Adds AI Elements components such as conversations, messages, tool displays and prompt inputs to a Next.js project that uses shadcn/ui.
Create new AI chat interface components for the ai-elements library following established composable patterns, shadcn/ui integration, and Vercel AI SDK conventions.
$ npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install xiaoiver/infinite-canvas-tutorial ai-elements --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/ai-elements .claude/skills/ai-elements && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ai-elements" agent skill from https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elements into .claude/skills/ai-elements/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ai-elements", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elementsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install xiaoiver/infinite-canvas-tutorial ai-elements --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.cursor/skills/ai-elements .agents/skills/ai-elements && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ai-elements" agent skill from https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elements into .agents/skills/ai-elements/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ai-elements", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install xiaoiver/infinite-canvas-tutorial ai-elements --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.cursor/skills/ai-elements .cursor/skills/ai-elements && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ai-elements" agent skill from https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elements into .cursor/skills/ai-elements/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ai-elements", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/xiaoiver/infinite-canvas-tutorial.git --path .cursor/skills/ai-elements--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install xiaoiver/infinite-canvas-tutorial ai-elements --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.cursor/skills/ai-elements .gemini/skills/ai-elements && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ai-elements" agent skill from https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elements into .gemini/skills/ai-elements/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ai-elements", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install xiaoiver/infinite-canvas-tutorial ai-elementsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial.git skills-src && mkdir -p .github/skills && cp -r skills-src/.cursor/skills/ai-elements .github/skills/ai-elements && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ai-elements" agent skill from https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elements into .github/skills/ai-elements/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ai-elements", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install xiaoiver/infinite-canvas-tutorial ai-elements --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.cursor/skills/ai-elements .opencode/skills/ai-elements && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ai-elements" agent skill from https://github.com/xiaoiver/infinite-canvas-tutorial/tree/master/.cursor/skills/ai-elements into .opencode/skills/ai-elements/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ai-elements", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ai-elementsCreate new AI chat interface components for the ai-elements library following established composable patterns, shadcn/ui integration, and Vercel AI SDK conventions.
AI Elements is an agent skill from xiaoiver/infinite-canvas-tutorial. Create new AI chat interface components for the ai-elements library following established composable patterns, shadcn/ui integration, and Vercel AI SDK conventions. Use when creating new components in packages/elements/src or when the user asks to add a new component to ai-elements.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Frontend & Design. It works with shadcn/ui and Vercel AI SDK. The repository describes itself as: A tutorial on infinite canvas. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 0238248. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
ui.shadcn.comvercel.comgithub.comnpmjs.comnodejs.orgnextjs.orgai-sdk.devFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
AI_GATEWAY_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
AI Elements loads about 1.9k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 758 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from xiaoiver/infinite-canvas-tutorial at commit 0238248, republished under its MIT licence (© xiaoiver). 758 words, ~1,850 tokens.
.claude/skills/ai-elements/SKILL.md (or your agent's skills folder).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.
Here are some basic examples of what you can achieve using components from AI Elements.
Before installing AI Elements, make sure your environment meets the following requirements:
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.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.
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.
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.
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.
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 you'd like to remove the rounding on Message, you can go to components/ai-elements/message.tsx and remove rounded-lg as follows:
export const MessageContent = ({
children,
className,
...props
}: MessageContentProps) => (
<div
className={cn(
'flex flex-col gap-2 text-sm text-foreground',
'group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground group-[.is-user]:px-4 group-[.is-user]:py-3',
className,
)}
{...props}
>
<div className="is-user:dark">{children}</div>
</div>
);Make sure your project is configured correctly for shadcn/ui in Tailwind 4 - this means having a globals.css file that imports Tailwind and includes the shadcn/ui base styles.
Double-check that:
package.json lives).npx ai-elements@latestIf all else fails, feel free to open an issue on GitHub.
Ensure your app is using the same data-theme system that shadcn/ui and AI Elements expect. The default implementation toggles a data-theme attribute on the <html> element. Make sure your tailwind.config.js is using class or data- selectors accordingly:
Check the file exists. If it does, make sure your tsconfig.json has a proper paths alias for @/ i.e.
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
}
}If none of these answers help, open an issue on GitHub and someone will be happy to assist.
See the references/ folder for detailed documentation on each component.
© xiaoiver, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .cursor/skills/ai-elements of xiaoiver/infinite-canvas-tutorial.
Open the folder on GitHubat commit 0238248
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in xiaoiver/infinite-canvas-tutorial, which our catalogue first saw on October 7, 2026.
AI Elements next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| AI Elements this skillxiaoiver/infinite-canvas-tutorial | 1.1k | 2 repos | ~1.9k | Automated safety check: Pass | MIT | |
| AI Elements Chat Componentsmweinbach/agent-coworker | 156 | 5 repos | ~1.8k | Automated safety check: Pass | Custom licence | |
| Nexus UIvictorcodess/nexus-ui | 132 | — | ~12k | Automated safety check: Pass | MIT | |
| Web Artifacts Builderanthropics/skills | 180k | 40 repos | ~769 | Automated safety check: Pass | Apache-2.0 | |
| UI StylingOhh-889/skyroc | 795 | 13 repos | ~2.5k | Automated safety check: Pass | MIT | |
| Shadcnsupabase/evals | 143 | 42 repos | ~4.5k | Automated safety check: Pass | Apache-2.0 |
mweinbach/agent-coworker
Adds AI Elements components such as conversations, messages, tool displays and prompt inputs to a Next.js project that uses shadcn/ui.
victorcodess/nexus-ui
Install and compose Nexus UI components for AI chat UIs — prompt input, model selector, suggestions, attachments, message, thread, citation, reasoning, text shimmer, image, feedback bar, toaster…
anthropics/skills
Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.
Ohh-889/skyroc
Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.
supabase/evals
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI.
google-labs-code/stitch-skills
Guides finding, installing, customizing and wiring up shadcn/ui components in a project, with MCP tools for the component catalog and registries.
Works with
Categories
Create new AI chat interface components for the ai-elements library following established composable patterns, shadcn/ui integration, and Vercel AI SDK conventions. AI Elements is an agent skill from xiaoiver/infinite-canvas-tutorial. Create new AI chat interface components for the ai-elements library following established composable patterns, shadcn/ui integration, and Vercel AI SDK conventions.
AI Elements fits situations like: creating new components in packages/elements/src; the user asks to add a new component to ai-elements.
Run `npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a claude-code`. Or copy the skill folder (.cursor/skills/ai-elements in xiaoiver/infinite-canvas-tutorial) into .claude/skills/ai-elements in your project. Claude Code loads it when a task matches its description.
Run `npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a codex`. Or copy the skill folder (.cursor/skills/ai-elements in xiaoiver/infinite-canvas-tutorial) into .agents/skills/ai-elements in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xiaoiver/infinite-canvas-tutorial --skill ai-elements -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-elements, .gemini/skills/ai-elements, .github/skills/ai-elements and .opencode/skills/ai-elements in your project.
Going by SKILL.md and its folder, AI Elements needs the command-line tools its instructions call (npx) and credentials named AI_GATEWAY_API_KEY. Our summary lists: Node.js; A credential in AI_GATEWAY_API_KEY.
SKILL.md names 7 domains. As links in the text: ui.shadcn.com, vercel.com, github.com, npmjs.com, nodejs.org, nextjs.org and ai-sdk.dev. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
AI Elements is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with AI Elements: AI Elements Chat Components (mweinbach/agent-coworker, 156 stars), Nexus UI (victorcodess/nexus-ui, 132 stars), Web Artifacts Builder (anthropics/skills, 180k stars) and UI Styling (Ohh-889/skyroc, 795 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
xiaoiver (a GitHub user) maintains it in xiaoiver/infinite-canvas-tutorial, which has 1,093 GitHub stars. The repository was last updated on October 7, 2026.
Source: xiaoiver/infinite-canvas-tutorial on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.