vue-best-practices

hyf0/vue-skills · updated Apr 25, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/hyf0/vue-skills --skill vue-best-practices
0 commentsdiscussion
summary

Vue 3 development with Composition API, <script setup> , and TypeScript as the standard approach.

  • Enforces a structured workflow: confirm architecture, apply core foundations (reactivity, SFC structure, component focus, data flow, composables), then add optional features only when needed
  • Requires reading and applying four core references before implementation: reactivity, SFC structure, component data flow, and composables
  • Provides explicit component-splitting rules based on res
skill.md

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-practices skill if available.
  • If the project explicitly uses JSX, load vue-jsx-best-practices skill 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.md
    • references/sfc.md
    • references/component-data-flow.md
    • references/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 with computed.
  • 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-model only 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, and InjectionKey as 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.

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.

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.
how to use vue-best-practices

How to use vue-best-practices on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add vue-best-practices
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/hyf0/vue-skills --skill vue-best-practices

The skills CLI fetches vue-best-practices from GitHub repository hyf0/vue-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/vue-best-practices

Reload or restart Cursor to activate vue-best-practices. Access the skill through slash commands (e.g., /vue-best-practices) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.750 reviews
  • Harper Khanna· Dec 28, 2024

    I recommend vue-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Diya Jain· Dec 28, 2024

    vue-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ama Yang· Dec 24, 2024

    Keeps context tight: vue-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Michael Gill· Dec 16, 2024

    Registry listing for vue-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Chaitanya Patil· Dec 12, 2024

    Solid pick for teams standardizing on skills: vue-best-practices is focused, and the summary matches what you get after install.

  • Diya Lopez· Dec 8, 2024

    Useful defaults in vue-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Hassan Garcia· Nov 27, 2024

    vue-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Harper Patel· Nov 23, 2024

    vue-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Zaid Kapoor· Nov 19, 2024

    Keeps context tight: vue-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Kwame Farah· Nov 15, 2024

    I recommend vue-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 50

1 / 5