ai-elements
Skill by zai-org
Builds AI chat interfaces with AI Elements components, a shadcn/ui-based library covering conversations, messages, tool displays and prompt inputs. It is for developers building chatbots or AI assistant UIs in Next.js projects.
Install ai-elements
Built from the published package, never by AI.
git clone --depth 1 https://github.com/zai-org/ZCode /tmp/ZCode && mkdir -p ~/.claude/skills && cp -r /tmp/ZCode/.agents/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/zai-org/ZCode /tmp/ZCode && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ZCode/.agents/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 assistant through installing and using AI Elements, a component library and custom registry built on top of shadcn/ui. The components include conversations and messages, and the source says the library includes more. Components are installed with the AI Elements CLI or the shadcn/ui CLI, and the code is copied into the project, by default under components/ai-elements/.
Because the code lives in the user's project, the components can be opened, styled and changed directly. The source shows an example that imports Message, MessageContent and MessageResponse and renders AI SDK useChat messages. It also covers troubleshooting for styling, path aliases and theme switching. The skill is aimed at developers building chatbots or AI-powered chat interfaces with the AI SDK.
Written from the project's SKILL.md and checked against it.
What it can do
- Install componentsAdds selected AI Elements components and their dependencies using the AI Elements CLI or the shadcn/ui CLI.
- Compose chat messagesUses Message, MessageContent and MessageResponse components to render AI SDK chat messages.
- Customize component codeEdits the component files copied into the project, such as removing rounding from Message styles.
- Extend with HTML propsPasses standard div attributes to Message, which extends HTMLAttributes<HTMLDivElement>.
- Troubleshoot setupCovers missing styles, CLI installs that add nothing, theme switching and @/ path alias import errors.
What you need
- Node.js 18 or later
- A Next.js project with the AI SDK installed
- shadcn/ui, which the install command adds if missing
- AI_GATEWAY_API_KEY in env.local (recommended)
Try asking
- Add an AI Elements conversation and message list to my Next.js chat page.
- Use MessageResponse to render AI SDK text parts in my assistant UI.
- Remove the rounded corners from the Message component in my project.
Good to know
- The source says the Tailwind CSS setup requires Tailwind 4 with a globals.css importing shadcn/ui base styles.
- Theme switching expects a data-theme attribute on the html element by default.
- The full list of components is in a references folder that is not included in this source.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/ai-elements/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
references/agent.md4 KB -
references/artifact.md3 KB -
references/attachments.md6 KB -
references/audio-player.md6 KB
Show all 129 files
-
references/canvas.md1 KB -
references/chain-of-thought.md4 KB -
references/checkpoint.md6 KB -
references/code-block.md6 KB -
references/commit.md6 KB -
references/confirmation.md9 KB -
references/connection.md1 KB -
references/context.md6 KB -
references/controls.md1 KB -
references/conversation.md8 KB -
references/edge.md2 KB -
references/environment-variables.md4 KB -
references/file-tree.md2 KB -
references/image.md4 KB -
references/inline-citation.md11 KB -
references/jsx-preview.md4 KB -
references/message.md10 KB -
references/mic-selector.md8 KB -
references/model-selector.md5 KB -
references/node.md3 KB -
references/open-in-chat.md3 KB -
references/package-info.md3 KB -
references/panel.md1 KB -
references/persona.md6 KB -
references/plan.md3 KB
And 99 more files on GitHub.
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
Do I need shadcn/ui to use AI Elements?
The source says shadcn/ui must be installed in the project. If it is not installed, running any install command installs it automatically.
Where are AI Elements components added in my project?
By default they are added to the @/components/ai-elements/ directory, or to the folder set in your shadcn components settings.
Can I change the component code after installing?
Yes. The source says the code lives in your project, so you can open the component file and make custom changes.
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 Apache-2.0 licence. The service it connects to may have its own pricing.
Is ai-elements safe to use?
It scores 91 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.
