Q

Quick Svelte Operator

A command template for svelte workflows. Streamlines development with pre-configured patterns and best practices.

CommandClipticssveltev1.0.0MIT
0 views0 copies

Quick Svelte Operator

Rapidly execute common Svelte operations with minimal configuration, including quick component scaffolding, store wiring, route creation, and configuration adjustments.

When to Use This Command

Run this command when...

  • You need a fast, lightweight Svelte operation without the overhead of a full feature scaffold or detailed analysis
  • You want to quickly create a simple component, add a store, wire up a route, or adjust configuration with sensible defaults
  • Your task is straightforward and well-defined, requiring execution speed over customization depth

Do NOT use this command when...

  • You need a complex multi-file feature with comprehensive testing and accessibility -- use specialized commands instead
  • You want detailed analysis or recommendations before code generation

Quick Start

# .claude/commands/quick-svelte-operator.md # Quick Svelte operation Do: $ARGUMENTS
# Run the command claude "quick-svelte-operator add a writable store for shopping cart items with add, remove, and clear actions"
Expected output:
- cartStore.ts in src/lib/stores/
- Typed CartItem interface
- add, remove, clear derived actions
- Usage example in a component

Core Concepts

ConceptDescription
Speed-FirstPrioritizes execution speed with sensible defaults over configuration
Convention FollowingAutomatically places files in standard SvelteKit locations
Minimal ScaffoldingGenerates exactly what is needed without extra boilerplate
Smart DefaultsUses TypeScript, scoped styles, and standard naming without asking
Quick IterationDesigned for rapid create-test-adjust development cycles
Quick Operation Flow:

  Short Task Description
       |
  [Detect Operation Type]
       |
  +----+----+----+
  |    |    |    |
 Comp Store Route Config
  |    |    |    |
  [Apply Defaults]
       |
  [Generate Minimal Code]
       |
  Ready to Use

Configuration

ParameterDefaultDescription
VerbosityLowMinimal output commentary, focused on code delivery
File PlacementStandard SvelteKitAutomatic placement in conventional directories
TypeScriptYesAlways generates TypeScript unless project uses JS only
TestingSkipNo test generation for quick operations (add tests separately)
StyleMatch projectFollows detected project styling approach

Best Practices

  1. Keep requests atomic -- "add a cart store" is ideal for this command. "Build an e-commerce checkout flow" is too complex; use a scaffold command instead
  2. Name things clearly -- provide the desired file and variable names in your arguments to avoid renaming generated code afterward
  3. Specify the data shape -- mention "CartItem with id, name, price, quantity" to get accurate TypeScript interfaces without follow-up edits
  4. Chain quick operations -- run multiple quick operations in sequence to build up functionality incrementally with review opportunities between steps
  5. Add tests later -- this command skips test generation for speed. Follow up with the test command once the feature is working correctly

Common Issues

  1. Generated code is too minimal -- this command intentionally generates minimal code. If you need comprehensive implementation, use a specialized command instead
  2. File placed in wrong directory -- specify the target path explicitly if your project uses non-standard directory structure
  3. Missing type exports -- the command creates types locally. If other modules need them, move interfaces to a shared types file manually
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates