Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
volt-development
marekmiklusek/laravel-starter-kit-livewire
claude-code
volt
livewire
components
functional-components
testing
pest

Develops single-file Livewire components with Volt. Activates when creating Volt components, converting Livewire to Volt, working with @volt directive, functional or class-based Volt APIs; or when the user mentions Volt, single-file components, functional Livewire, or inline component logic in Blade files.

Install
php artisan boost:add-skill marekmiklusek/laravel-starter-kit-livewire

Save this content to: .claude/skills/volt-development/SKILL.md

# Volt Development

## Documentation

Use `search-docs` for detailed Volt patterns and documentation.

## Basic Usage

Create components with `php artisan make:volt [name] [--test] [--pest]`.

Important: Check existing Volt components to determine if they use functional or class-based style before creating new ones.

### Functional Components

<!-- Volt Functional Component -->
```php
@@volt
<?php
use function Livewire\Volt\{state, computed};

state(['count' => 0]);

$increment = fn () => $this->count++;
$double = computed(fn () => $this->count * 2);
?>

<div>
    <h1>Count: @{{ $count }} (Double: @{{ $this->double }})</h1>
    <button wire:click="increment">+</button>
</div>
@@endvolt
```

### Class-Based Components

<!-- Volt Class-based Component -->
```php
use Livewire\Volt\Component;

new class extends Component {
    public int $count = 0;

    public function increment(): void
    {
        $this->count++;
    }
} ?>

<div>
    <h1>@{{ $count }}</h1>
    <button wire:click="increment">+</button>
</div>
```

## Testing

Tests go in existing Volt test directory or `tests/Feature/Volt`:

<!-- Volt Test Example -->
```php
use Livewire\Volt\Volt;

test('counter increments', function () {
    Volt::test('counter')
        ->assertSee('Count: 0')
        ->call('increment')
        ->assertSee('Count: 1');
});
```

## Verification

1. Check existing components for functional vs class-based style
2. Test component with `Volt::test()`

## Common Pitfalls

- Not checking existing style (functional vs class-based) before creating
- Forgetting `@volt` directive wrapper
- Missing `--test` or `--pest` flag when tests are needed

Volt Development

Documentation

Use search-docs for detailed Volt patterns and documentation.

Basic Usage

Create components with php artisan make:volt [name] [--test] [--pest].

Important: Check existing Volt components to determine if they use functional or class-based style before creating new ones.

Functional Components

@@volt
<?php
use function Livewire\Volt\{state, computed};

state(['count' => 0]);

$increment = fn () => $this->count++;
$double = computed(fn () => $this->count * 2);
?>

<div>
    <h1>Count: @{{ $count }} (Double: @{{ $this->double }})</h1>
    <button wire:click="increment">+</button>
</div>
@@endvolt

Class-Based Components

use Livewire\Volt\Component;

new class extends Component {
    public int $count = 0;

    public function increment(): void
    {
        $this->count++;
    }
} ?>

<div>
    <h1>@{{ $count }}</h1>
    <button wire:click="increment">+</button>
</div>

Testing

Tests go in existing Volt test directory or tests/Feature/Volt:

use Livewire\Volt\Volt;

test('counter increments', function () {
    Volt::test('counter')
        ->assertSee('Count: 0')
        ->call('increment')
        ->assertSee('Count: 1');
});

Verification

  1. Check existing components for functional vs class-based style
  2. Test component with Volt::test()

Common Pitfalls

  • Not checking existing style (functional vs class-based) before creating
  • Forgetting @volt directive wrapper
  • Missing --test or --pest flag when tests are needed
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle