소스 정보
- 저장소
- irahardianto/awesome-agv
- 최근 소스 활동
- 2026년 7월 30일 08:29
- 감지된 SKILL.md 언어
- 영어
- 스타
- 150
- 포크
- 48
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/irahardianto/awesome-agv --skill vue-idioms명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Structured logging implementation patterns: log levels, mandatory context fields (correlationId, userId, duration), security (PII scrubbing), and per-language library choices (Go slog, TypeScript pino, Python structlog). Load when implementing logging in any operation entry point. Prerequisite: logging-and-observability-mandate.md.
Python type hints, Protocols, Pydantic, async/await, pytest, ruff, mypy strict.
Go stdlib, error wrapping, interfaces, goroutines, table-driven tests, gofumpt.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | vue-idioms |
| description | Vue 3 Composition API, Pinia stores, composables, Vite, Vitest. |
| paths | ["**/*.vue","**/vite.config.*","**/vitest.config.*","**/store/**/*.ts","**/stores/**/*.ts","**/*.store.ts","**/pinia*.ts"] |
Vue 3 Composition API is the default for all new code. <script setup> is the canonical syntax. Think in terms of reactive data flows, not component lifecycle hooks. Composables (use* functions) are the primary unit of logic reuse.
Scope: This file covers Vue 3 coding idioms for components, stores, and composables. For TypeScript type system patterns, see
@.agents/skills/typescript-idioms/SKILL.md. For file and folder layout, seereferences/project-structure.md(and the shared@.agents/skills/frontend-design/references/frontend-layout.md). For test naming, see@.agents/rules/testing-strategy.md. For logging, see@.agents/skills/logging-implementation/SKILL.md.Loading guard: Do NOT load this skill for non-Vue projects. React →
react-idioms; Angular →angular-idioms; Next.js →nextjs-idioms. This skill co-loads withtypescript-idioms(required for any Vue work).
Always load
typescript-idiomsfirst — it is required alongside this skill for any Vue work. Load these before writing code in the matching context — not after.
| Situation | Reference to Load |
|---|---|
| TypeScript type system, async, Zod, error types | @.agents/skills/typescript-idioms/SKILL.md (always co-load) |
| Starting a new Vue project or reviewing file layout | references/project-structure.md |
| Choosing Vue ecosystem package versions, Vite/Vitest config | references/recommended-dependencies.md |
| Defining Zod schemas or validating boundaries | @.agents/skills/typescript-idioms/references/zod-patterns.md |
| Writing code that handles user input, async, or I/O | @.agents/skills/typescript-idioms/references/ts-patterns-and-anti-patterns.md |
Default to the latest Vue 3 stable. As of July 2026, Vue 3.5+ with Vite 6+.
Key version milestones that affect this skill:
useTemplateRef (type-safe template refs), improved useId, Suspense stabledefineModel (replaces verbose v-model boilerplate), improved watch genericsdefineOptions, defineSlots, generic components with <script setup><script setup> syntax finalizedFor recommended package versions and starter configs, see
references/recommended-dependencies.md.
<script setup> — The Only StyleAlways use <script setup lang="ts">. Never use the Options API or the class-style component pattern for new code.
<!-- ✅ Canonical style -->
<script setup lang="ts">
import { ref, computed } from 'vue';
const props = defineProps<{ title: string; count?: number }>();
const emit = defineEmits<{ 'update:count': [value: number] }>();
const doubled = computed(() => (props.count ?? 0) * 2);
</script>
<!-- ❌ Options API — do not use for new components -->
<script lang="ts">
export default { props: { title: String }, ... }
</script>
ref vs reactive| Use | When |
|---|---|
ref<T>() | Primitives, single values, values that may be reassigned |
reactive() | Plain objects where you always access properties (never reassign the whole object) |
readonly() | Expose state that must not be mutated outside its owner |
// ✅ ref for primitives and replaceable objects
const count = ref(0);
const user = ref<User | null>(null);
user.value = fetchedUser; // reassignment is fine
// ✅ reactive for objects where you destructure properties
const form = reactive({ title: '', priority: 'medium' });
// ❌ Never destructure a reactive object — reactivity is lost
const { title } = form; // title is now a plain string, NOT reactive
// ✅ Use toRefs if you must destructure
const { title } = toRefs(form);
Use computed for all derived state — never recompute in the template
// ✅ Cached, reactive
const filteredTasks = computed(() =>
tasks.value.filter(t => t.status === activeFilter.value)
);
// ❌ Recomputes on every render
// <template>{{ tasks.filter(t => t.status === filter) }}</template>
Never cause side effects inside computed — computed must be pure
// ❌ Side effect in computed
const count = computed(() => {
taskStore.logAccess(); // NO — this is a side effect
return tasks.value.length;
});
Use writable computed for two-way bindings
const modelValue = computed({
get: () => props.modelValue,
set: (val) => emit('update:modelValue', val),
});
Use the most precise watcher for the situation — over-watching is a performance and correctness problem.
| Watcher | Use When |
|---|---|
watchEffect | Side effect that should re-run whenever any of its reactive dependencies change; auto-tracks dependencies |
watch | You need the old value, lazy execution, or want to watch a specific source explicitly |
computed | You need a synchronous derived value (prefer this over watch for transformation) |
// ✅ watchEffect — auto-tracks dependencies
watchEffect(() => {
document.title = `Tasks (${count.value})`;
});
// ✅ watch — explicit source, has old value
watch(userId, async (newId, oldId) => {
if (newId !== oldId) await loadUser(newId);
}, { immediate: true });
// ❌ Avoid using watch just for computed values
watch(tasks, () => { filteredCount.value = tasks.value.filter(...).length; });
// ✅ Use computed instead
const filteredCount = computed(() => tasks.value.filter(...).length);
The store directory structure is defined in
references/project-structure.md. This section covers Pinia coding idioms.
Use the Setup Store API (not Options API) for new stores
// task/store/task.store.ts
export const useTaskStore = defineStore('task', () => {
// State
const tasks = ref<Task[]>([]);
const isLoading = ref(false);
// Getters (computed)
const completedTasks = computed(() =>
tasks.value.filter(t => t.status === 'done')
);
// Actions
async function loadTasks() {
isLoading.value = true;
try {
tasks.value = await taskAPI.getTasks();
} finally {
isLoading.value = false;
}
}
return { tasks, isLoading, completedTasks, loadTasks };
});
Never mutate store state from outside the store
// ❌ Direct mutation from a component
const store = useTaskStore();
store.tasks.push(newTask); // NO
// ✅ Call an action
store.(newTask);
use* Functions)Composables are the Vue equivalent of custom hooks — self-contained, reusable units of reactive logic.
Naming: always prefix with use
useTaskFilters, useAuth, usePaginationReturn reactive refs, not raw values
// ✅ Caller can use returned values reactively
function useCounter(initial = 0) {
const count = ref(initial);
const increment = () => count.value++;
return { count, increment };
}
// ❌ count is a plain number — not reactive
function useCounter() {
let count = 0;
return { count };
}
Always clean up side effects in onUnmounted
function useWindowResize() {
const width = ref(window.innerWidth);
const handler = () => (width.value = window.innerWidth);
onMounted(() => window.addEventListener('resize', handler));
onUnmounted(() => window.(, handler));
{ width };
}
defineProps with TypeScript generics — no runtime validators for typed props
const props = defineProps<{
taskId: string;
variant?: 'compact' | 'full';
}>();
// Defaults via withDefaults
const props = withDefaults(defineProps<{ variant?: 'compact' | 'full' }>(), {
variant: 'full',
});
defineEmits with typed event signatures
const emit = defineEmits<{
'update:modelValue': [value: string];
'submit': [task: CreateTaskRequest];
}>();
defineModel (Vue 3.4+) — preferred v-model pattern
<script setup lang="ts">
// ✅ Vue 3.4+ — one line replaces modelValue prop + emit boilerplate
const modelValue = defineModel<string>({ required: true });
// Named models for multi-v-model components
const title = defineModel<string>('title');
const priority = defineModel<'low' | 'medium' | 'high'>('priority', { default: 'medium' });
</script>
<!-- Usage by parent: <TaskForm v-model="name" v-model:priority="prio" /> -->
Pre-3.4 fallback (when defineModel is unavailable):
// ❌ Verbose — use defineModel instead on Vue 3.4+
const props = defineProps<{ modelValue: string }>();
const emit = defineEmits<{ 'update:modelValue': [value: string] }>();
to selectively expose methods to parent refs
Always bind :key with stable, unique IDs in v-for — never use index as key when list order can change
<!-- ✅ Stable key -->
<TaskCard v-for="task in tasks" :key="task.id" :task="task" />
<!-- ❌ Index key — causes rerender bugs when list reordered -->
<TaskCard v-for="(task, i) in tasks" :key="i" :task="task" />
Never combine v-if and v-for on the same element — wrap with <template>
<!-- ✅ -->
<template v-for="task in tasks" :key="task.id">
<TaskCard v-if="task.visible" :task="task" />
</template>
When using <Transition> or <RouterView> with transition effects, CSS frameworks that use @layer (Tailwind v4, Open Props, UnoCSS) can silently break SPA navigation by overriding transition properties in the cascade. This causes transitionend to never fire, permanently blocking the entering component.
Avoid mode="out-in" when using @layer-based CSS frameworks — the leaving component's transitionend event may never fire, blocking the entering component indefinitely. Use simultaneous transitions instead:
<!-- ❌ Dangerous with @layer CSS frameworks -->
<Transition name="fade" mode="out-in">
<component :is="Component" />
</Transition>
<!-- ✅ Safe: simultaneous leave/enter, always mounts new component -->
<Transition name="fade">
<component :is="Component" :key="$route.path" />
</Transition>
Always bind :key="$route.path" on dynamic <component> inside <Transition> — forces Vue to treat each route as a distinct component instance, ensuring proper enter/leave lifecycle
Use !important on route transition CSS classes — guarantees transition properties win the @layer cascade:
.fade-enter-active {
transition: opacity 0.15s ease-in !important;
}
.fade-leave-active {
transition: opacity 0.15s ease-out !important;
position: absolute !important;
width: ;
: ;
: ;
}
,
{
: ;
}
For full diagnosis steps when a transition-stuck blank screen occurs, see the Debugging Protocol's Frontend module:
@.agents/skills/debugging-protocol/languages/frontend.md§ CSS × Animation.
For error type hierarchies, custom error classes, and
Result<T, E>, see@.agents/skills/typescript-idioms/SKILL.md§Error Handling. This section covers Vue-specific error handling only.
Global error handler — register at app startup:
// main.ts — catches all unhandled errors in any component
app.config.errorHandler = (err, instance, info) => {
logger.error('Unhandled Vue error', {
error: err instanceof Error ? err.message : String(err),
componentInfo: info,
stack: err instanceof Error ? err.stack : undefined,
});
};
Component-level error capture with onErrorCaptured:
// ✅ Catches errors from child component tree — use for error boundary components
const error = ref<Error | null>(null);
onErrorCaptured((err) => {
error.value = err instanceof Error ? err : new Error(String(err));
return false; // stop propagation to parent
});
Async errors in lifecycle hooks — always handle:
// ❌ Floating promise — error silently lost
onMounted(() => { loadTasks(); });
// ✅ Catch and surface to reactive error state
( () => {
{
();
} (err) {
error. = err ? err : ((err));
}
});
For Zod schema patterns, see
@.agents/skills/typescript-idioms/references/zod-patterns.md. This section covers Vue-specific form binding only.
defineModel for simple forms (Vue 3.4+) — see Component Design §3 above.
VeeValidate + Zod for validated forms:
<script setup lang="ts">
import { useForm, useField } from 'vee-validate';
import { toTypedSchema } from '@vee-validate/zod';
import { z } from 'zod';
const schema = toTypedSchema(z.object({
title: z.string().min(1, 'Title is required').max(200),
priority: z.enum(['low', 'medium', 'high']),
}));
const { handleSubmit, errors } = useForm({ validationSchema: schema });
const { value: title } = useField<string>('title');
const { value: priority } = useField<string>('priority');
const onSubmit = handleSubmit(async (values) => {
await taskStore.createTask(values);
});
</script>
<template>
<form @submit="onSubmit">
<input v-model="title" />
<span v-if="errors.title">{{ errors.title }}</span>
<select v-model="priority">
<option value="low">Low</option>
<option value="medium">Medium</option>
<option value="high">High</option>
</select>
<button type="submit">Create</button>
</form>
</template>
Client-side validation is UX, not security — always validate at the API boundary too. See @.agents/rules/security-principles.md.
Profile before optimizing — see
@.agents/skills/perf-optimization/SKILL.mdfor methodology. This section covers Vue-specific patterns only.
defineAsyncComponent for lazy loading heavy components:
import { defineAsyncComponent } from 'vue';
const HeavyChart = defineAsyncComponent(() => import('./HeavyChart.vue'));
Lazy route loading with Vue Router:
const routes = [
{ path: '/tasks', component: () => import('../views/TaskView.vue') },
{ path: '/settings', component: () => import('../views/SettingsView.vue') },
];
<KeepAlive> for caching expensive component state:
<!-- Caches up to 10 component instances — avoids teardown/remount cost -->
<KeepAlive :max="10">
<component :is="currentTab" />
</KeepAlive>
v-memo for expensive list rendering (Vue 3.2+):
<!-- Re-renders item only when its id or selected state changes -->
<div v-for="item in list" :key="item.id" =>
For test naming, pyramid ratios, and the AAA pattern, see
@.agents/rules/testing-strategy.md. This section covers Vue-specific tooling only.
Mount wrapper with @vue/test-utils + createTestingPinia:
import { mount } from '@vue/test-utils';
import { createTestingPinia } from '@pinia/testing';
import { vi } from 'vitest';
function mountComponent(overrides: Record<string, unknown> = {}) {
return mount(TaskView, {
global: {
plugins: [createTestingPinia({ createSpy: vi.fn })],
stubs: { RouterLink: true },
},
...overrides,
});
}
Component interaction — test behaviour, not implementation:
test('calls createTask when form submitted', async () => {
const wrapper = mountComponent();
const store = useTaskStore();
await wrapper.find('[data-testid="title-input"]').setValue('New Task');
await wrapper.find('form').trigger('submit');
(store.).(
expect.({ : }),
);
});
Critical: Use
vue-tsc --noEmitinstead oftsc --noEmitfor Vue projects.tsccannot type-check.vue<template>blocks — template errors will be invisible.
| Phase | Command | Purpose |
|---|---|---|
| TDD / rapid iteration | vue-tsc --noEmit | Type-check templates + scripts — fastest loop |
| Pre-commit | eslint . | Static analysis (eslint-plugin-vue required) — zero warnings |
| Pre-commit | prettier --write . | Format — non-negotiable |
| Pre-commit | vitest run | Unit tests — must all pass |
| Coverage verification | vitest run --coverage | Verify before merging |
Rules:
tsc --noEmit on Vue projects — it skips all .vue template checking.eslint-plugin-vue must be configured with plugin:vue/vue3-recommended or stricter.prettier must handle .vue files (it does by default).Quick reference — if you're about to do any of these, stop and use the recommended pattern.
<script setup lang="ts">toRefs() or storeToRefs()computed — computed must be pure; use watch or watchEffectv-if + v-for on the same element — wrap with <template>:key="index" on dynamic lists — use stable unique IDs<template> — move to computed or composablestsc --noEmit on Vue projects — use vue-tsc --noEmit (template checking)ref(null) for template refs in Vue 3.5+ — use useTemplateRef() insteadmodelValue + emit in Vue 3.4+ — use defineModel() insteadinject() for testabilitywatch for derived state — use computed instead (it's cached and more efficient)Inject the API dependency — never import it directly inside the store
// ✅ Receives the API interface — testable with createTestingPinia + mock API
export const useTaskStore = defineStore('task', () => {
const api = inject<TaskAPI>(TASK_API_KEY);
if (!api) throw new Error('[TaskStore] TASK_API_KEY not provided — ensure app.provide() is called before store access');
// ...
});
Use storeToRefs when destructuring a store in components
// ✅ Preserves reactivity
const { tasks, isLoading } = storeToRefs(useTaskStore());
const { loadTasks } = useTaskStore(); // actions don't need storeToRefs
Template refs with useTemplateRef (Vue 3.5+) — type-safe, IDE-friendly replacement for ref(null)
// ✅ Vue 3.5+ — useTemplateRef provides fully typed access
const inputEl = useTemplateRef<HTMLInputElement>('myInput');
// <input ref="myInput" />
// ❌ Old pattern (before 3.5) — less type-safe
const inputEl = ref<HTMLInputElement | null>(null);
Feature-specific composables live inside the feature directory — global composables go in src/composables/. See references/project-structure.md.
defineExpose// Everything in <script setup> is private by default.
// Use defineExpose only for intentional parent access (e.g., form.reset()).
defineExpose({ reset, focus });
// ❌ Without defineExpose: parent ref.value.reset() will be undefined
v-bind="$attrs" and inheritAttrs: false for forwarding attributes
// Avoid prop drilling for HTML attributes — forward them to the root element
defineOptions({ inheritAttrs: false });
// In template: <input v-bind="$attrs" />
One concern per component — if the template exceeds 100 lines (excluding boilerplate), extract a sub-component
Never put business logic in the template — computed and composables belong in <script setup>
Give the transition parent position: relative — contains the absolutely-positioned leaving element during the simultaneous transition overlap
v-once for static content that never changes:
<footer v-once>© 2026 Acme Corp</footer>
Test composables in isolation:
import { createApp } from 'vue';
/** Runs a composable inside a throwaway component context. */
function withSetup<T>(composable: () => T): [T, ReturnType<typeof createApp>] {
let result!: T;
const app = createApp({
setup() { result = composable(); return () => {}; },
});
app.mount(document.createElement('div'));
return [result, app];
}
test('useCounter increments', () => {
const [{ count, increment }] = withSetup(() => useCounter(0));
expect(count.value).toBe(0);
increment();
expect(count.value).toBe(1);
});
Test Pinia stores independently:
import { setActivePinia, createPinia } from 'pinia';
beforeEach(() => { setActivePinia(createPinia()); });
test('loadTasks populates store', async () => {
const store = useTaskStore();
await store.loadTasks();
expect(store.tasks).toHaveLength(3);
});
Snapshot testing for complex output:
test('renders task card correctly', () => {
const wrapper = mountComponent({ props: { task: mockTask } });
expect(wrapper.html()).toMatchSnapshot();
});