vue-component
Skill0 starsChanged 8 months agoMITView on GitHub
Crée ou modifie un composant Vue 3 conforme aux standards Fidely. Déclencher quand : création composant (CardItem, CardForm, Scanner, QRCodeDisplay ou nouveau), ajout prop/emit, refactoring template, UX mobile (touch target), choix composant Nuxt UI. Mots-clés : CardItem.vue, CardForm.vue, Scanner.vue, QRCodeDisplay.vue, defineProps, defineEmits, UCard, UButton, UForm, UFormField, UInput, UInputNumber, UProgress, UModal, size="lg", truncate, flex gap, ClientOnly, onMounted, onBeforeUnmount.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- xqgerogia/claude-skillstheir own version, first seen Apr 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- xqgerogia/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- nuxt-uiSkill
- coding-standardsSkill
- nuxt-standardsSkill
- security-checksSkill
- specs-checkerSkill
- testing-patternsSkill
The file
Files
Skill : Créer un composant Vue 3
Quand l'utilisateur demande de créer un composant Vue, applique ce template et ces règles.
Ressources disponibles
templates/CardItem.vue— composant carte fidélité complet (modes merchant + client)templates/CardForm.vue— formulaire avec validation Zod, UForm, UInputNumber
Template de base
<script setup lang="ts">
// 1. Types importés (import type uniquement)
import type { Card } from '~/composables/useDB'
// 2. Props typées avec générics
const props = defineProps<{
requiredProp: string
optionalProp?: number
complexProp: Card
}>()
// 3. Emits typés avec tuple syntax
const emit = defineEmits<{
updated: [id: string, value: number]
deleted: [id: string]
}>()
// 4. Composables Nuxt (auto-importés, pas d'import manuel)
const toast = useToast()
// 5. State local
const isLoading = ref(false)
// 6. Computed (logique hors template)
const displayValue = computed(() => props.optionalProp ?? 0)
// 7. Fonctions (async avec try/catch + feedback toast)
async function handleAction() {
isLoading.value = true
try {
// logique métier
emit('updated', 'id', displayValue.value)
toast.add({ title: 'Succès', color: 'success' })
}
catch {
toast.add({ title: 'Erreur', color: 'error' })
}
finally {
isLoading.value = false
}
}
</script>
<template>
<UCard class="w-full">
<!-- Contenu principal -->
<p class="font-semibold text-lg">{{ props.requiredProp }}</p>
<!-- Actions : UButton avec size="lg" (min touch target 48px) -->
<UButton
color="primary"
size="lg"
:loading="isLoading"
@click="handleAction"
>
Action
</UButton>
</UCard>
</template>Règles obligatoires
Structure complète, ordre des blocs, props/emits, composables et JSDoc dans
coding-standards.
Composants Nuxt UI disponibles :
- Layout :
UCard,UContainer,USeparator - Actions :
UButton,UButtonGroup - Formulaire :
UForm,UFormField,UInput,UInputNumber,UTextarea,USelect,UCheckbox - Feedback :
UAlert,UBadge,UProgress,UIcon - Overlay :
UModal,UDrawer,UTooltip - Icônes :
i-lucide-*en priorité (ex:i-lucide-trash-2,i-lucide-plus,i-lucide-gift)
UX mobile :
- Boutons interactifs :
size="lg"minimum (touch target 48px) - Textes tronqués dans les listes : classe
truncate - Layouts flexibles :
flex flex-col gap-4ouflex gap-2
SSR safety :
- Si le composant accède à
localStorage,indexedDB,document, ouwindow→ envelopper dansonMounted - Si le composant utilise
qrcodeouhtml5-qrcode→<ClientOnly>+ import dynamique dansonMounted
Composable associé (si logique complexe)
Si la logique dépasse ~20 lignes ou est réutilisable, extraire dans app/composables/useNomFeature.ts :
// app/composables/useNomFeature.ts
export function useNomFeature() {
const state = ref<Type>(initialValue)
async function doSomething(): Promise<void> {
// logique
}
return { state, doSomething }
}Nommage des fichiers
- Composant :
PascalCase.vue→app/components/MonComposant.vue - Page :
kebab-case.vue→app/pages/ma-page.vue - Route dynamique :
[param].vue→app/pages/client/[id].vue
Confirmation en fin de tâche
✅ vue-component appliqué
- Structure : [
<script setup lang="ts">en premier, ordre des blocs respecté]- Props/Emits : [générics, tuple syntax]
- UX mobile : [size="lg" sur boutons interactifs, truncate sur textes longs]
- SSR safety : [ClientOnly / onMounted si browser API]
- Tests : [fichier .test.ts co-localisé créé ou mis à jour]
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

