Generated banner for Pennant Development
Generated logo for Pennant Development

Pennant Development

LaravelOfficialCreated by laravel

  • Skill
  • Tool integration
  • Software development
  • MIT
  • No issues found

From the author

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 features in `app/Features` using Blade `@feature` directives scoping flags to users or teams building custom Pennant storage drivers protecting routes with feature flags testing feature flags with Pest or PHPUnit and implementing A B testing or gradual rollouts with feature flags. Do not trigger for generic Laravel configuration authorization policies authentication or non Pennant feature management systems.
— the description by laravel

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The pennant-development skill provides structured guidance for implementing and managing feature flags in Laravel projects using the official Pennant package. It covers the full lifecycle of feature management, from defining feature logic and scoping flags to specific users or teams, to integrating flags into Blade templates and testing them within the application environment.

What it does

  • Defines feature flags using closure-based or class-based logic.
  • Checks feature status globally or scoped to specific users.
  • Provides syntax for Blade directives to toggle UI components.
  • Supports manual activation and deactivation of features.
  • Assists with testing feature flags using PHPUnit or Pest.

When to use it

  • When implementing gradual rollouts or A/B testing in a Laravel application.
  • When you need to conditionally display UI elements based on user roles or feature status.
  • When creating class-based features in the app/Features directory.
  • When building custom storage drivers for feature flag persistence.

Advantages

  • Ensures consistent implementation of feature flags across the codebase.
  • Reduces common errors like forgetting to scope features to specific entities.
  • Provides quick access to standard Pennant syntax and patterns.
  • Facilitates cleaner conditional logic in Blade templates.

Usage examples

“How do I define a new feature flag in Pennant that is only active for admin users?”
The agent provides the Feature::define syntax using a closure that checks the user's admin status.
“Show me how to use the Blade directive to show different content based on a feature flag.”
The agent generates a code snippet using @feature and @else directives to toggle between UI components.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/laravel/pennant-development/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip pennant-development.zip -d .agents/skills

Documentation by laravel

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

Files

LICENSE

The MIT License (MIT)

Copyright (c) Taylor Otwell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
laravel
Publisher
Laravel (Official)
Source
laravel/boost · .ai/pennant/skill/pennant-development · commit 5f8d05d
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE.md)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by laravel or Laravel.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download pennant-development.zip