ai-elements

ai-elements is a skill for Claude Code from laguagu/claude-code-nextjs-skills. It costs 67 tokens per session (766 once invoked), scanned A, original, MIT.

A library of editable interface components for AI chat apps built with Next.js, AI SDK, and shadcn/ui. It includes pieces such as messages, conversations, prompts, sources, code blocks, and tool displays.

In plain words
What is it for?
Use it to add AI chat screens and related components to a Next.js project, with the component code copied into your project for editing.
Why use it?
It provides ready-made chat interface code, so you do not have to build common AI chat elements from the beginning.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the nextjs-ai-skills plugin — 24 skills shipped together

Good fit Use it to add AI chat screens and related components to a Next.js project, with the component code copied into your project for editing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laguagu/claude-code-nextjs-skills/ai-elements
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add laguagu/claude-code-nextjs-skills --skill ai-elements
Clone the repo
git clone --depth 1 https://github.com/laguagu/claude-code-nextjs-skills

Made for: Claude Code.

Or install nextjs-ai-skills, the plugin that ships this one along with the rest of its 24 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-elements

README.md
[![agentmods](https://agentmods.dev/badge/skills/laguagu/claude-code-nextjs-skills/ai-elements/github.svg)](https://agentmods.dev/skills/laguagu/claude-code-nextjs-skills/ai-elements)
Your own site
<a href="https://agentmods.dev/skills/laguagu/claude-code-nextjs-skills/ai-elements"><img src="https://agentmods.dev/badge/skills/laguagu/claude-code-nextjs-skills/ai-elements/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-elements

Your own site · 80×15
<a href="https://agentmods.dev/skills/laguagu/claude-code-nextjs-skills/ai-elements"><img src="https://agentmods.dev/badge/skills/laguagu/claude-code-nextjs-skills/ai-elements.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 766 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 3
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 39
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 26
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.00766
Opus 5.5 $0.00027 $0.00306
Sonnet 5.5 $0.00013 $0.00153
Haiku 4.5 $0.00007 $0.00077

Measured 1mo ago against content hash 4a66ed71b0b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-elements scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ai-elements/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

vercel/ai-elements will be deprecated at the end of November 2026 (announced 2026-10-14, CLI 1.9.1). Its replacement is AI Elements from shadcn/ui (https://ui.shadcn.com/docs/ai-elements): copy-in patterns built on Message, Bubble, Message Scroller, Trace and Code Block. Copied files in components/ai-elements/ keep working. To move one onto shadcn/ui, use the 'Migrating from AI SDK Elements' prompt on its pattern page; some elements (artifact, canvas, persona, web-preview, ...) have no replacement. For new chat UI use the shadcn skill, not ai-elements add.

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 for current documentation. Load only relevant references; verify bundled examples against installed source.

To add a missing component to an existing install, 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.

AI Elements targets the Radix base (upstream uses style new-york with radix-ui). On Base UI projects expect prop mismatches in prompt-input, attachments, inline-citation and plan (upstream #446, open 2026-10-11); adapt the installed copies.

Read the full file on GitHub · 64 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +10 lines · +24 tokens per session 4a66ed71b0b5
  2. 1mo ago Changed · -1 lines 8d4587761883
  3. 1mo ago Changed · +6 lines a2110166220e
  4. 2mo ago Changed · -52 lines · -90 tokens per session 61bf264fe2fe
  5. 2mo ago Changed · -61 lines c1218b441166
  6. 3mo ago Changed · -1 lines · +7 tokens per session 5c41ef32f89f
  7. 3mo ago First seen · 163 lines · 126 tokens per session scan A c3bc1f2e27b0

Subscribe to this mod's changes

ai-elements is a skill published in the GitHub repository laguagu/claude-code-nextjs-skills (75 stars, last pushed 6d ago), licensed MIT. It adds 67 tokens to every session and 766 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ai-elements compared with skills from other repositories

ai-elements next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ai-elementslaguagu/claude-code-nextjs-skillsSkill756d agoMITA67Claude Code
shadcnshadcn-ui/uiSkill130kyesterdayMITA113Claude Code, Codex, Cursor
magic-uimagicuidesign/magicuiSkill24kyesterdayMITA56Claude Code, Codex
common-stitch-designHoangNguyen0403/agent-skills-standardSkill598yesterdayMITA50Claude Code, Codex
common-ui-designHoangNguyen0403/agent-skills-standardSkill598yesterdayMITA47Claude Code, Codex
common-architecture-diagrammingHoangNguyen0403/agent-skills-standardSkill598yesterdayMITA71Claude Code, Codex
system-design-diagrammingHoangNguyen0403/agent-skills-standardSkill598yesterdayMITA63Claude Code, Codex