vue-nuxt-vuetify-conventions
Step 6 of the pipeline (WORKFLOW.md). Frames the writing of frontend code on the Vue 3 + Nuxt stack with a
component library. Every rule below holds in a repo with nothing installed — that's the point of the
block (CONVENTIONS.md, rule A).
Relation to an org skill catalogue. Where a company ships its own versioned catalogue for this stack, it
is the authority on its house style — its package list, its named internal libraries, its file
layout — and it overrides this block on any point where the two differ. This block is the generic default,
not a competitor: it states the rule and the reason, so an agent can apply it on a project that has no
catalogue at all, and can recognise a house override as an override rather than as a contradiction.
An applied override is recorded, not hidden. Write the code the governing rule actually requires, and
leave one short neutral trace addressed to whoever can decide (a line in the PR description, the task summary
or an ADR): which rule was overridden, by what, and that it is a resolved case. Never phrase it as "a conflict
between mentis and the house rules" to a non-technical stakeholder — that framing reads as broken even when
the case is a normal, resolved one, and has already caused a real project to get abandoned and restarted over
nothing. Raise one specific, named question to the decider only when no rule anywhere actually resolves the
case.
On a Laravel + Inertia.js app, there is no Nuxt runtime (no Nuxt routing/auto-imports/useFetch/SSR
server) — a Vue page there is a plain SFC wired by Inertia, not a Nuxt page. This block's Nuxt-specific
sections don't have an equivalent in that architecture; see skills/inertia-conventions §4 before
flagging an Inertia repo against them.
When
As soon as a .vue component, a Nuxt page, a composable, a store or a server route is written or modified,
during code (6) or tdd (5).
Steps
Read only the sections the task actually touches. The rules live one file per section under
references/; loading all of them for a change that only renames a variable is waste, and a section
read is a section that has to be applied. If you are reviewing a whole diff, pick the rows whose
trigger the diff meets, not the whole table.
| § |
Covers |
Read it when |
File |
| 1 |
The shape of a component |
a .vue file is created or restructured |
01-shape-component.md |
| 2 |
Composables and stores |
logic moves out of a component, or a store is touched |
02-composables-stores.md |
| 3 |
Typing |
props, emits, refs or a store return type are written |
03-typing.md |
| 4 |
Naming and style |
a symbol, a file or a CSS class has to be named |
04-naming-style.md |
| 5 |
Structure and dependencies |
a file is placed, or an import crosses a layer |
05-structure-dependencies.md |
| 6 |
i18n |
any string the user will read |
06-i18n.md |
| 7 |
Accessibility in templates |
the template renders a control, a form or an image |
07-accessibility-templates.md |
| 8 |
The component library, with a Vuetify version matrix (rules 21 to 28) |
a UI element is built, custom CSS is about to be written, or the toolkit's major version, upgrade or Nuxt wiring is in question |
08-component-library.md |
| 9 |
Nuxt: hydration safety and the choice of data primitive |
SSR, useFetch/useAsyncData (including gating a fetch with enabled), or a value that only exists client-side |
09-nuxt-hydration-safety.md |
| 10 |
Realtime events |
a socket, a broadcast or a live update |
10-realtime-events.md |
| 11 |
Reactivity and security correctness (linter-derived) |
reviewing a diff, or chasing a reactivity bug |
11-reactivity-security-correctness.md |
| 12 |
Recurring review patterns (quality debt observed in the field) |
reviewing a diff, for the debt that keeps coming back |
12-recurring-review-patterns.md |
| 13 |
The data-access client |
the front end calls the backend through a typed client or model layer |
13-data-access-client.md |
| 14 |
Testing |
a component, a composable, a store, a route or a server handler gets a test |
14-testing.md |
| 15 |
Injection, query keys, routing and head |
a value is provided and injected, a query is keyed, a guard or middleware is written, a page's title and meta are set |
15-injection-query-keys-routing-head.md |
| 16 |
The template and bundle injection surface |
a template binds a URL, a style, a dynamic component or raw HTML, a variable is exposed to the browser, or a server route calls out |
16-template-injection-surface.md |
| 17 |
Template refs, attribute fallthrough, watchers, built-ins, store traps |
a template ref is read, attributes are forwarded through a wrapper, a watcher is written, <Transition>/<KeepAlive> is used, or a store is called outside a component |
17-reactivity-refs-builtins.md |
Output / checkpoint
Code compliant with the sections above. No dedicated checkpoint: compliance is checked by gate (7) and
review (8), like the rest of the code produced at the code/tdd step.
Guardrails
No comments in the code produced. Don't reinvent a component the UI toolkit already provides. Don't duplicate
an existing composable before checking that no nearby one covers the need. Where the project ships a typed
client for its API, don't open a second path to a resource that already has a model. technical/ never imports
functional/. Where an org catalogue is installed and disagrees with a rule here, it wins — apply it and leave the short neutral trace described at the top, never a silent override. When in doubt about a rule covered by neither, escalate
rather than guess.
Origin
Rules mined from market catalogues, linters and internal review feedback, rewritten in the house
voice; the full provenance, the source stamps and the refresh log are in
references/origin.md. Read it when checking whether a rule is still
current, not when applying one.
1---2name: vue-nuxt-vuetify-conventions3description: "Use when writing or reviewing Vue 3/Nuxt: the SFC shape, composables and stores, typing, naming, structure, i18n, accessibility in templates, the UI-toolkit-first rule, hydration safety, realtime, the data-access client, linter-derived correctness, tests, injection and query keys, the template injection surface."4metadata:5 source: https://skillmd.com/skills/techmefr/vue-nuxt-vuetify-conventions6---78# vue-nuxt-vuetify-conventions910Step 6 of the pipeline (`WORKFLOW.md`). Frames the writing of frontend code on the Vue 3 + Nuxt stack with a11component library. Every rule below holds in a repo with **nothing installed** — that's the point of the12block (`CONVENTIONS.md`, rule A).1314**Relation to an org skill catalogue.** Where a company ships its own versioned catalogue for this stack, it15is the authority on **its** house style — its package list, its named internal libraries, its file16layout — and it overrides this block on any point where the two differ. This block is the generic default,17not a competitor: it states the rule and the reason, so an agent can apply it on a project that has no18catalogue at all, and can recognise a house override as an override rather than as a contradiction.1920**An applied override is recorded, not hidden.** Write the code the governing rule actually requires, and21leave one short neutral trace addressed to whoever can decide (a line in the PR description, the task summary22or an ADR): which rule was overridden, by what, and that it is a resolved case. Never phrase it as "a conflict23between mentis and the house rules" to a non-technical stakeholder — that framing reads as broken even when24the case is a normal, resolved one, and has already caused a real project to get abandoned and restarted over25nothing. Raise one specific, named question to the decider only when no rule anywhere actually resolves the26case.2728**On a Laravel + Inertia.js app, there is no Nuxt runtime** (no Nuxt routing/auto-imports/`useFetch`/SSR29server) — a Vue page there is a plain SFC wired by Inertia, not a Nuxt page. This block's Nuxt-specific30sections don't have an equivalent in that architecture; see `skills/inertia-conventions` §4 before31flagging an Inertia repo against them.3233## When34As soon as a `.vue` component, a Nuxt page, a composable, a store or a server route is written or modified,35during `code` (6) or `tdd` (5).3637## Steps3839**Read only the sections the task actually touches.** The rules live one file per section under40`references/`; loading all of them for a change that only renames a variable is waste, and a section41read is a section that has to be applied. If you are reviewing a whole diff, pick the rows whose42trigger the diff meets, not the whole table.4344| § | Covers | Read it when | File |45|---|---|---|---|46| 1 | The shape of a component | a `.vue` file is created or restructured | [`01-shape-component.md`](./references/01-shape-component.md) |47| 2 | Composables and stores | logic moves out of a component, or a store is touched | [`02-composables-stores.md`](./references/02-composables-stores.md) |48| 3 | Typing | props, emits, refs or a store return type are written | [`03-typing.md`](./references/03-typing.md) |49| 4 | Naming and style | a symbol, a file or a CSS class has to be named | [`04-naming-style.md`](./references/04-naming-style.md) |50| 5 | Structure and dependencies | a file is placed, or an import crosses a layer | [`05-structure-dependencies.md`](./references/05-structure-dependencies.md) |51| 6 | i18n | any string the user will read | [`06-i18n.md`](./references/06-i18n.md) |52| 7 | Accessibility in templates | the template renders a control, a form or an image | [`07-accessibility-templates.md`](./references/07-accessibility-templates.md) |53| 8 | The component library, with a Vuetify version matrix (rules 21 to 28) | a UI element is built, custom CSS is about to be written, or the toolkit's major version, upgrade or Nuxt wiring is in question | [`08-component-library.md`](./references/08-component-library.md) |54| 9 | Nuxt: hydration safety and the choice of data primitive | SSR, `useFetch`/`useAsyncData` (including gating a fetch with `enabled`), or a value that only exists client-side | [`09-nuxt-hydration-safety.md`](./references/09-nuxt-hydration-safety.md) |55| 10 | Realtime events | a socket, a broadcast or a live update | [`10-realtime-events.md`](./references/10-realtime-events.md) |56| 11 | Reactivity and security correctness (linter-derived) | reviewing a diff, or chasing a reactivity bug | [`11-reactivity-security-correctness.md`](./references/11-reactivity-security-correctness.md) |57| 12 | Recurring review patterns (quality debt observed in the field) | reviewing a diff, for the debt that keeps coming back | [`12-recurring-review-patterns.md`](./references/12-recurring-review-patterns.md) |58| 13 | The data-access client | the front end calls the backend through a typed client or model layer | [`13-data-access-client.md`](./references/13-data-access-client.md) |59| 14 | Testing | a component, a composable, a store, a route or a server handler gets a test | [`14-testing.md`](./references/14-testing.md) |60| 15 | Injection, query keys, routing and head | a value is provided and injected, a query is keyed, a guard or middleware is written, a page's title and meta are set | [`15-injection-query-keys-routing-head.md`](./references/15-injection-query-keys-routing-head.md) |61| 16 | The template and bundle injection surface | a template binds a URL, a style, a dynamic component or raw HTML, a variable is exposed to the browser, or a server route calls out | [`16-template-injection-surface.md`](./references/16-template-injection-surface.md) |62| 17 | Template refs, attribute fallthrough, watchers, built-ins, store traps | a template ref is read, attributes are forwarded through a wrapper, a watcher is written, `<Transition>`/`<KeepAlive>` is used, or a store is called outside a component | [`17-reactivity-refs-builtins.md`](./references/17-reactivity-refs-builtins.md) |6364## Output / checkpoint65Code compliant with the sections above. No dedicated checkpoint: compliance is checked by `gate` (7) and66`review` (8), like the rest of the code produced at the `code`/`tdd` step.6768## Guardrails69No comments in the code produced. Don't reinvent a component the UI toolkit already provides. Don't duplicate70an existing composable before checking that no nearby one covers the need. Where the project ships a typed71client for its API, don't open a second path to a resource that already has a model. `technical/` never imports72`functional/`. Where an org catalogue is installed and disagrees with a rule here, **it wins** — apply it and leave the short neutral trace described at the top, never a silent override. When in doubt about a rule covered by neither, escalate73rather than guess.7475## Origin76Rules mined from market catalogues, linters and internal review feedback, rewritten in the house77voice; the full provenance, the source stamps and the refresh log are in78[`references/origin.md`](./references/origin.md). Read it when checking whether a rule is still79current, not when applying one.