Vue Gen logo

Vue Gen

Organization
memi-design
vue-gen

Vue 3 Composition API code generation — transforms Mémoire component specs into Vue SFCs with script setup, Tailwind styling, and composable patterns

Overview

Publishermemi-design
Repositorydesign-skills
Skill namevue-gen
Stars
7
Forks
0
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by memi-design on GitHub. Read the source before you install it.

Installation

Install the Vue Gen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/memi-design/design-skills/tree/main/skills/vue-gen
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/memi-design/design-skills.git /tmp/design-skills
mkdir -p .claude/skills
cp -r /tmp/design-skills/skills/vue-gen .claude/skills/vue-gen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Vue Gen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Vue Gen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Vue Gen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Vue Generator -- Memoire Spec to Vue SFC

Transforms Memoire component specs into production-ready Vue 3 Single File Components. Uses Composition API with <script setup>, TypeScript, Tailwind CSS, and composable patterns for state management.


Atomic Design Mapping to Vue

Atomic LevelVue PatternOutput DirectoryExample
atomSFC, no composablescomponents/ui/MButton.vue, MBadge.vue
moleculeSFC, may use atomscomponents/molecules/SearchField.vue, UserChip.vue
organismSFC + composablecomponents/organisms/DataTable.vue, Sidebar.vue
templateSFC (slot-based layout)components/templates/DashboardLayout.vue
pageSFC + Pinia storepages/HomePage.vue, SettingsPage.vue

Rules

  • Atoms are self-contained. No imports from other components. Props in, events out.
  • Molecules compose 2-5 atom components. Keep logic minimal -- presentation layer only.
  • Organisms use composables for complex state. May fetch data via composables or stores.
  • Templates use named slots for content areas. Never contain business logic or real data.
  • Pages connect templates to Pinia stores and route params.

Script Setup with TypeScript

All generated components use <script setup lang="ts">. Define props and emits with full type safety.

Props

vue
<script setup lang="ts">
interface Props {
  label: string
  variant?: 'primary' | 'secondary' | 'ghost'
  size?: 'sm' | 'md' | 'lg'
  disabled?: boolean
}

const props = withDefaults(defineProps<Props>(), {
  variant: 'primary',
  size: 'md',
  disabled: false,
})
</script>

Emits

vue
<script setup lang="ts">
interface Emits {
  (e: 'click', event: MouseEvent): void
  (e: 'update:modelValue', value: string): void
}

const emit = defineEmits<Emits>()
</script>

Slots

vue
<script setup lang="ts">
defineSlots<{
  default(): any
  icon?(): any
  description?(): any
}>()
</script>

Expose

Only expose what is needed for parent component refs:

vue
<script setup lang="ts">
const inputRef = ref<HTMLInputElement | null>(null)

function focus() {
  inputRef.value?.focus()
}

defineExpose({ focus })
</script>

Tailwind / UnoCSS Styling

Class Organization

Follow this order within class attributes:

1. Layout       (flex, grid, block, inline)
2. Positioning  (relative, absolute, top-0)
3. Box model    (w-full, h-12, p-4, m-2)
4. Typography   (text-sm, font-medium, text-gray-700)
5. Visual       (bg-white, border, rounded-lg, shadow)
6. Interactive  (hover:, focus:, active:, transition)

Token-Aware Classes

Map design tokens via Tailwind config extensions:

vue
<template>
  <button
    class="inline-flex items-center justify-center
           h-10 px-4
           text-sm font-medium text-primary
           bg-bg-primary border border-border-default rounded-default
           hover:bg-bg-secondary focus:outline-none focus:ring-2 focus:ring-accent
           transition-colors duration-150"
  >
    <slot />
  </button>
</template>

Dynamic Classes

Use computed properties for variant-driven styling:

vue
<script setup lang="ts">
import { computed } from 'vue'

interface Props {
  variant?: 'primary' | 'secondary' | 'ghost'
}

const props = withDefaults(defineProps<Props>(), {
  variant: 'primary',
})

const variantClasses = computed(() => {
  const map: Record<string, string> = {
    primary: 'bg-accent text-white hover:bg-accent/90',
    secondary: 'bg-bg-secondary text-text-primary hover:bg-bg-secondary/80',
    ghost: 'bg-transparent text-text-primary hover:bg-bg-secondary',
  }
  return map[props.variant]
})
</script>

Composable Patterns for State

Naming Convention

All composables start with use and live in composables/.

Data Fetching Composable

typescript
// composables/useUsers.ts
import { ref, onMounted } from 'vue'
import type { User } from '@/types'

export function useUsers() {
  const users = ref<User[]>([])
  const loading = ref(false)
  const error = ref<string | null>(null)

  async function fetchUsers() {
    loading.value = true
    error.value = null
    try {
      const response = await fetch('/api/users')
      users.value = await response.json()
    } catch (e) {
      error.value = e instanceof Error ? e.message : 'Unknown error'
    } finally {
      loading.value = false
    }
  }

  onMounted(fetchUsers)

  return { users, loading, error, refresh: fetchUsers }
}

Toggle Composable

typescript
// composables/useToggle.ts
import { ref } from 'vue'

export function useToggle(initial = false) {
  const state = ref(initial)
  function toggle() { state.value = !state.value }
  function setTrue() { state.value = true }
  function setFalse() { state.value = false }
  return { state, toggle, setTrue, setFalse }
}

Form Composable

typescript
// composables/useForm.ts
import { reactive, computed } from 'vue'

export function useForm<T extends Record<string, any>>(initialValues: T) {
  const values = reactive({ ...initialValues }) as T
  const errors = reactive<Partial<Record<keyof T, string>>>({})
  const dirty = computed(() =>
    Object.keys(initialValues).some(
      (key) => values[key as keyof T] !== initialValues[key as keyof T]
    )
  )

  function reset() {
    Object.assign(values, initialValues)
    Object.keys(errors).forEach((key) => delete errors[key as keyof T])
  }

  function setError(field: keyof T, message: string) {
    errors[field] = message
  }

  return { values, errors, dirty, reset, setError }
}

Pinia Store Generation

Store Template

typescript
// stores/users.ts
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
import type { User } from '@/types'

export const useUsersStore = defineStore('users', () => {
  // State
  const users = ref<User[]>([])
  const loading = ref(false)
  const selectedId = ref<string | null>(null)

  // Getters
  const selectedUser = computed(() =>
    users.value.find((u) => u.id === selectedId.value) ?? null
  )
  const userCount = computed(() => users.value.length)

  // Actions
  async function fetchUsers() {
    loading.value = true
    try {
      const response = await fetch('/api/users')
      users.value = await response.json()
    } finally {
      loading.value = false
    }
  }

  function selectUser(id: string) {
    selectedId.value = id
  }

  return { users, loading, selectedId, selectedUser, userCount, fetchUsers, selectUser }
})

Store Mapping from Spec

Spec FieldPinia ConceptNotes
state propertiesref() in setupEach state field becomes a ref
computed propertiescomputed()Derived values
actionsFunctionsAsync operations, mutations
subscriptions$subscribeWatch for external changes

Example: Spec to Vue SFC Output

Input Spec (JSON)

json
{
  "name": "StatusBadge",
  "atomicLevel": "atom",
  "description": "Colored badge showing status text",
  "props": [
    { "name": "label", "type": "string", "required": true },
    { "name": "variant", "type": "enum", "values": ["success", "warning", "error", "info"], "default": "info" }
  ],
  "tokens": {
    "borderRadius": "radius.sm",
    "paddingX": "spacing.2",
    "paddingY": "spacing.1",
    "fontSize": "text.xs"
  }
}

Output Vue SFC

vue
<script setup lang="ts">
import { computed } from 'vue'

interface Props {
  label: string
  variant?: 'success' | 'warning' | 'error' | 'info'
}

const props = withDefaults(defineProps<Props>(), {
  variant: 'info',
})

const variantClasses = computed(() => {
  const map: Record<string, string> = {
    success: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',
    warning: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',
    error: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200',
    info: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',
  }
  return map[props.variant]
})
</script>

<template>
  <span
    :class="[
      'inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm',
      variantClasses,
    ]"
  >
    {{ label }}
  </span>
</template>

File Generation Conventions

ArtifactNamingLocation
Component SFCPascalCase.vuecomponents/{level}/
ComposableuseCamelCase.tscomposables/
Pinia storecamelCase.tsstores/
Type definitionscamelCase.tstypes/
Test filePascalCase.spec.ts__tests__/ or co-located

Codegen Checklist

  1. Read spec JSON and validate with Zod schema
  2. Determine atomic level and output directory
  3. Generate <script setup lang="ts"> with typed props, emits, and slots
  4. Map design tokens to Tailwind utility classes
  5. Generate template with semantic HTML and conditional classes
  6. Generate composable if spec declares state management needs
  7. Generate Pinia store if spec declares shared/global state
  8. Generate test file with Vitest and Vue Test Utils
  9. Update barrel export (index.ts) in the component directory
  10. Run eslint --fix and vue-tsc --noEmit on output

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Vue Gen AI skill do?

Vue 3 Composition API code generation — transforms Mémoire component specs into Vue SFCs with script setup, Tailwind styling, and composable patterns

Why use Vue Gen on TypingMind?

Because you install it once and use it with any model. Vue Gen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Vue Gen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/memi-design/design-skills/tree/main/skills/vue-gen. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Vue Gen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Vue Gen?

As many as you like. As long as a model supports skills, you can use Vue Gen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Vue Gen AI skill free?

Yes. It is published on GitHub by memi-design under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇