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★ 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
- Run frontend dependency commands from the
frontend/directory. - Use
yarn installby default. - 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:
- Confirm branch, remote, and working tree status.
- Inspect the target page, adjacent pages, related components, composables, API wrappers, router entries, and styles.
- Classify the task as new page, fix, refactor, style/UI adjustment, API integration, route change, or documentation-only.
- Select
mas-frontend-uias a required companion for any UI, layout, component, form, table, modal, feedback, or visual-state change. - 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
- Use
<script setup lang="ts">unless a compatibility reason exists. - Order code as imports, types, props/emits, composables, state, computed, watchers, lifecycle, functions.
- Type props and emits explicitly.
- Keep computed values for derived state; keep watchers for side effects only.
- Split components that exceed 500 lines or contain multiple independent business regions.
- Extract repeated logic into composables or module logic files instead of growing templates.
- Do not introduce a new UI, state, request, or routing library for a small task.
API And Data Flow
- Never hand-edit generated files under
src/api. - Do not write business
axiosorfetchcalls directly in Vue pages. - Use generated
src/apitypes and services throughsrc/composables/useXxxApi.tsor module logic. - Treat
response.code !== 200as failure unless the local contract proves otherwise. - API composables should expose loading, error, and business functions.
- Pages own business flow such as navigation, closing dialogs, and local state updates.
- Static-resource checks such as audio
HEADrequests are not precedent for backend business API calls. - Backend schema changes require regenerating frontend API clients; do not manually patch OpenAPI output.
- Do not hand-roll
axios+OpenAPI.BASEURLs in composables either. If the endpoint is in the generatedService, call it; if it is missing, regenerate the client rather than bypass it. - Generated services throw
ApiErroron non-2xx responses. Read the backend's message fromerror.bodyafter narrowing it (instanceof ApiError, object check,typeof message === 'string'), then rethrow asError. WantingAxiosError.response.datais not a reason to skip the generated client.useMaaFWUpdateApi.tsanduseHSRPluginApi.tsare the reference. - Pass generated enums (e.g.
MaaFWProjectUpdateIn.action.CHECK) instead of string literals cast to the request type.
Routing, State, Config
- Route paths use lowercase kebab-case; route names use PascalCase.
- Route components are lazy-loaded and business routes include
meta.title. - Prefer
navigateToornavigateToByName; avoid scattered hardcoded paths. - 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.
- Do not stor
Установить 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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic