Pennant Development
LaravelOfficialCreated by laravel
- Skill
- Tool integration
- Software development
- MIT
- No issues found
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
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/laravel/pennant-development/downloadUnzip 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 />
@endfeatureActivating and deactivating
<!-- Activating Features -->
Feature::activate('new-dashboard');
Feature::for($user)->activate('new-dashboard');Verification
Check that the feature flag is defined
Test with different scopes and users
Common pitfalls
Forgetting to scope features for specific users or other entities
Not following existing naming conventions
Files
- ATTRIBUTION.mdAdded by AutoGineer915 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md1.8 KiB
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.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download pennant-development.zip