new-component

Scaffolds Svelte 5 components with runes and standardized structure for Sworm.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/TophC7/Sworm --skill new-component-tophc7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-component
Source: https://github.com/TophC7/Sworm/tree/main/.claude/skills/new-component
Command: npx skills add https://github.com/TophC7/Sworm --skill new-component-tophc7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold and standardize the creation of new Svelte UI components for Sworm, enabling rapid, consistent UI development across projects.

Core Features & Use Cases

  • Scaffold a new Svelte component in the appropriate location (src/lib/components/ or src/lib/terminal) with a standardized skeleton including a top-level doc comment and boilerplate for props/state.
  • Enforce Sworm conventions (Tailwind utilities, Svelte 5 runes, and disciplined routing/placement) to minimize rework.
  • Use cases include building reusable UI blocks or terminal-specific UI helpers that can be shared across routes and features.

Quick Start

Create a new Svelte component named [component-name] in src/lib/components/ following the conventions described above.

Frequently Asked Questions about new-component

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Svelte 5 component with runes for Sworm UI?

Scaffold a reusable Svelte component by generating a skeleton file in src/lib/components or src/lib/terminal. The process enforces Svelte 5 runes ($state, $props, $bindable) and a top-level documentation comment while validating routing placement and preventing duplicates.

What's the best way to standardize Svelte component creation across a frontend codebase?

Standardize Svelte component creation by applying a scaffold that enforces Sworm conventions like Tailwind utilities and Svelte 5 runes. This ensures consistent routing placement, top-level documentation, and boilerplate for props and state across all reusable UI blocks.

Does the Svelte component scaffold support terminal UI helpers?

Yes, the Svelte component scaffold supports terminal UI helpers. You can generate standardized reusable components specifically within the src/lib/terminal directory, ensuring they follow the same Svelte 5 runes and structural conventions as standard UI blocks.

Can I use this scaffolding tool to prevent duplicate component files?

Yes, the scaffolding tool prevents duplicate component files. It validates the placement of your new Svelte component within the frontend codebase directory structure before generation, ensuring no existing files are overwritten or duplicated.

How do I generate boilerplate for Svelte 5 props and state?

Generate boilerplate for Svelte 5 props and state by running the component scaffold. It automatically injects Svelte 5 runes syntax including $props, $state, and $bindable into the new component file, providing a ready-to-use foundation for your UI block.

Why does my Svelte component need a top-level documentation comment?

A Svelte component needs a top-level documentation comment to enforce Sworm UI conventions and maintain codebase consistency. The scaffolding process automatically includes this documentation to ensure all reusable UI blocks and terminal helpers are properly documented.