The Complete Production SOP: How to Deploy and Run Radix Vue & shadcn-vue Accessible Components in Autonomous AI Agents
Production SOP to install and run Radix Vue & shadcn-vue Accessible Components in Codex, Claude Code, and Cursor. Master headless UI, ARIA, and focus traps.
Technical Overview & Architectural Context
When generating Vue 3 UI primitives, autonomous AI coding agents frequently fall into deterministic failure patterns: inventing custom DOM wrappers that break WAI-ARIA compliance, failing to forward native attributes or events through v-bind, and writing brittle CSS animations that omit data-[state] attribute targets. In worst cases, agents attempt to adapt React Radix primitives into Vue templates, introducing non-existent hooks and hydration mismatches. The Radix Vue & shadcn-vue Accessible Components skill enforces structural guardrails around the shadcn-vue CLI and radix-vue primitives. By grounding agents in headless patterns, explicit props inheritance, keyboard navigation contracts (ESC dismiss, arrow-key roaming indexing, and focus trapping), and class-variance-authority styling rules, this skill prevents design system degradation and guarantees fully accessible production UI in Vue 3 and Nuxt applications.
Prerequisites & Environment Requirements
Verified Search Intents & Long-Tail Queries Solved
This operational tutorial is engineered to provide deterministic solutions for these developer search queries:
Step-by-Step Execution Playbook
Local Environment Setup & SKILL.md Mounting
Mount the skill manifest into your agent runtime's global or workspace-level configuration.
Agent runtimes such as Claude Code, Cursor, and Codex automatically scan specific paths (.claude/skills, .cursor/rules, or ~/.agents/skills) for SKILL.md files. Mounting this skill informs the agent's system parser about available triggers, workspace write boundaries, and explicit headless UI constraints.
mkdir -p .agents/skills/radix-vue-shadcn-vue-primitives && curl -fsSL https://askills.dev/api/skills/radix-vue-shadcn-vue-primitives/raw -o .agents/skills/radix-vue-shadcn-vue-primitives/SKILL.md---
name: "radix-vue-shadcn-vue-primitives"
description: "Build accessible, customizable Vue 3 design systems using Radix Vue headless primitives."
metadata:
author: "Radix Vue"
version: "1.0.0"
runtime_compatibility:
- "codex"
- "claude-code"
- "cursor"
- "windsurf"
triggers:
- "use radix-vue dialog"
- "install shadcn-vue components"
- "accessible vue components"
permissions:
fs_read: true
fs_write: "workspace"
shell_exec: false
net_access: false
---Place the SKILL.md inside your workspace's root directory (.cursor/rules or .agents/skills) to ensure all collaborating developers on Cursor or Windsurf inherit the identical prompt boundary without context drift.
Ensure fs_write permissions permit workspace modifications. The skill restricts shell_exec: false in untrusted modes, requiring human approval for package installations.
Environment Secrets & Dependency Validation
Bootstrap shadcn-vue scaffolding and verify base dependencies in package.json.
Before the agent generates headless components, ensure radix-vue, clsx, tailwind-merge, and class-variance-authority are declared in your package dependencies. If components.json is missing, initialize the project configuration so the agent knows the path aliases.
npx shadcn-vue@latest init --yes{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "default",
"typescript": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/assets/index.css",
"baseColor": "zinc",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}Pre-initializing components.json saves upwards of 1,200 tokens during prompt resolution, as the agent skips directory discovery and interactive CLI prompts.
Verify that path alias @ maps accurately to ./src (or ./ in Nuxt). Mismatched aliases will cause the agent to output invalid import paths that fail at compile time.
Intent Matching & Trigger Invocation
Invoke the agent using calibrated domain triggers that activate headless accessibility rules.
Provide instructions using the exact registered trigger phrases. The runtime cross-references user prompt keywords against frontmatter triggers to load the procedural execution checklist into the active inference window.
claude 'install shadcn-vue components: dialog, dropdown-menu, accordion. Configure an accessible user profile modal.'<script setup lang="ts">
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog'
import { Button } from '@/components/ui/button'
</script>
<template>
<Dialog>
<DialogTrigger as-child>
<Button variant="outline">Edit Profile</Button>
</DialogTrigger>
<DialogContent class="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>Edit Profile</DialogTitle>
<DialogDescription>
Make changes to your profile here. Click save when you're done.
</DialogDescription>
</DialogHeader>
<div class="grid gap-4 py-4">
<div class="grid grid-cols-4 items-center gap-4">
<label for="name" class="text-right text-sm font-medium">Name</label>
<input id="name" class="col-span-3 flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm" defaultValue="Pedro Duarte" />
</div>
</div>
<DialogFooter>
<Button type="submit">Save changes</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</template>Always prompt the agent with the explicit primitive names (e.g., 'DialogTitle', 'DialogDescription') to ensure required accessibility ARIA bindings (aria-labelledby and aria-describedby) are generated automatically.
Do not skip DialogDescription inside DialogContent. Radix Vue will issue runtime console warnings if an accessible description or aria-describedby is absent.
Verification, Linting & Output Quality Gate
Run TypeScript validation and automated accessibility inspections on the generated components.
Enforce the Verification Checklist defined in the skill. Verify that template emissions preserve component props inheritance using useForwardPropsEmits and validate clean type-checking without TS2322 errors.
npm run type-check && npx vue-tsc --noEmit<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import {
DialogClose,
DialogContent,
type DialogContentEmits,
type DialogContentProps,
DialogOverlay,
DialogPortal,
useForwardPropsEmits,
} from 'radix-vue'
import { X } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DialogContentEmits>()
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props
return delegated
})
const forwarded = useForwardPropsEmits(delegatedProps, emits)
</script>
<template>
<DialogPortal>
<DialogOverlay class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" />
<DialogContent
v-bind="forwarded"
:class="cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg', props.class)"
>
<slot />
<DialogClose class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<X class="h-4 w-4" />
<span class="sr-only">Close</span>
</DialogClose>
</DialogContent>
</DialogPortal>
</template>Instruct the agent to utilize `useForwardPropsEmits` from radix-vue rather than manually forwarding every prop and emit handler. This drastically simplifies SFC code size and eliminates event drop bugs.
Failing to delegate classes via computed properties will cause Tailwind class conflicts when parent components attempt to override primitive spacing or positioning.
Real-World Scenario: Scaffold an Accessible Destructive Confirmation Modal with Radix Vue and shadcn-vue
“accessible vue components: Create an accessible DeleteConfirmationDialog component using shadcn-vue and Radix Vue. It must trap focus, close on Escape key, emit a 'confirmed' event, include accessible title and description labels, and style the confirm button as destructive.”
Runtime Troubleshooting & Failure Modes
Root Cause: The agent rendered a DialogContent or DialogOverlay component without enclosing it in the root Dialog (DialogRoot) provider component, breaking the Vue provide/inject accessibility context.
Wrap DialogContent inside the root <Dialog> component in the parent template:
<template>
<Dialog :open="isOpen" @update:open="setIsOpen">
<DialogContent>
<DialogTitle>Modal Title</DialogTitle>
</DialogContent>
</Dialog>
</template>Root Cause: The agent passed string literals instead of dynamic Vue bindings (e.g., modal="true" instead of :modal="true"), causing strict TypeScript prop validation failures in radix-vue.
Prepend a colon to dynamic props to bind native booleans: replace `modal="true"` or `asChild="true"` with `:modal="true"` and `as-child` (or `:as-child="true"`).Frequently Asked Questions (Radix Vue & shadcn-vue Accessible Components SOP)
Q:Can I use Radix Vue & shadcn-vue Accessible Components across Codex, Claude Code, and Cursor simultaneously?
Yes. This skill is packaged according to the universal open SKILL.md specification. All modern runtimes (Codex, Claude Code CLI, Cursor, and Windsurf) can parse the YAML trigger manifests and enforce the accessibility SOP in any Vue 3 or Nuxt 3 environment.
Q:How does this skill prevent context window overflow during multi-turn Vue coding sessions?
By establishing a strict procedural sequence (verifying components.json, using useForwardPropsEmits, and delegating classes through computed properties), the agent avoids regenerating massive primitive wrapper templates or outputting repetitive verbose boilerplate.
Q:Does this skill require escalated root or container permissions?
No. The skill is audited with a security score of 98/100. It requires read and write permissions strictly bounded to your project workspace directory and does not require net_access or unvetted shell execution.
Ready to equip your autonomous agent with Radix Vue & shadcn-vue Accessible Components?
Copy the complete audited SKILL.md specification or download the 1-click zip bundle directly from our verified registry.