laravel-pennant

laravel-pennant is a skill for Claude Code, Codex from event4u-app/agent-config. It costs 47 tokens per session (1,163 once invoked), scanned A, original, MIT.

A Laravel feature-flag system for turning application features on or off for selected users, tenants, environments, or percentages of users. Feature flags let code control who can see a change.

In plain words
What is it for?
Use it to define flags, check whether they are active, roll features out to a percentage of users, and support per-user or per-tenant variants.
Why use it?
It lets you release changes gradually, run tests with different feature versions, or disable a feature without removing its code. This reduces the risk of exposing an unfinished change to everyone at once.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define flags, check whether they are active, roll features out to a percentage of users, and support per-user or per-tenant variants.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/event4u-app/agent-config/laravel-pennant
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add event4u-app/agent-config --skill laravel-pennant
Clone the repo
git clone --depth 1 https://github.com/event4u-app/agent-config

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for laravel-pennant

README.md
[![agentmods](https://agentmods.dev/badge/skills/event4u-app/agent-config/laravel-pennant/github.svg)](https://agentmods.dev/skills/event4u-app/agent-config/laravel-pennant)
Your own site
<a href="https://agentmods.dev/skills/event4u-app/agent-config/laravel-pennant"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/laravel-pennant/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laravel-pennant

Your own site · 80×15
<a href="https://agentmods.dev/skills/event4u-app/agent-config/laravel-pennant"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/laravel-pennant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,163 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01163
Opus 5.5 $0.00019 $0.00465
Sonnet 5.5 $0.00009 $0.00233
Haiku 4.5 $0.00005 $0.00116

Measured 3mo ago against content hash 565f1590cf37, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

laravel-pennant scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/laravel-pennant/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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. 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 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

Read the full file on GitHub · 199 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 199 lines · 47 tokens per session scan A 565f1590cf37

Subscribe to this mod's changes

laravel-pennant is a skill published in the GitHub repository event4u-app/agent-config (20 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 1,163 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

laravel-pennant compared with skills from other repositories

laravel-pennant next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
laravel-pennantevent4u-app/agent-configSkill20todayMITA47Claude Code, Codex
cqrs-implementationwshobson/agentsSkill43k2d agoMITA35Claude Code
diagnose-backend-bugQoderAI/better-harnessSkill2.5k23d agoMITA87Claude Code, Codex
create-slack-appslackapi/slack-skills-pluginSkill177todayMITA101Claude Code
tech-specsgriddynamics/rosettaSkill384yesterdayApache-2.0A23Claude Code
hunt-xxeadriannoes/awesome-agentic-aiSkill1086d agoMITA31Claude Code, Codex
bitrix-service-locatorbxmaximum/bitrix-framework-skillsSkill822d agoMITA57Claude Code, Codex