Skip to content
Back to skills

Ai Elements

ASecurity

Builds AI chat interfaces with AI Elements components copied into the project. Use when adding or composing conversations, messages, prompt inputs, attachments, reasoning, tool output or sources in an AI SDK application.

  • 67 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
ai-agentsapidocumentation

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add laguagu/claude-code-nextjs-skills --skill ai-elements --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Elements?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Elements
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/laguagu-ai-elements/badge)](https://www.skillsdirectory.com/skills/laguagu-ai-elements)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai-elements
description: Builds AI chat interfaces with AI Elements components copied into the project. Use when adding or composing conversations, messages, prompt inputs, attachments, reasoning, tool output or sources in an AI SDK application.
---

# AI Elements

Use AI Elements where its components fit the interaction. The generated source
belongs to the project: inspect it for the actual API and customize it deliberately.

## Project and documentation

Follow the project's package manager, aliases, shadcn configuration and AI SDK
major. Read `ai-sdk` to resolve the installed version, then the appropriate
`ai-sdk-6` or `ai-sdk-7` guidance. AI Elements and AI SDK versions can change
independently.

Read generated `components/ai-elements/<component>.tsx` first, then the
matching `references/` file and its `scripts/` examples. Use the
[AI Elements site](https://elements.ai-sdk.dev) or available AI Elements MCP
for current documentation. Load only relevant references; verify bundled
examples against installed source.

For installation, use the project's runner with `ai-elements@latest add <component>`
or `shadcn@latest add @ai-elements/<component>`. Components land in
`components/ai-elements/` under the alias configured in `components.json`; that
installed source is the offline API reference. Check installed components and
review generated files before replacing local customization. Use `shadcn` for
registry, preset and primitive-base details.

## Integration

[Integration](references/integration.md) covers the UI/SDK boundary, v6
pitfalls and the `context.tsx` patch that AI SDK 7 needs. Keep stable message
IDs and render supported message parts with the generated compound components.
Keep model choice, tools, credentials and authorization on the server.

Compose the states the feature needs: streaming, completion, retry, cancellation,
attachments, approval or sources. Avoid adding components merely because the
library offers them. Preserve keyboard interaction, accessible labels and useful
scroll behavior.

When rendering fails, inspect the owned component, theme imports, semantic tokens
and actual configured aliases. Do not copy a default `tsconfig` or replace the
project's theme to fix one import.

Verify the rendered flow with real message states and the project's checks;
type correctness alone does not establish usable streaming or attachment behavior.

Files in this skill

  • SKILL.md5.8 KB
  • references/agent.md4.1 KB
  • references/artifact.md2.9 KB
  • references/attachments.md5.6 KB
  • references/audio-player.md5.2 KB
  • references/canvas.md1.1 KB
  • references/chain-of-thought.md3.3 KB
  • references/chatbot.md15.4 KB
  • references/checkpoint.md5.4 KB
  • references/code-block.md5.4 KB
  • references/commit.md5.8 KB
  • references/confirmation.md8.2 KB
  • references/connection.md1.1 KB
  • references/context.md5.6 KB
  • references/controls.md971 B
  • references/conversation.md7.3 KB
  • references/edge.md2.1 KB
  • references/environment-variables.md3.7 KB
  • references/file-tree.md2 KB
  • references/image.md4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.