magic-ui

A guide to Magic UI components for React and Next.js projects. Magic UI is a component collection for adding interface elements and animations through the shadcn registry.

In plain words
What is it for?
Adding animated interface sections such as marquees, globes, blur effects, shiny buttons, cards, heroes, testimonials, and calls to action.
Why use it?
It helps developers choose, install, customise, and troubleshoot these components without piecing together the integration steps themselves.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/magicuidesign/magicui/magic-ui
Any agent
npx skills add magicuidesign/magicui --skill magic-ui
Clone the repo
git clone --depth 1 https://github.com/magicuidesign/magicui

Made for: Claude Code, Codex.

Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00056 $0.00777
Opus 5 $0.00028 $0.00388
Sonnet 5 $0.00011 $0.00155
Haiku 4.5 $0.00006 $0.00078

Measured 2d ago against content hash f10680483737, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

magic-ui 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 2d 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/magic-ui/SKILL.md · 88 lines

How it starts

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

Magic UI

Use this skill when the task involves Magic UI components, animated UI sections, or converting static sections into interactive UI using the Magic UI registry.

When To Apply

Apply this skill when users ask to:

  • Add a Magic UI component (for example: marquee, globe, blur-fade, shiny-button)
  • Build a section with Magic UI effects (hero, testimonials, CTA, feature grid)
  • Replace custom animation code with Magic UI components
  • Troubleshoot installation/import issues for @magicui/*

Core Workflow

  1. Define the UI outcome first.
  • Identify section type, tone, motion intensity, and responsive behavior.
  • Keep motion intentional; avoid stacking many high-motion effects in one viewport.
  1. Confirm project prerequisites.
  • Project should be React/Next.js with Tailwind CSS.
  • shadcn must be initialized before adding registry components:
npx shadcn@latest init
  1. Install the selected component(s).
npx shadcn@latest add @magicui/<component-slug>

Example:

npx shadcn@latest add @magicui/magic-card
  1. Integrate into the target section.
  • Import from the generated path (typically @/components/ui/<component-slug>).
  • Keep component APIs intact; prefer prop/className customization over rewriting internals.
  • If docs mention extra dependencies or CSS keyframes, add them during integration.
  1. Validate quality before finishing.
  • Accessibility: semantic HTML, keyboard access, meaningful labels/text.
  • Responsiveness: check mobile layout and overflow behavior.
  • Performance: avoid unnecessary client-only wrappers and heavy animation stacking.
  • Maintainability: keep new code modular and consistent with existing project conventions.

References To Load On Demand

  • For component choice, install shape, and dependency expectations:
    • Read references/components.md
  • For section-level implementation patterns:
    • Read references/recipes.md

Quick Component Selection Heuristics

  • Social proof/logo rails: marquee, avatar-circles
  • Hero visual impact: globe, warp-background, animated-grid-pattern
  • Text animation: blur-fade, text-animate, word-rotate, sparkles-text
  • CTA emphasis: shiny-button, shimmer-button, rainbow-button
  • Ambient backgrounds: grid-pattern, dot-pattern, particles, flickering-grid

Read the full file on GitHub · 88 lines

Files

What ships with it

2 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. 2d ago First seen · 88 lines · 56 tokens per session scan A f10680483737

Subscribe to this mod's changes

magic-ui is a skill published in the GitHub repository magicuidesign/magicui (22,131 stars, last pushed 21d ago), licensed MIT. It adds 56 tokens to every session and 777 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

ui-beats

Use this skill when users want to add, customize, or troubleshoot UI Beats components in React/Next.js projects. It covers component selection, shadcn registry installation from uibeats.com, the UI Beats MCP server, motion and reduced-motion handling, and integration patterns for animated sections.

nikhils4/ui-beats · 62 tokens

flutter-expert

Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization.

tutur3u/platform · 41 tokens

motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

rimzzlabs/website · 25 tokens

frontend-engineer

!cat skills/shared/protocols/ux-protocol.md 2>/dev/null || true !cat skills/shared/protocols/input-validation.md 2>/dev/null || true !cat skills/shared/protocols/tool-efficiency.md 2>/dev/null || true !cat .production-grade.yaml 2>/dev/null || echo "No config — using defaults" !cat .forgewright/codebase-context.md…

buiphucminhtam/forgewright · 55 tokens

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

tutur3u/platform · 57 tokens

design-taste-frontend

Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.

tutur3u/platform · 40 tokens