Structure Vue 3 applications using Composition API, component organization, and TypeScript. Use when building scalable Vue applications with proper separation of concerns.
Build well-organized Vue 3 applications using Composition API, proper file organization, and TypeScript for type safety and maintainability.
Minimal working example:
// useCounter.ts (Composable)
import { ref, computed } from 'vue';
export function useCounter(initialValue = 0) {
const count = ref(initialValue);
const doubled = computed(() => count.value * 2);
const increment = () => count.value++;
const decrement = () => count.value--;
const reset = () => count.value = initialValue;
return {
count,
doubled,
increment,
decrement,
reset
};
}
// Counter.vue
<template>
<div class="counter">
<p>Count: {{ count }}</p>
<p>Doubled: {{ doubled }}</p>
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Vue 3 Composition API Component | Vue 3 Composition API Component | | Async Data Fetching Composable | Async Data Fetching Composable | | Component Organization Structure | Component Organization Structure | | Form Handling Composable | Form Handling Composable | | Pinia Store (State Management) | Pinia Store (State Management) |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/vue-application-structure · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/vue-application-structure"
cp -r "skills/vue-application-structure" ".claude/skills/vue-application-structure"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.