🧪 Pennant Development

This skill helps you manage Laravel Pennant feature flags, enabling targeted rollouts, A/B testing, and conditional UI with ease.

QUICK INSTALL
npx playbooks add skill laravel/boost --skill pennant-development

Pennant Development instructions

Pennant features

Documentation

Use search-docs for detailed Pennant patterns and documentation.

Basic usage

Defining features

<!-- Defining Features -->

use Laravel\Pennant\Feature;

Feature::define('new-dashboard', function (User $user) {
    return $user->isAdmin();
});

Checking features

<!-- Checking Features -->

if (Feature::active('new-dashboard')) {
    // Feature is active
}

// With scope
if (Feature::for($user)->active('new-dashboard')) {
    // Feature is active for this user
}

Blade directive

<!-- Blade Directive -->

@feature('new-dashboard')
    <x-new-dashboard />
@else
    <x-old-dashboard />
@endfeature

Activating and deactivating

<!-- Activating Features -->

Feature::activate('new-dashboard');
Feature::for($user)->activate('new-dashboard');

Verification

  1. Check that the feature flag is defined
  2. Test with different scopes and users

Common pitfalls

  • Forgetting to scope features for specific users or other entities
  • Not following existing naming conventions

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.