mcpField
P
pennant-development

pennant-development

github.com/laravelDevelopment3.7k261 installsUpdated 2w ago
Repository

About pennant-development

A skill for developers using Laravel Pennant to define and manage feature flags. It covers checking flags globally or by scope, Blade directives, activation, and verification across users or entities.

Key features

  1. 01Define feature flags
  2. 02Check flags globally or by scope
  3. 03Use flags in Blade templates
  4. 04Activate flags globally or by scope
  5. 05Verify flags across users and scopes

Use cases

  1. 01Adding a Pennant feature flag
  2. 02Displaying conditional Blade content
  3. 03Testing flag behavior for different users

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/laravel/boost --skill pennant-development

After installing, type/pennant-developmentin Claude Code to confirm it loaded.

Details

From the project README

Pennant features

Documentation

Use search-docs for detailed Pennant patterns and documentation.

Basic usage

Defining features
use Laravel\Pennant\Feature;

Feature::define('new-dashboard', function (User $user) {
    return $user->isAdmin();
});
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
@feature('new-dashboard')
    <x-new-dashboard />
@else
    <x-old-dashboard />
@endfeature
Activating and deactivating
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

Comments

Markdown supported