Quick Svelte Operator
A command template for svelte workflows. Streamlines development with pre-configured patterns and best practices.
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
| Concept | Description |
|---|---|
| Speed-First | Prioritizes execution speed with sensible defaults over configuration |
| Convention Following | Automatically places files in standard SvelteKit locations |
| Minimal Scaffolding | Generates exactly what is needed without extra boilerplate |
| Smart Defaults | Uses TypeScript, scoped styles, and standard naming without asking |
| Quick Iteration | Designed 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
| Parameter | Default | Description |
|---|---|---|
| Verbosity | Low | Minimal output commentary, focused on code delivery |
| File Placement | Standard SvelteKit | Automatic placement in conventional directories |
| TypeScript | Yes | Always generates TypeScript unless project uses JS only |
| Testing | Skip | No test generation for quick operations (add tests separately) |
| Style | Match project | Follows detected project styling approach |
Best Practices
- 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
- Name things clearly -- provide the desired file and variable names in your arguments to avoid renaming generated code afterward
- Specify the data shape -- mention "CartItem with id, name, price, quantity" to get accurate TypeScript interfaces without follow-up edits
- Chain quick operations -- run multiple quick operations in sequence to build up functionality incrementally with review opportunities between steps
- Add tests later -- this command skips test generation for speed. Follow up with the test command once the feature is working correctly
Common Issues
- Generated code is too minimal -- this command intentionally generates minimal code. If you need comprehensive implementation, use a specialized command instead
- File placed in wrong directory -- specify the target path explicitly if your project uses non-standard directory structure
- Missing type exports -- the command creates types locally. If other modules need them, move interfaces to a shared types file manually
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.