Skip to main content
skill CX Codex

pennant-development — Laravel Pennant skill for Claude Code

pennant-development — a skill for working with Laravel Pennant, the official feature flag package. Defines flags, checks their status, creates class-based features, and protects routes with conditional feature toggles.

MIT 278 installs ★ 3,691 updated 2026-10-17

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add laravel/boost --skill pennant-development -a claude-code
Open on GitHub

What pennant-development does

Pennant is Laravel's built-in tool for managing feature flags, enabling gradual rollouts, per-user testing, and A/B testing of new functionality. This skill activates when you mention Pennant by name or work with feature toggles in a Laravel project.

Define flags with Feature::define(), check status with Feature::active(), use the Blade @feature directive for conditional rendering, and scope flags to users or teams. You can create class-based features in app/Features, write tests with Pest or PHPUnit, and build custom storage drivers for flag persistence.

The skill does not engage with generic Laravel configuration, authorization, authentication, or non-Pennant feature management systems.

What it helps with

  • Define a feature flag and check status for a specific user
  • Render components conditionally using the @feature Blade directive
  • Guard routes with flags and roll out features gradually to user segments
  • Test feature flags with Pest or PHPUnit
  • Set up A/B testing or staged rollouts using flags

Example prompts for the agent

  • Create a feature flag for a new dashboard that only shows for admins
  • Use the @feature directive to conditionally display the new dashboard component
  • Gate a route behind a flag and gradually enable it for 10% of users

How to install pennant-development

1Skills CLI (Vercel)

npx skills add laravel/boost --skill pennant-development -a claude-code

2Manually: put the files in place

~/.claude/skills/pennant-development/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pennant-development/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pennant-development

How do I install pennant-development in Claude Code?

Run npx skills add laravel/boost --skill pennant-development -a claude-code, then open ~/.claude/skills/pennant-development/SKILL.md.

What does pennant-development do?

The skill assists with Laravel Pennant, Laravel's feature flag system. It helps define flags, check their status, use Blade directives, test flags, and implement gradual rollouts and A/B tests.

How do I check or activate a flag for a specific user?

Use Feature::for($user)->active('flag-name') to check if a flag is active for that user, or Feature::for($user)->activate('flag-name') to enable it.

Source text

SKILL.md · MIT
---
name: pennant-development
description: "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."
license: MIT
metadata:
  author: laravel
---
# Pennant features

## Documentation

Use `search-docs` for detailed Pennant patterns and documentation.

## Basic usage

### Defining features

<!-- Defining Features -->
```php
use Laravel\Pennant\Feature;

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

### Checking features

<!-- Checking Features -->
```php
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 -->
```blade
@feature('new-dashboard')
    <x-new-dashboard />
@else
    <x-old-dashboard />
@endfeature
```

### Activating and deactivating

<!-- Activating Features -->
```php
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

© laravel · MIT · laravel/boost

Similar skills

All skills for Backend and APIs →

From the same set3

Project sponsors

Companies that keep this analytics open