Agent skill
vue-components
Apply when creating or modifying Vue components, using BaseCard, ColorPicker, Toast, or composables. Covers component architecture, module structure, and Vue 3 Composition API patterns.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/vue-components
SKILL.md
Vue 3 Component Architecture
Project Structure
src/
├── components/
│ ├── common/ # Shared components (BaseCard, ColorPicker, Toast)
│ └── [module-name]/ # Feature modules (cards + admin components)
├── composables/ # Reusable Vue composition functions
├── services/ # API services and utilities
└── types/ # TypeScript definitions
BaseCard Pattern
All dashboard cards extend BaseCard for consistency:
<template>
<BaseCard
title="Your Card Title"
:loading="loading"
:error="error"
>
<!-- Your content here -->
</BaseCard>
</template>
<script setup lang="ts">
import BaseCard from '../common/BaseCard.vue'
import { ref } from 'vue'
const loading = ref(false)
const error = ref<string | null>(null)
</script>
Available Components
- BaseCard: Base component for dashboard cards with consistent styling
- ColorPicker: ChurchTools-compatible color picker with 4-column grid, round swatches, v-model support
- Toast: Notification system with 4 types (success, error, warning, info), auto-dismiss, smooth animations
Available Composables
useToast: Toast notification managementuseTableSearch: Table search functionalityuseTableSorting: Table sorting with custom comparatorsuseTableResize: Responsive table handling
Component Usage Example
<template>
<BaseCard title="My Extension" :loading="loading" :error="error">
<p>Extension content here</p>
<ColorPicker v-model="selectedColor" />
<button @click="showSuccess" type="button">Show Toast</button>
</BaseCard>
<Toast />
</template>
<script setup lang="ts">
import BaseCard from './components/common/BaseCard.vue'
import ColorPicker from './components/common/ColorPicker.vue'
import Toast from './components/common/Toast.vue'
import { useToast } from './composables/useToast'
const { showToast } = useToast()
const showSuccess = () => showToast('Success!', 'Operation completed', 'success')
</script>
Module Structure
Each feature module has:
[ModuleName]Card.vue- Dashboard card component[ModuleName]Admin.vue- Admin/CRUD component
Code Style
- Use Vue 3 Composition API with
<script setup> - Use TypeScript strictly
- Import BaseCard from
../common/BaseCard.vue(relative paths) - Always use
type="button"on buttons to prevent form submission
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?