vue-composables
Vue 3 Composables Style Guide
Naming Conventions
Files
- Prefix with
useand use PascalCase:useCounter.ts,useApiRequest.ts - Place in
src/composables/directory
Functions
- Use descriptive names:
useUserData()notuseData() - Export as named function:
export function useCounter() {}
Structure Template
Follow this order consistently:
import { computed, onMounted, ref, watch } from 'vue'
More from alexanderop/workouttracker
product-planning
|
19vitest-mocking
|
15add-exercises
Add new exercises to the workout tracker database. Use when asked to add exercises, expand the exercise library, or check what exercises exist. Triggers include "add exercise", "new exercise", "exercise database", "what exercises", "missing exercises", "expand exercises".
12systematic-debugging
|
12repository-pattern
Create and manage Dexie/IndexedDB repositories with type-safe interfaces, converters, and standardized CRUD operations. Use when (1) adding entity storage, (2) implementing save/load/delete operations, (3) designing database schema and indexes, (4) converting between database (Db*) and domain types, (5) handling database errors or migrations, (6) using existing repositories (SettingsRepository, WorkoutsRepository, TemplatesRepository, CustomExercisesRepository, BenchmarksRepository, ActiveWorkoutRepository). Triggers include "database", "repository", "save data", "fetch from database", "delete from storage", "database schema", "database table", "indexes", "migration", "persist", "convert workout", "converter", "buildPartialUpdate", "mock repository", "database error", "bulk operations", "import/export", or specific repository names.
12improve-skill
Analyze coding agent session transcripts to improve existing skills or create new ones. Use when asked to improve a skill based on a session, or extract a new skill from session history.
11