Command Palette

Search for a command to run...

Назад к скиллам
скилл № 68946

vue-nuxt

Vue 3 and Nuxt 3 for JARVIS AI Assistant UI development with security-first patterns

БесплатноБез исполняемых скриптов
martinholovskyот martinholovsky★ 48 звёзд на GitHub11 установок в других каталогах

Установить vue-nuxt в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Vue 3 / Nuxt 3 Development Skill

File Organization: This skill uses split structure. See references/ for advanced patterns and security examples.

1. Overview

This skill provides expertise for building the JARVIS AI Assistant user interface using Vue 3 and Nuxt 3. It focuses on creating responsive, performant 3D HUD interfaces with security-first development practices.

Risk Level: MEDIUM - Handles user input, renders dynamic content, potential XSS vectors

Primary Use Cases:

  • Building reactive 3D HUD components for JARVIS interface
  • Server-side rendering for initial load performance
  • Client-side state management integration
  • Secure handling of user inputs and API responses

2. Core Responsibilities

2.1 Fundamental Principles

  1. TDD First: Write tests before implementation - red/green/refactor cycle
  2. Performance Aware: Use computed, shallowRef, lazy components for optimal reactivity
  3. Composition API First: Use Vue 3 Composition API with <script setup> for better TypeScript inference and code organization
  4. Server-Side Security: Leverage Nuxt's server routes for sensitive operations, never expose secrets to client
  5. Reactive State Safety: Use ref() and reactive() with proper typing to prevent state corruption
  6. Input Sanitization: Always sanitize user inputs before rendering or processing
  7. Performance Optimization: Implement lazy loading, code splitting, and efficient reactivity for 3D HUD performance
  8. Type Safety: Enforce TypeScript throughout for compile-time error detection
  9. Secure Defaults: Configure CSP headers, disable dangerous features by default

3. Technology Stack & Versions

3.1 Recommended Versions

Package Version Security Notes
Vue ^3.4.0 Latest stable with improved reactivity
Nuxt ^3.12.4+ CRITICAL: Fixes CVE-2024-34344 RCE
@nuxt/devtools ^1.3.9+ CRITICAL: Fixes CVE-2024-23657
vite ^5.0.0 Latest with security patches

3.2 Security-Critical Dependencies

{
  "dependencies": {
    "nuxt": "^3.12.4",
    "vue": "^3.4.0",
    "dompurify": "^3.0.6",
    "isomorphic-dompurify": "^2.0.0"
  },
  "devDependencies": {
    "@nuxt/devtools": "^1.3.9",
    "eslint-plugin-vue": "^9.0.0",
    "eslint-plugin-security": "^2.0.0"
  }
}

4. Implementation Patterns

4.1 Secure Component Structure

<script setup lang="ts">
// ✅ Type-safe props with validation
interface Props {
  hudData: HUDDisplayData
  userId: string
}

const props = defineProps<Props>()

// ✅ Emit events with typed payloads
const emit = defineEmits<{
  'update:status': [status: string]
  'command:execute': [command: JARVISCommand]
}>()

// ✅ Secure ref initialization
const displayState = ref<HUDState>({
  isActive: false,
  securityLevel: 'standard'
})
</script>

<template>
  <!-- ✅ Use v-text for user content to prevent XSS -->
  <div class="hud-panel">
    <span v-text="props.hudData.title" />
  </div>
</template>

4.2 Input Sanitization Pattern

// composables/useSanitize.ts
import DOMPurify from 'isomorphic-dompurify'

export function useSanitize() {
  const sanitizeHTML = (dirty: string): string => {
    // ✅ Strict sanitization for any HTML content
    return DOMPurify.sanitize(dirty, {
      ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'span'],
      ALLOWED_ATTR: ['class']
    })
  }

  const sanitizeText = (input: string): string => {
    // ✅ Strip all HTML for plain text
    return DOMPurify.sanitize(input, { ALLOWED_TAGS: [] })
  }

  return { sanitizeHTML, sanitizeText }
}

4.3 Secure API Route Pattern

// server/api/jarvis/command.post.ts
import { z } from 'zod'

// ✅ Define strict schema for command validation
const commandSchema = z.object({
  action: z.enum(['status', 'control', 'query']),
  target: z.string().max(100).regex(/^[a-zA-Z0-9-_]+$/),
  parameters: z.record(z.string()).optional()
})

export default defineEventHandler(async (event) => {
  const body = await readBody(event)

  // ✅ Validate input against schema
  const result = commandSchema.safeParse(body)
  if (!result.success) {
    throw createError({
      statusCode: 400,
      message: 'Invalid command format'  // ✅ Generic error message
    })
  }

  // ✅ Process validated command
  const command = result.data

  // Never log sensitive data
  console.log(`Processing command: ${command.action}`)

  return { success: true, commandId: generateSecureId() }
})

4.4 Secure Environment Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  // ✅ Security headers
  routeRules: {
    '/**': {
      headers: {
        'Content-Security-Policy': "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'",
        'X-Content-Type-Options': 'nosniff',
        'X-Frame-Options': 'DENY',
        'X-XSS-Protection': '1; mode=block'
      }
    }
  },

  // ✅ Run
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/advanced-patterns.md
  • references/security-examples.md

FAQ

Что делает скилл vue-nuxt?

Vue 3 and Nuxt 3 for JARVIS AI Assistant UI development with security-first patterns

Как установить скилл vue-nuxt?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vue-nuxt запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить vue-nuxt с