ai-elements
Skill by xiaoiver
Guides an AI assistant to create new AI chat interface components for the ai-elements library. It follows the library's composable patterns, shadcn/ui integration and Vercel AI SDK conventions, for developers adding components in packages/elements/src.
Install ai-elements
Built from the published package, never by AI.
git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial /tmp/infinite-canvas-tutorial && mkdir -p ~/.claude/skills && cp -r /tmp/infinite-canvas-tutorial/.cursor/skills/ai-elements ~/.claude/skills/ai-elementsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/xiaoiver/infinite-canvas-tutorial /tmp/infinite-canvas-tutorial && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/infinite-canvas-tutorial/.cursor/skills/ai-elements ~/.gemini/antigravity-cli/skills/ai-elementsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant to create new AI chat interface components for the ai-elements library. It asks the assistant to follow the library's established composable patterns, shadcn/ui integration and Vercel AI SDK conventions. It applies when creating components in packages/elements/src or when a user asks to add a new component to ai-elements.
The file also covers installing AI Elements, a component library built on shadcn/ui that provides pre-built components such as conversations and messages. Components are copied into the user's project, by default under @/components/ai-elements/, so their code can be edited directly. The skill points to a references/ folder for per-component documentation. It is aimed at developers building AI-native Next.js applications with the AI SDK.
Written from the project's SKILL.md and checked against it.
What it can do
- Create new componentsBuilds new AI chat interface components for the ai-elements library in packages/elements/src.
- Composable patternsKeeps new components consistent with the library's established composable patterns.
- shadcn/ui integrationApplies shadcn/ui conventions when adding a component to the library.
- Vercel AI SDK conventionsFollows Vercel AI SDK conventions in new chat components.
- Component reference lookupPoints to a references/ folder with detailed documentation for each component.
What you need
- Node.js 18 or later
- A Next.js project with the AI SDK installed
- shadcn/ui installed, or installed by running an install command
- AI_GATEWAY_API_KEY in env.local (recommended)
- Tailwind 4 configured for shadcn/ui styles
Try asking
- Create a new chat component in packages/elements/src that follows ai-elements patterns.
- Add a new component to ai-elements that uses shadcn/ui styling conventions.
- Show me how to compose Message, MessageContent and MessageResponse in a chat page.
Good to know
- The install steps and examples assume a Next.js project.
- Components live in the user's codebase, so changes are made to local files.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .cursor/skills/ai-elements/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to ai-elements
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
ai-elements: common questions
Does AI Elements require shadcn/ui?
AI Elements is built on top of shadcn/ui. If shadcn/ui is not installed, running any install command will install it automatically.
Where are AI Elements components added in a project?
By default they are added to @/components/ai-elements/, or to whatever folder is configured in your shadcn components settings.
Can I change an AI Elements component after installing it?
Yes. The code lives in your project, so you can open the component file and modify it, for example by removing rounded-lg from Message.
How do I install ai-elements?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is ai-elements free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is ai-elements safe to use?
It scores 80 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to ai-elements?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
