Agent skill
vuetify
Esposter Vuetify 3 conventions — v-btn tooltips, typed SelectItemCategoryDefinition for selects/lists/menus, enum-value-as-display-title pattern, dialog form validity, and keyboard shortcut components. Apply when writing Vuetify components or dialogs.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/vuetify
SKILL.md
Vuetify Conventions
Button Conventions
- Every
v-btnmust have av-tooltip— wrap withv-tooltipand a descriptivetextprop. This applies to all buttons, including those with visible label text. - Standard pattern:
vue
<v-tooltip text="Descriptive action"> <template #activator="{ props: tooltipProps }"> <v-btn icon="mdi-some-icon" size="small" tile :="tooltipProps" @click="doSomething()" /> </template> </v-tooltip> #activatorslot always first — the#activatortemplate must be the first child inv-tooltip(andv-menu).- Icon choice for create actions — use the semantically specific MDI icon when available:
mdi-table-row-plus-afterfor adding rows,mdi-table-column-plus-afterfor adding columns. Fall back tomdi-plusfor generic create actions.
Vuetify Selects and List Items
- When building items for
v-autocomplete,v-select, orv-list-item(in av-menu/v-list), always type them asSelectItemCategoryDefinition<T>[]({ title: string, value: T }) from@/models/vuetify/SelectItemCategoryDefinition. Never inline untyped{ title, value }arrays — always extract to a typed constant. - Never specify
item-titleoritem-valueprops — Vuetify's defaults are already"title"and"value", which matchSelectItemCategoryDefinitionexactly. - Name the items constant to reflect what the value represents — e.g.
columnIdsforSelectItemCategoryDefinition<string>[]where eachvalueis a column ID. - Prefer enum values as display titles — when the enum string value IS the display label, use
Object.values(EnumType).map((v) => ({ title: v, value: v }))(ColumnTypeItemCategoryDefinitionspattern). When the display must differ from the enum value (rare), use aconst Map = { ... } as const satisfies Record<Enum, Except<SelectItemCategoryDefinition<Enum>, "value">>+parseDictionaryToArray(CsvDelimiterItemCategoryDefinitionspattern). Update enum string values to match their display label when reasonable, to keep enum key and value the same string.
Dialog Form Validity
Always name the form validity ref isEditFormValid. Bind it via v-model on <v-form> and use ref(true) for optimistic initial state. Disable Save & Close via :confirm-button-attrs="{ disabled: !isEditFormValid }" (combined with other conditions as needed). Never use try/catch in submit handlers — prevent invalid submission through form validation rules so state is always consistent. Use StyledEditFormDialogErrorIcon with :edit-form-ref :is-edit-form-valid (plus optional :schema :value for Zod schema validation) in the #prepend-actions slot. editFormRef is a required prop typed InstanceType<typeof VForm> | undefined (always passed; | undefined reflects the ref being uninitialized before mount). isEditFormValid is field-level only (from <v-form v-model>); schema errors are computed internally inside StyledEditFormDialogErrorIcon via watchDeep on value.
Keyboard Shortcut Components
When a button has an associated keyboard shortcut, extract it into its own component that owns both the v-btn and the onKeyStroke handler. This keeps each component focused on one action (e.g., UndoButton.vue, RedoButton.vue).
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?