
Vue Expert JavaScript
FreeBuild Vue 3 components with JSDoc typing in JavaScript.
Free · Opens the source repo
What Vue Expert JavaScript does
The Vue Expert JavaScript skill is designed for developers focused on creating Vue 3 applications using JavaScript without TypeScript. This skill guides users through the process of structuring components and composables while ensuring full type coverage using JSDoc annotations. It emphasizes the use of the Composition API with <script setup>, allowing for cleaner and more maintainable code while adhering to modern JavaScript practices.
With this skill, developers can effectively plan their application architecture, implement components, and annotate their code with comprehensive JSDoc comments. The workflow includes verifying type coverage using ESLint with the JSDoc plugin, ensuring that all public APIs are well-documented. This is particularly beneficial for teams migrating from Vue 2's Options API to the Composition API, or for those who prefer to work with vanilla JavaScript.
The skill also includes references for various aspects of Vue development, such as state management with Pinia, testing with Vitest, and creating custom composables. These references provide detailed guidance on best practices and patterns, making it easier for developers to implement robust features in their applications. By utilizing this skill, developers can streamline their workflow and focus on building high-quality Vue applications without the overhead of TypeScript.
Overall, Vue Expert JavaScript is a valuable resource for developers looking to enhance their Vue 3 projects with JavaScript and JSDoc typing, providing a clear path to efficient and effective application development.
When to use it
Use this skill when developing Vue 3 applications exclusively in JavaScript and when JSDoc-based type hints are required.
When not to use it
This skill is not suitable for projects that require TypeScript or for developers who prefer TypeScript syntax and features.
What you can build with it
Migrating from Vue 2 to Vue 3
Use this skill to transition your existing Vue 2 applications to Vue 3, leveraging the Composition API and JSDoc.
Creating Quick Prototypes
When you need to build a prototype quickly without TypeScript setup, this skill helps streamline the process.
Implementing JSDoc in Vue Projects
If your team prefers JSDoc for type safety, this skill provides the necessary guidance to implement it effectively.
How to install Vue Expert JavaScript
View source1. Install with the skills CLI
npx skills add jeffallan/claude-skills/vue-expert-js --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by jeffallanVue Expert (JavaScript)
Senior Vue specialist building Vue 3 applications with JavaScript and JSDoc typing instead of TypeScript.
Core Workflow
- Design architecture — Plan component structure and composables with JSDoc type annotations
- Implement — Build with
<script setup>(nolang="ts"),.mjsmodules where needed - Annotate — Add comprehensive JSDoc comments (
@typedef,@param,@returns,@type) for full type coverage; then run ESLint with the JSDoc plugin (eslint-plugin-jsdoc) to verify coverage — fix any missing or malformed annotations before proceeding - Test — Verify with Vitest using JavaScript files; confirm JSDoc coverage on all public APIs; if tests fail, revisit the relevant composable or component, correct the logic or annotation, and re-run until the suite is green
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| JSDoc Typing | references/jsdoc-typing.md | JSDoc types, @typedef, @param, type hints |
| Composables | references/composables-patterns.md | custom composables, ref, reactive, lifecycle hooks |
| Components | references/component-architecture.md | props, emits, slots, provide/inject |
| State | references/state-management.md | Pinia, stores, reactive state |
| Testing | references/testing-patterns.md | Vitest, component testing, mocking |
For shared Vue concepts, defer to vue-expert:
../vue-expert/references/composition-api.md- Core reactivity patterns../vue-expert/references/components.md- Props, emits, slots../vue-expert/references/state-management.md- Pinia stores
Code Patterns
Component with JSDoc-typed props and emits
<script setup>
/**
* @typedef {Object} UserCardProps
* @property {string} name - Display name of the user
* @property {number} age - User's age
* @property {boolean} [isAdmin=false] - Whether the user has admin rights
*/
/** @type {UserCardProps} */
const props = defineProps({
name: { type: String, required: true },
age: { type: Number, required: true },
isAdmin: { type: Boolean, default: false },
})
/**
* @typedef {Object} UserCardEmits
* @property {(id: string) => void} select - Emitted when the card is selected
*/
const emit = defineEmits(['select'])
/** @param {string} id */
function handleSelect(id) {
emit('select', id)
}
</script>
<template>
<div @click="handleSelect(props.name)">
{{ props.name }} ({{ props.age }})
</div>
</template>
Composable with @typedef, @param, and @returns
// composables/useCounter.mjs
import { ref, computed } from 'vue'
/**
* @typedef {Object} CounterState
* @property {import('vue').Ref<number>} count - Reactive count value
* @property {import('vue').ComputedRef<boolean>} isPositive - True when count > 0
* @property {() => void} increment - Increases count by step
* @property {() => void} reset - Resets count to initial value
*/
/**
* Composable for a simple counter with configurable step.
* @param {number} [initial=0] - Starting value
* @param {number} [step=1] - Amount to increment per call
* @returns {CounterState}
*/
export function useCounter(initial = 0, step = 1) {
/** @type {import('vue').Ref<number>} */
const count = ref(initial)
const isPositive = computed(() => count.value > 0)
function increment() {
count.value += step
}
function reset() {
count.value = initial
}
return { count, isPositive, increment, reset }
}
@typedef for a complex object used across files
// types/user.mjs
/**
* @typedef {Object} User
* @property {string} id - UUID
* @property {string} name - Full display name
* @property {string} email - Contact email
* @property {'admin'|'viewer'} role - Access level
*/
// Import in other files with:
// /** @type {import('./types/user.mjs').User} */
Constraints
MUST DO
- Use Composition API with
<script setup> - Use JSDoc comments for type documentation
- Use
.mjsextension for ES modules when needed - Annotate every public function with
@paramand@returns - Use
@typedeffor complex object shapes shared across files - Use
@typeannotations for reactive variables - Follow vue-expert patterns adapted for JavaScript
MUST NOT DO
- Use TypeScript syntax (no
<script setup lang="ts">) - Use
.tsfile extensions - Skip JSDoc types for public APIs
- Use CommonJS
require()in Vue files - Ignore type safety entirely
- Mix TypeScript files with JavaScript in the same component
Output Templates
When implementing Vue features in JavaScript:
- Component file with
<script setup>(no lang attribute) and JSDoc-typed props/emits @typedefdefinitions for complex prop or state shapes- Composable with
@paramand@returnsannotations - Brief note on type coverage
Knowledge Reference
Vue 3 Composition API, JSDoc, ESM modules, Pinia, Vue Router 4, Vite, VueUse, Vitest, Vue Test Utils, JavaScript ES2022+
Frequently asked questions about Vue Expert JavaScript
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
