Use when adding a new UI component to an existing module - handles templates, props, and test scaffolding.
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./packs/svelte/skills/dev-create-component/SKILL.mdCreate a Svelte component following docs/ARCHITECTURE.md section 5.
Component: $ARGUMENTS
Read docs/ARCHITECTURE.md section 5.
Determine the type:
src/lib/modules/[module]/components/ComponentName.sveltesrc/lib/shared/components/ComponentName.sveltesrc/routes/[feature]/+page.svelteCreate the component with the Svelte 5 runes template:
<script lang="ts">
// Imports
import type { SomeType } from '../types/some.contracts'
// Props (typed with $props rune)
interface Props {
// type all props
items: SomeType[]
isLoading?: boolean
onselect?: (item: SomeType) => void
}
let { items, isLoading = false, onselect }: Props = $props()
// Local state ($state rune)
let selectedId = $state<string | null>(null)
// Derived state ($derived rune)
let isEmpty = $derived(!isLoading && items.length === 0)
// Handlers
function handleSelect(item: SomeType) {
selectedId = item.id
onselect?.(item)
}
</script>
<!-- Template with loading/error/empty states -->
{#if isLoading}
<div>Loading...</div>
{:else if isEmpty}
<div>No items found</div>
{:else}
{#each items as item (item.id)}
<div onclick={() => handleSelect(item)}>{item.name}</div>
{/each}
{/if}
<style>
/* scoped styles */
</style>Checklist:
<script lang="ts"> with runes$props() with interface$state for local reactive state$derived for computed valuesValidate: npx svelte-check --tsconfig ./tsconfig.json
fernandezbaptiste/specialist-agent
cd716d9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.