Pennant development

From relaticle/relaticle · View interactive version

Pennant development is an AI agent skill from the GitHub repository relaticle/relaticle. Use when working with Laravel Pennant the official Laravel feature flag package. Trigger whenever the query mentions Pennant by name or involves feature flags or feature toggles in a Laravel project. Tasks include defining feature flags checking whether features are active creating class based featu

How to use this skill

Skill file

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 / Deactivating

<!-- Activating Features -->

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

Verification

  1. Check feature flag is defined
  2. Test with different scopes/users

Common Pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.