Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mas-frontend-standards

БесплатноБез исполняемых скриптовНе проверен

Use when working on AUTO-MAS frontend Vue, TypeScript, Vite, Electron renderer, routing, API composables, state, styles, forms, validation, or frontend…

AUTO-MAS-Projectот AUTO-MAS-Project★ 821 звезда на GitHub

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

MAS Frontend Standards

Objective

Keep AUTO-MAS frontend changes aligned with the current Vue 3, TypeScript, Vite, Electron, Ant Design Vue, Vue Router, OpenAPI, ESLint, Prettier, and Yarn 4 project conventions.

Dependency Installation

  1. Run frontend dependency commands from the frontend/ directory.
  2. Use yarn install by default.
  3. If the Electron binary download is slow or fails, use the one-shot mirror command: yarn cross-env ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" yarn install.

Authority

This skill is self-contained for frontend engineering rules. If local code differs from this summary, inspect neighboring implementations and prefer the current module pattern unless it violates a red line here.

Mandatory Intake

Before editing frontend code:

  1. Confirm branch, remote, and working tree status.
  2. Inspect the target page, adjacent pages, related components, composables, API wrappers, router entries, and styles.
  3. Classify the task as new page, fix, refactor, style/UI adjustment, API integration, route change, or documentation-only.
  4. Select mas-frontend-ui as a required companion for any UI, layout, component, form, table, modal, feedback, or visual-state change.
  5. Keep changes limited to files directly required by the task.

Directory And Ownership

Code type Place it here Do not place it here
Route page src/views/<module>/index.vue or src/views/Xxx.vue src/components
Single-module component src/views/<module>/components src/components root
Cross-module component src/components Copied across page folders
Business API wrapper src/composables/useXxxApi.ts Vue page or src/api
Reusable page flow src/views/<module>/useXxxLogic.ts or composable Template expressions
Pure utility src/utils Copied inside components
Domain type src/types or generated src/api/models Repeated local component types
Shared reactive application state src/stores with Pinia Page-level localStorage access
Global style token src/style.css or future src/styles Repeated page-local variables
Global browser UI style such as scrollbars src/styles, imported once by the renderer entry Repeated component-level browser pseudo-elements
Electron capability electron and preload types Direct renderer Node access

Use the narrowest module boundary first. Promote to shared directories only after real cross-module reuse.

Vue Component Rules

  1. Use <script setup lang="ts"> unless a compatibility reason exists.
  2. Order code as imports, types, props/emits, composables, state, computed, watchers, lifecycle, functions.
  3. Type props and emits explicitly.
  4. Keep computed values for derived state; keep watchers for side effects only.
  5. Split components that exceed 500 lines or contain multiple independent business regions.
  6. Extract repeated logic into composables or module logic files instead of growing templates.
  7. Do not introduce a new UI, state, request, or routing library for a small task.

API And Data Flow

  1. Never hand-edit generated files under src/api.
  2. Do not write business axios or fetch calls directly in Vue pages.
  3. Use generated src/api types and services through src/composables/useXxxApi.ts or module logic.
  4. Treat response.code !== 200 as failure unless the local contract proves otherwise.
  5. API composables should expose loading, error, and business functions.
  6. Pages own business flow such as navigation, closing dialogs, and local state updates.
  7. Static-resource checks such as audio HEAD requests are not precedent for backend business API calls.
  8. Backend schema changes require regenerating frontend API clients; do not manually patch OpenAPI output.
  9. Do not hand-roll axios + OpenAPI.BASE URLs in composables either. If the endpoint is in the generated Service, call it; if it is missing, regenerate the client rather than bypass it.
  10. Generated services throw ApiError on non-2xx responses. Read the backend's message from error.body after narrowing it (instanceof ApiError, object check, typeof message === 'string'), then rethrow as Error. Wanting AxiosError.response.data is not a reason to skip the generated client. useMaaFWUpdateApi.ts and useHSRPluginApi.ts are the reference.
  11. Pass generated enums (e.g. MaaFWProjectUpdateIn.action.CHECK) instead of string literals cast to the request type.

Routing, State, Config

  1. Route paths use lowercase kebab-case; route names use PascalCase.
  2. Route components are lazy-loaded and business routes include meta.title.
  3. Prefer navigateTo or navigateToByName; avoid scattered hardcoded paths.
  4. Prefer Pinia for reactive application data shared across components or pages, coordinated state with multiple readers or writers, and state that should survive component unmounts or route changes during the current session.
  5. Do not stor
Полный SKILL.md на GitHub

Установить mas-frontend-standards в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл mas-frontend-standards?

Use when working on AUTO-MAS frontend Vue, TypeScript, Vite, Electron renderer, routing, API composables, state, styles, forms, validation, or frontend verification tasks.

Как установить скилл mas-frontend-standards?

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

Скилл mas-frontend-standards запускает скрипты?

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

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

Сравнить mas-frontend-standards с