Source profileQuality 93/100

event4u-app/agent-config/src/skills/laravel-pennant/SKILL.md

laravel-pennant

Use when working with feature flags — Laravel Pennant, gradual rollouts, A/B testing, scope-based flags — even when the user just says 'hide this behind a flag' without naming Pennant.

Source repository stars
9
Declared platforms
0
Static risk flags
0
Last source update
2026-08-28
Source checked
2026-08-28

Decision brief

What it does: where it fits

Use when working with feature flags — Laravel Pennant, gradual rollouts, A/B testing, scope-based flags — even when the user just says 'hide this behind a flag' without naming Pennant.

Best for

  • Gradual feature rollouts (percentage-based)
  • Per-user or per-tenant feature toggling
  • A/B testing with feature variants

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/laravel-pennant"
Safe inspection promptEditorial

Inspect the Agent Skill "laravel-pennant" from https://github.com/event4u-app/agent-config/blob/6a5670b7881a676c0da90d2afb950298087c4ccb/src/skills/laravel-pennant/SKILL.md at commit 6a5670b7881a676c0da90d2afb950298087c4ccb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Procedure: Set up feature flags

    1. Install — composer require laravel/pennant, publish config, run migrations. 2. Define feature — Create feature class or use closure-based definition. 3. Check feature — Use Feature::active('feature-name') in code. 4. Verify — Confirm feature is active/inactive for correct sco…

    Install — composer require laravel/pennant, publish config, run migrations.Define feature — Create feature class or use closure-based definition.Check feature — Use Feature::active('feature-name') in code.
  2. 02

    When to use

    Use this skill when working with feature flags: - Gradual feature rollouts (percentage-based) - Per-user or per-tenant feature toggling - A/B testing with feature variants - Environment-based feature gating

    Gradual feature rollouts (percentage-based)Per-user or per-tenant feature togglingA/B testing with feature variants
  3. 03

    Installation

    Review the “Installation” section in the pinned source before continuing.

    Review and apply the “Installation” source section.
  4. 04

    Defining features

    Review the “Defining features” section in the pinned source before continuing.

    Review and apply the “Defining features” source section.
  5. 05

    Class-based features (recommended)

    Review the “Class-based features (recommended)” section in the pinned source before continuing.

    Review and apply the “Class-based features (recommended)” source section.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars9SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
event4u-app/agent-config
Skill path
src/skills/laravel-pennant/SKILL.md
Commit
6a5670b7881a676c0da90d2afb950298087c4ccb
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

laravel-pennant

When to use

Use this skill when working with feature flags:

  • Gradual feature rollouts (percentage-based)
  • Per-user or per-tenant feature toggling
  • A/B testing with feature variants
  • Environment-based feature gating

Procedure: Set up feature flags

  1. Installcomposer require laravel/pennant, publish config, run migrations.
  2. Define feature — Create feature class or use closure-based definition.
  3. Check feature — Use Feature::active('feature-name') in code.
  4. Verify — Confirm feature is active/inactive for correct scopes. Run tests.

Installation

composer require laravel/pennant
php artisan vendor:publish --provider="Laravel\Pennant\PennantServiceProvider"
php artisan migrate

Defining features

Class-based features (recommended)

php artisan pennant:feature NewDashboard
declare(strict_types=1);

namespace App\Features;

use App\Models\User;
use Illuminate\Support\Lottery;

class NewDashboard
{
    /** Resolve the feature's initial value. */
    public function resolve(User $user): bool
    {
        // Percentage rollout
        return Lottery::odds(1, 10)->choose();  // 10% of users
    }
}

Closure-based features

// In a service provider
use Laravel\Pennant\Feature;

Feature::define('new-dashboard', function (User $user): bool {
    return $user->getCustomer()?->isEarlyAdopter() ?? false;
});

// Rich values (A/B testing)
Feature::define('checkout-button', function (User $user): string {
    return Arr::random(['blue', 'green', 'red']);
});

Checking features

// Boolean check
if (Feature::active('new-dashboard')) {
    // Show new dashboard
}

// Via the user model (HasFeatures trait)
if ($user->features()->active('new-dashboard')) {
    // ...
}

// Rich value
$color = Feature::value('checkout-button');  // 'blue', 'green', or 'red'

// Blade directive
@feature('new-dashboard')
    <x-new-dashboard />
@else
    <x-legacy-dashboard />
@endfeature

Managing features

// Activate for a specific user
Feature::for($user)->activate('new-dashboard');

// Deactivate
Feature::for($user)->deactivate('new-dashboard');

// Activate for everyone
Feature::activateForEveryone('new-dashboard');

// Deactivate for everyone
Feature::deactivateForEveryone('new-dashboard');

// Purge stored values (re-resolve on next check)
Feature::purge('new-dashboard');

Scopes

Features can be scoped to any model, not just users:

// Per-tenant feature
Feature::for($customer)->active('advanced-reporting');

// Define with tenant scope
Feature::define('advanced-reporting', function (Customer $customer): bool {
    return $customer->getPlan() === 'enterprise';
});

Drivers

DriverStorageUse case
databaseDB tableProduction — persistent, shared across servers
arrayIn-memoryTesting — no persistence
// config/pennant.php
'default' => env('PENNANT_STORE', 'database'),

Eager loading

// Prevent N+1 when checking features for multiple users
Feature::for($users)->loadAll();

// Load specific features
Feature::for($users)->load(['new-dashboard', 'advanced-reporting']);

Core rules

  • Use class-based features for anything non-trivial — they're testable and discoverable.
  • Scope to the right model — user, customer, or team depending on the feature.
  • Eager load when checking features for collections of users.
  • Purge after full rollout — remove the flag once 100% of users have the feature.
  • Use array driver in tests — prevents test pollution.
  • Clean up old flags — feature flags are temporary, not permanent config.

Output format

  1. Feature flag definition with scope and resolve logic
  2. Integration in controllers/services using Feature::active()

Auto-trigger keywords

  • feature flag
  • feature toggle
  • Pennant
  • gradual rollout
  • A/B test
  • feature gate

Gotcha

  • Feature flags in database driver require migration — don't forget php artisan pennant:purge for cleanup.
  • The model tends to check flags without a scope — always pass the authenticated user or a default scope.
  • Don't nest feature flag checks — it makes the logic impossible to reason about.

Do NOT

  • Do NOT leave feature flags forever — remove them after full rollout.
  • Do NOT use feature flags for permanent configuration — use config files.
  • Do NOT check features in tight loops without eager loading.
  • Do NOT forget to purge stored values when changing the resolve logic.

Frequently asked questions

What to verify before installation and use

What does the laravel-pennant source document cover?

Use when working with feature flags — Laravel Pennant, gradual rollouts, A/B testing, scope-based flags — even when the user just says 'hide this behind a flag' without naming Pennant.

How do I install laravel-pennant?

The source record exposes this install command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/laravel-pennant". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 10045,960

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10029,236

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10025,136

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,277

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing