nuxtjs-vue-typescript — скилл для Claude Code: установка и правила
Набор правил для разработки приложений на Nuxt 3 и Vue 3 с TypeScript и Tailwind CSS. Задаёт архитектуру компонентов, типизацию и шаблоны выборки данных.
npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a claude-codeЧто делает nuxtjs-vue-typescript
Скилл инструктирует ИИ использовать Vue 3 Composition API исключительно с синтаксисом <script setup>, запрещая Options API. В кодовой базе закрепляется структура каталогов Nuxt 3: pages/, composables/ и server/api/ на базе Nitro с вызовами useRuntimeConfig(). Для загрузки данных применяются useFetch и useAsyncData.
В типизации скилл требует заменять перечисления (enums) на константные объекты. Обычные псевдонимы типов объявляются через type, а interface допускается только для расширяемых контрактов вроде пропсов компонентов. Интерфейс строится на базе Shadcn Vue и Radix Vue, а логику предписано выносить в composables, как только шаблон перестаёт быть простой связкой элементов.
Тяжёлые компоненты скилл предписывает подключать через динамический import(), чтобы контролировать размер бандла в nuxi analyze.
Какие задачи решает
- Настроить структуру проекта Nuxt 3 и серверные маршруты Nitro
- Типизировать компоненты и пропсы без enum через const-объекты
- Вынести разросшуюся логику интерфейса в отдельные composables
- Организовать работу с данными через useFetch и useAsyncData
Примеры запросов агенту
- Создай серверный роут в
server/api/с получением параметров черезuseRuntimeConfig() - Напиши компонент формы на
<script setup>с валидацией типов и стилями Tailwind CSS - Вынеси состояние авторизации из компонента в отдельный composable
useAuthState.ts
Как установить nuxtjs-vue-typescript
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a claude-code2Вручную: положить файлы
~/.claude/skills/nuxtjs-vue-typescript/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/nuxtjs-vue-typescript/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a codex2Вручную: положить файлы
.agents/skills/nuxtjs-vue-typescript/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a cursor2Вручную: положить файлы
.cursor/skills/nuxtjs-vue-typescript/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills nuxtjs-vue-typescript2Вручную: положить файлы
.github/skills/nuxtjs-vue-typescript/SKILL.md1Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a gemini-cli2Командой платформы
gemini skills install https://github.com/Mindrally/skills --path nuxtjs-vue-typescriptВручную: положить файлы
.devin/skills/nuxtjs-vue-typescript/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о nuxtjs-vue-typescript
Как установить nuxtjs-vue-typescript в Claude Code?
Выполните команду npx skills add Mindrally/skills --skill nuxtjs-vue-typescript -a claude-code. Файл настроек сохранится по пути ~/.claude/skills/nuxtjs-vue-typescript/SKILL.md.
Что делает скилл nuxtjs-vue-typescript?
Он задаёт стандарты кода для Nuxt 3 и Vue 3, ориентируя модель на Composition API, библиотеки VueUse и Pinia, а также стили Tailwind CSS.
Какие соглашения по TypeScript задаёт этот скилл?
Скилл запрещает использование TypeScript enums в пользу объектов const. Типы объявляются через ключевое слово type, а interface остаётся для расширяемых контрактов.
Исходный текст
SKILL.md · Apache-2.0
--- name: nuxtjs-vue-typescript description: "Best practices for building Nuxt 3 and Vue 3 applications with TypeScript, the Composition API, and Tailwind CSS. Use when structuring Nuxt/Vue projects, writing composables, typing components and props, wiring up server routes and plugins, or optimizing Nuxt builds and Web Vitals." metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # NuxtJS Vue TypeScript Development Guidelines for building Nuxt 3 and Vue 3 applications with TypeScript, Shadcn Vue, Radix Vue, VueUse, and Tailwind. ## Code Style and Structure - Write concise, technical TypeScript with accurate examples - Employ composition API with declarative patterns; avoid options API - Favor iteration and modularity over code duplication - Use descriptive variable names with auxiliary verbs (isLoading, hasError) - Organize files: exported component, composables, helpers, static content, types - Keep component boundaries clear — a component should own one piece of UI/behavior; extract composables when logic grows beyond simple template glue ## Naming Conventions - Directories: lowercase with dashes (components/auth-wizard) - Components: PascalCase (AuthWizard.vue) - Composables: camelCase (useAuthState.ts) ## TypeScript Usage - Utilize TypeScript throughout; prefer types over interfaces, but use interfaces where you expect a shape to be extended or implemented (e.g. component prop contracts) - Keep shared types close to the feature that owns them; only promote a type to a shared `types/` directory once a second feature needs it - Avoid enums; use const objects instead - Leverage Vue 3 with TypeScript, defineComponent, and PropType ## Syntax and Formatting - Use arrow functions for methods and computed properties - Minimize curly braces in conditionals - Employ template syntax for declarative rendering ## UI and Styling - Implement Shadcn Vue, Radix Vue, and Tailwind - Design responsively with mobile-first Tailwind approach - Keep Tailwind usage accessible and consistent with the project's design system rather than one-off utility soup ## Performance - Leverage Nuxt's built-in optimizations - Use Suspense for async components - Implement lazy loading for routes and components - Optimize images: WebP format, size data, lazy loading - Review bundle size periodically (`nuxi analyze`) and use dynamic `import()` for heavy, rarely-used components ## Key Conventions - VueUse for common composables — reach for them where they simplify reactivity, but avoid ones that hide state transitions you need to reason about explicitly - Pinia for state management - Optimize Web Vitals (LCP, CLS, FID) - Use Nuxt's auto-imports feature ## Nuxt-Specific Guidelines - Follow Nuxt 3 directory structure (pages/, components/, composables/, layouts/, plugins/, server/) - Leverage auto-imports, file-based routing, server routes, plugins - Use layouts (`layouts/default.vue`, `<NuxtLayout>`) to share page chrome instead of duplicating it per page - Use `server/api/` routes (Nitro) for server-side endpoints, and `useRuntimeConfig()` for environment-specific config instead of hardcoding values - Use useFetch and useAsyncData for data fetching - Implement SEO with useHead and useSeoMeta ## Vue 3 Composition API Best Practices - Use `<script setup>` syntax - Leverage ref, reactive, and computed - Use provide/inject for dependency injection - Create custom composables for reusable logic
© Mindrally · Apache-2.0 · Mindrally/skills