vue-best-practices
Skill1 starsChanged 3 months agoMITView on GitHub
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
30 other projects use a version of this, 7 of them edited; 1 new project in the last 4 weeks, against 0 the 4 before.
Adopted by
Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- Contentrain/studioword for word, first seen Nov 8, 2026
- onmax/nuxt-skillsedited, first seen Nov 1, 2026
- vuejs-ai/skillsedited, first seen Oct 25, 2026
- lirantal/slides-toxicskills-agent-skills-malwareword for word, first seen Oct 25, 2026
- joker-ye/skillsword for word, first seen Oct 13, 2026
- rockcookies/skillsedited, first seen Oct 13, 2026
Used with
Projects with it also use nitro, using-superpowers and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillnitro
Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.
Also in 3 projects that use this
OpenAISkillusing-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
Also in 3 projects that use this
OpenAISkillfinishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
Also in 3 projects that use this
CloudflareSkillreceiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Also in 3 projects that use this
- +3 more from openai
Other versions30 projects use a version of this.
Word for word · 11
- moeru-ai/airi★ 51k100% same
- Contentrain/studio★ 4100% same
- DingGao1124/skills★ 2100% same
- huangzida/skills★ 2100% same
- ElyzeSolutions/skills★ 1100% same
- hangineer/Hannah-Claude-Code-Toolkit★ 1100% same
- joker-ye/skills★ 1100% same
- wumyuan/skills★ 1100% same
- filipefalcaofs/repo-padrao★ 0100% same
- lirantal/slides-toxicskills-agent-skills-malware★ 0100% same
1 more not listed
Edited · 7
- hyf0/vue-skills★ 3.2k54% same
- vuejs-ai/skills★ 3.1k54% same
- onmax/nuxt-skills★ 72454% same
- JetBrains/skills★ 38698% same
- konnga/skill-buddy★ 128100% same
- liangmiQwQ/skills★ 154% same
- rockcookies/skills★ 1100% same
Wrote their own version · 12
- oyjt/uniapp-vue3-template★ 628same name
- jasonjgardner/blockbench-mcp-plugin★ 595same name
- uni-helper/skills★ 107same name
- skills-club/skills-live★ 13same name
- FrontToEnd/agent-skills★ 9same name
- belos-street/skill-kit★ 8same name
- HK-hub/AgentSkills★ 6same name
- GPTtang/skill-atlas★ 4same name
- heamlk/Python-Skill★ 1same name
- kirklin/skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- brainstormSkill
- continual-learningSkill
- create-adaptable-composableSkill
- deep-researchSkill
- draw-mermaid-diagramsSkill
- electronSkill
- interpret-tech-notesSkill
- vue-debug-guidesSkill
- vue-jsx-best-practicesSkill
- vue-options-api-best-practicesSkill
- vue-pinia-best-practicesSkill
- vue-router-best-practicesSkill
- vue-testing-best-practicesSkill
- write-idea-docsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
32 rules. 12 are common, 7 are distinctive, and 13 are very specific to this project.
12
Common
Most of the 8 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 12
Use this skill as an instruction set.
- Common: line 18
Avoid unnecessary re-renders: use computed properties and watchers wisely.
- Common: line 19
Readability counts: write clear, self-documenting code.
- Very specific: line 23
Default stack: Vue 3 + Composition API + <script setup lang="ts">.
- Very specific: line 24
If the project explicitly uses Options API, load vue-options-api-best-practices skill if available.
- Very specific: line 25
If the project explicitly uses JSX, load vue-jsx-best-practices skill if available.
- Common: line 29
Before implementing any Vue task, make sure to read and apply these core references:
- Common: line 34
Keep these references in active working context for the entire task, not only when a specific issue appears.
- Distinctive: line 38
Create a brief component map before implementation for any non-trivial feature.
- Distinctive: line 41
Keep entry/root and route-level view components as composition surfaces by default.
- Very specific: line 44
Prefer a feature folder layout (components/<feature>/..., composables/use<Feature>.ts) when adding more than one component.
- Very specific: line 52
Must-read reference from 1.1: reactivity
- Very specific: line 53
Keep source state minimal (ref/reactive), derive everything possible with computed.
- Common: line 54
Use watchers for side effects if needed.
- Common: line 55
Avoid recomputing expensive logic in templates.
- Very specific: line 59
Must-read reference from 1.1: sfc
- Very specific: line 60
Keep SFC sections in this order: <script> → <template> → <style>.
- Distinctive: line 61
Keep SFC responsibilities focused.
- Common: line 62
Keep templates declarative.
- Distinctive: line 69
Prefer smaller components + composables over one “mega component”
- Distinctive: line 81
Keep entry/root and route view components thin: app shell/layout, provider wiring, and feature composition.
- Very specific: line 82
Do not place full feature implementations in entry/root/view components when those features contain independent parts.
- Very specific: line 92
Must-read reference from 1.1: component-data-flow
- Common: line 93
Use props down, events up as the primary model.
- Very specific: line 94
Use v-model only for true two-way component contracts.
- Distinctive: line 95
Use provide/inject only for deep-tree dependencies or shared context.
- Very specific: line 96
Keep contracts explicit and typed with defineProps, defineEmits, and InjectionKey as needed.
- Very specific: line 100
Must-read reference from 1.1: composables
- Distinctive: line 102
Keep composable APIs small, typed, and predictable.
- Common: line 109
Do not add these by default.
- Common: line 124
Use these only when there is explicit product or technical need.
- Common: line 144
All must-read references were read and applied.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Vue Best Practices Workflow
Use this skill as an instruction set. Follow the workflow in order unless the user explicitly asks for a different order.
Core Principles
- Keep state predictable: one source of truth, derive everything else.
- Make data flow explicit: Props down, Events up for most cases.
- Favor small, focused components: easier to test, reuse, and maintain.
- Avoid unnecessary re-renders: use computed properties and watchers wisely.
- Readability counts: write clear, self-documenting code.
1) Confirm architecture before coding (required)
- Default stack: Vue 3 + Composition API +
<script setup lang="ts">. - If the project explicitly uses Options API, load
vue-options-api-best-practicesskill if available. - If the project explicitly uses JSX, load
vue-jsx-best-practicesskill if available.
1.1 Must-read core references (required)
- Before implementing any Vue task, make sure to read and apply these core references:
references/reactivity.mdreferences/sfc.mdreferences/component-data-flow.mdreferences/composables.md
- Keep these references in active working context for the entire task, not only when a specific issue appears.
1.2 Plan component boundaries before coding (required)
Create a brief component map before implementation for any non-trivial feature.
- Define each component's single responsibility in one sentence.
- Keep entry/root and route-level view components as composition surfaces by default.
- Move feature UI and feature logic out of entry/root/view components unless the task is intentionally a tiny single-file demo.
- Define props/emits contracts for each child component in the map.
- Prefer a feature folder layout (
components/<feature>/...,composables/use<Feature>.ts) when adding more than one component.
2) Apply essential Vue foundations (required)
These are essential, must-know foundations. Apply all of them in every Vue task using the core references already loaded in section 1.1.
Reactivity
- Must-read reference from
1.1: reactivity - Keep source state minimal (
ref/reactive), derive everything possible withcomputed. - Use watchers for side effects if needed.
- Avoid recomputing expensive logic in templates.
SFC structure and template safety
- Must-read reference from
1.1: sfc - Keep SFC sections in this order:
<script>→<template>→<style>. - Keep SFC responsibilities focused; split large components.
- Keep templates declarative; move branching/derivation to script.
- Apply Vue template safety rules (
v-html, list rendering, conditional rendering choices).
Keep components focused
Split a component when it has more than one clear responsibility (e.g. data orchestration + UI, or multiple independent UI sections).
- Prefer smaller components + composables over one “mega component”
- Move UI sections into child components (props in, events out).
- Move state/side effects into composables (
useXxx()).
Apply objective split triggers. Split the component if any condition is true:
- It owns both orchestration/state and substantial presentational markup for multiple sections.
- It has 3+ distinct UI sections (for example: form, filters, list, footer/status).
- A template block is repeated or could become reusable (item rows, cards, list entries).
Entry/root and route view rule:
- Keep entry/root and route view components thin: app shell/layout, provider wiring, and feature composition.
- Do not place full feature implementations in entry/root/view components when those features contain independent parts.
- For CRUD/list features (todo, table, catalog, inbox), split at least into:
- feature container component
- input/form component
- list (and/or item) component
- footer/actions or filter/status component
- Allow a single-file implementation only for very small throwaway demos; if chosen, explicitly justify why splitting is unnecessary.
Component data flow
- Must-read reference from
1.1: component-data-flow - Use props down, events up as the primary model.
- Use
v-modelonly for true two-way component contracts. - Use provide/inject only for deep-tree dependencies or shared context.
- Keep contracts explicit and typed with
defineProps,defineEmits, andInjectionKeyas needed.
Composables
- Must-read reference from
1.1: composables - Extract logic into composables when it is reused, stateful, or side-effect heavy.
- Keep composable APIs small, typed, and predictable.
- Separate feature logic from presentational components.
3) Consider optional features only when requirements call for them
3.1 Standard optional features
Do not add these by default. Load the matching reference only when the requirement exists.
- Slots: parent needs to control child content/layout -> component-slots
- Fallthrough attributes: wrapper/base components must forward attrs/events safely -> component-fallthrough-attrs
- Built-in component
<KeepAlive>for stateful view caching -> component-keep-alive - Built-in component
<Teleport>for overlays/portals -> component-teleport - Built-in component
<Suspense>for async subtree fallback boundaries -> component-suspense - Animation-related features: pick the simplest approach that matches the required motion behavior.
- Built-in component
<Transition>for enter/leave effects -> transition - Built-in component
<TransitionGroup>for animated list mutations -> transition-group - Class-based animation for non-enter/leave effects -> animation-class-based-technique
- State-driven animation for user-input-driven animation -> animation-state-driven-technique
- Built-in component
3.2 Less-common optional features
Use these only when there is explicit product or technical need.
- Directives: behavior is DOM-specific and not a good composable/component fit -> directives
- Async components: heavy/rarely-used UI should be lazy loaded -> component-async
- Render functions only when templates cannot express the requirement -> render-functions
- Plugins when behavior must be installed app-wide -> plugins
- State management patterns: app-wide shared state crosses feature boundaries -> state-management
4) Run performance optimization after behavior is correct
Performance work is a post-functionality pass. Do not optimize before core behavior is implemented and verified.
- Large list rendering bottlenecks -> perf-virtualize-large-lists
- Static subtrees re-rendering unnecessarily -> perf-v-once-v-memo-directives
- Over-abstraction in hot list paths -> perf-avoid-component-abstraction-in-lists
- Expensive updates triggered too often -> updated-hook-performance
5) Final self-check before finishing
- Core behavior works and matches requirements.
- All must-read references were read and applied.
- Reactivity model is minimal and predictable.
- SFC structure and template rules are followed.
- Components are focused and well-factored, splitting when needed.
- Entry/root and route view components remain composition surfaces unless there is an explicit small-demo exception.
- Component split decisions are explicit and defensible (responsibility boundaries are clear).
- Data flow contracts are explicit and typed.
- Composables are used where reuse/complexity justifies them.
- Moved state/side effects into composables if applicable
- Optional features are used only when requirements demand them.
- Performance changes were applied only after functionality was complete.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

