Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.
日本語の概要は準備中です。原文の説明を表示しています。
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.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Use this skill when working with feature flags:
composer require laravel/pennant, publish config, run migrations.Feature::active('feature-name') in code.composer require laravel/pennant
php artisan vendor:publish --provider="Laravel\Pennant\PennantServiceProvider"
php artisan migrate
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
}
}
// 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']);
});
// 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
// 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');
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';
});
| Driver | Storage | Use case |
|---|---|---|
database | DB table | Production — persistent, shared across servers |
array | In-memory | Testing — no persistence |
// config/pennant.php
'default' => env('PENNANT_STORE', 'database'),
// Prevent N+1 when checking features for multiple users
Feature::for($users)->loadAll();
// Load specific features
Feature::for($users)->load(['new-dashboard', 'advanced-reporting']);
array driver in tests — prevents test pollution.php artisan pennant:purge for cleanup.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.
日本語の概要は準備中です。原文の説明を表示しています。
Use when defining or auditing the activation event — aha-moment selection, retention correlation, falsifiable definition. Triggers on 'what is our aha moment', 'redefine activation'.
日本語の概要は準備中です。原文の説明を表示しています。
Use when capturing an architectural decision — file naming, next ADR number, Status / Context / Decision / Consequences, index regen; fires even without saying 'ADR'.
日本語の概要は準備中です。原文の説明を表示しています。
Adversarial critique — devil's advocate, stress-test, honest teardown ('poke holes', 'be brutal', 'was hältst du davon'); explicit request only. Routine code or design review → code-review.
日本語の概要は準備中です。原文の説明を表示しています。
Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure.
日本語の概要は準備中です。原文の説明を表示しています。
Use for an adversarial red-team / blue-team / auditor review of an AI agent's CONFIG + behaviour (rules, skills, MCP, hooks, permissions) — attack-chain → defensive-gap list, not a code audit.
日本語の概要は準備中です。原文の説明を表示しています。