Add preview route

From mattycraig/nuxt-theme-builder · View interactive version

Add preview route is an AI agent skill from the GitHub repository mattycraig/nuxt-theme-builder. Add a new component showcase, block, or template preview page and register it everywhere it must appear (navigation, command palette, route lists, SEO, source view). Use when adding anything under /components, /blocks, or /templates.

How to use this skill

Skill file

Add a preview route: $ARGUMENTS

Preview pages render inside the editor's iframe (?preview, preview layout) and must respond to the theme being edited. Use Nuxt UI components and semantic tokens (bg-(--ui-bg-elevated), text-(--ui-text-muted), color="primary"), never raw palette classes like bg-blue-500.

1. Create the content

Component showcase (/components/<slug>, data-driven via app/pages/components/[slug].vue):

Block (/blocks/<slug>, data-driven via app/pages/blocks/[slug].vue):

Template (/templates/<slug>):

2. Register the route

3. Verify

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.