[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X71Q3P9YDFNHFN133AHGX0":3,"skill-same:01M6X71Q3P9YDFNHFN133AHGX0":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":53,"ownerDescription":55,"updatedAt":56,"install":57,"resources":69},"01M6X71Q3P9YDFNHFN133AHGX0","laravel-pennant",null,"Use when working with feature flags — Laravel Pennant, gradual rollouts, A\u002FB testing, scope-based flags — even when the user just says 'hide this behind a flag' without naming Pennant.","event4u-app\u002Fagent-config","event4u-app","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199339632?v=4","01M6X5TWBNCQCE1VDKT4E9KF7N","event4u.app","01M6X5TWF4HRM266RG2Q5VVH1X",19,"MIT","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Flaravel-pennant\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"laravel pennant","laravel","feature","when","true","naming","with","professional","scope","false","testing","flags","rollouts","use","user","just","feature flags","engineering","2026-11-10 10:12:30",false,"---\nmodel_tier: medium\nname: laravel-pennant\ndescription: \"Use when working with feature flags — Laravel Pennant, gradual rollouts, A\u002FB testing, scope-based flags — even when the user just says 'hide this behind a flag' without naming Pennant.\"\ndomain: engineering\nworkspaces:\n  - engineering\npacks:\n  - laravel\ntrust:\n  level: professional\ninstall:\n  default: false\n  removable: true\n---\n\n# laravel-pennant\n\n## When to use\n\nUse this skill when working with feature flags:\n- Gradual feature rollouts (percentage-based)\n- Per-user or per-tenant feature toggling\n- A\u002FB testing with feature variants\n- Environment-based feature gating\n\n## Procedure: Set up feature flags\n\n1. **Install** — `composer require laravel\u002Fpennant`, publish config, run migrations.\n2. **Define feature** — Create feature class or use closure-based definition.\n3. **Check feature** — Use `Feature::active('feature-name')` in code.\n4. **Verify** — Confirm feature is active\u002Finactive for correct scopes. Run tests.\n\n### Installation\n\n```bash\ncomposer require laravel\u002Fpennant\nphp artisan vendor:publish --provider=\"Laravel\\Pennant\\PennantServiceProvider\"\nphp artisan migrate\n```\n\n## Defining features\n\n### Class-based features (recommended)\n\n```bash\nphp artisan pennant:feature NewDashboard\n```\n\n```php\ndeclare(strict_types=1);\n\nnamespace App\\Features;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Lottery;\n\nclass NewDashboard\n{\n    \u002F** Resolve the feature's initial value. *\u002F\n    public function resolve(User $user): bool\n    {\n        \u002F\u002F Percentage rollout\n        return Lottery::odds(1, 10)->choose();  \u002F\u002F 10% of users\n    }\n}\n```\n\n### Closure-based features\n\n```php\n\u002F\u002F In a service provider\nuse Laravel\\Pennant\\Feature;\n\nFeature::define('new-dashboard', function (User $user): bool {\n    return $user->getCustomer()?->isEarlyAdopter() ?? false;\n});\n\n\u002F\u002F Rich values (A\u002FB testing)\nFeature::define('checkout-button', function (User $user): string {\n    return Arr::random(['blue', 'green', 'red']);\n});\n```\n\n## Checking features\n\n```php\n\u002F\u002F Boolean check\nif (Feature::active('new-dashboard')) {\n    \u002F\u002F Show new dashboard\n}\n\n\u002F\u002F Via the user model (HasFeatures trait)\nif ($user->features()->active('new-dashboard')) {\n    \u002F\u002F ...\n}\n\n\u002F\u002F Rich value\n$color = Feature::value('checkout-button');  \u002F\u002F 'blue', 'green', or 'red'\n\n\u002F\u002F Blade directive\n@feature('new-dashboard')\n    \u003Cx-new-dashboard \u002F>\n@else\n    \u003Cx-legacy-dashboard \u002F>\n@endfeature\n```\n\n## Managing features\n\n```php\n\u002F\u002F Activate for a specific user\nFeature::for($user)->activate('new-dashboard');\n\n\u002F\u002F Deactivate\nFeature::for($user)->deactivate('new-dashboard');\n\n\u002F\u002F Activate for everyone\nFeature::activateForEveryone('new-dashboard');\n\n\u002F\u002F Deactivate for everyone\nFeature::deactivateForEveryone('new-dashboard');\n\n\u002F\u002F Purge stored values (re-resolve on next check)\nFeature::purge('new-dashboard');\n```\n\n## Scopes\n\nFeatures can be scoped to any model, not just users:\n\n```php\n\u002F\u002F Per-tenant feature\nFeature::for($customer)->active('advanced-reporting');\n\n\u002F\u002F Define with tenant scope\nFeature::define('advanced-reporting', function (Customer $customer): bool {\n    return $customer->getPlan() === 'enterprise';\n});\n```\n\n## Drivers\n\n| Driver | Storage | Use case |\n|---|---|---|\n| `database` | DB table | Production — persistent, shared across servers |\n| `array` | In-memory | Testing — no persistence |\n\n```php\n\u002F\u002F config\u002Fpennant.php\n'default' => env('PENNANT_STORE', 'database'),\n```\n\n## Eager loading\n\n```php\n\u002F\u002F Prevent N+1 when checking features for multiple users\nFeature::for($users)->loadAll();\n\n\u002F\u002F Load specific features\nFeature::for($users)->load(['new-dashboard', 'advanced-reporting']);\n```\n\n## Core rules\n\n- **Use class-based features** for anything non-trivial — they're testable and discoverable.\n- **Scope to the right model** — user, customer, or team depending on the feature.\n- **Eager load** when checking features for collections of users.\n- **Purge after full rollout** — remove the flag once 100% of users have the feature.\n- **Use `array` driver in tests** — prevents test pollution.\n- **Clean up old flags** — feature flags are temporary, not permanent config.\n\n## Output format\n\n1. Feature flag definition with scope and resolve logic\n2. Integration in controllers\u002Fservices using Feature::active()\n\n## Auto-trigger keywords\n\n- feature flag\n- feature toggle\n- Pennant\n- gradual rollout\n- A\u002FB test\n- feature gate\n\n## Gotcha\n\n- Feature flags in database driver require migration — don't forget `php artisan pennant:purge` for cleanup.\n- The model tends to check flags without a scope — always pass the authenticated user or a default scope.\n- Don't nest feature flag checks — it makes the logic impossible to reason about.\n\n## Do NOT\n\n- Do NOT leave feature flags forever — remove them after full rollout.\n- Do NOT use feature flags for permanent configuration — use config files.\n- Do NOT check features in tight loops without eager loading.\n- Do NOT forget to purge stored values when changing the resolve logic.\n","# laravel-pennant\n\n## When to use\n\nUse this skill when working with feature flags:\n- Gradual feature rollouts (percentage-based)\n- Per-user or per-tenant feature toggling\n- A\u002FB testing with feature variants\n- Environment-based feature gating\n\n## Procedure: Set up feature flags\n\n1. **Install** — `composer require laravel\u002Fpennant`, publish config, run migrations.\n2. **Define feature** — Create feature class or use closure-based definition.\n3. **Check feature** — Use `Feature::active('feature-name')` in code.\n4. **Verify** — Confirm feature is active\u002Finactive for correct scopes. Run tests.\n\n### Installation\n\n```bash\ncomposer require laravel\u002Fpennant\nphp artisan vendor:publish --provider=\"Laravel\\Pennant\\PennantServiceProvider\"\nphp artisan migrate\n```\n\n## Defining features\n\n### Class-based features (recommended)\n\n```bash\nphp artisan pennant:feature NewDashboard\n```\n\n```php\ndeclare(strict_types=1);\n\nnamespace App\\Features;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Lottery;\n\nclass NewDashboard\n{\n    \u002F** Resolve the feature's initial value. *\u002F\n    public function resolve(User $user): bool\n    {\n        \u002F\u002F Percentage rollout\n        return Lottery::odds(1, 10)->choose();  \u002F\u002F 10% of users\n    }\n}\n```\n\n### Closure-based features\n\n```php\n\u002F\u002F In a service provider\nuse Laravel\\Pennant\\Feature;\n\nFeature::define('new-dashboard', function (User $user): bool {\n    return $user->getCustomer()?->isEarlyAdopter() ?? false;\n});\n\n\u002F\u002F Rich values (A\u002FB testing)\nFeature::define('checkout-button', function (User $user): string {\n    return Arr::random(['blue', 'green', 'red']);\n});\n```\n\n## Checking features\n\n```php\n\u002F\u002F Boolean check\nif (Feature::active('new-dashboard')) {\n    \u002F\u002F Show new dashboard\n}\n\n\u002F\u002F Via the user model (HasFeatures trait)\nif ($user->features()->active('new-dashboard')) {\n    \u002F\u002F ...\n}\n\n\u002F\u002F Rich value\n$color = Feature::value('checkout-button');  \u002F\u002F 'blue', 'green', or 'red'\n\n\u002F\u002F Blade directive\n@feature('new-dashboard')\n    \u003Cx-new-dashboard \u002F>\n@else\n    \u003Cx-legacy-dashboard \u002F>\n@endfeature\n```\n\n## Managing features\n\n```php\n\u002F\u002F Activate for a specific user\nFeature::for($user)->activate('new-dashboard');\n\n\u002F\u002F Deactivate\nFeature::for($user)->deactivate('new-dashboard');\n\n\u002F\u002F Activate for everyone\nFeature::activateForEveryone('new-dashboard');\n\n\u002F\u002F Deactivate for everyone\nFeature::deactivateForEveryone('new-dashboard');\n\n\u002F\u002F Purge stored values (re-resolve on next check)\nFeature::purge('new-dashboard');\n```\n\n## Scopes\n\nFeatures can be scoped to any model, not just users:\n\n```php\n\u002F\u002F Per-tenant feature\nFeature::for($customer)->active('advanced-reporting');\n\n\u002F\u002F Define with tenant scope\nFeature::define('advanced-reporting', function (Customer $customer): bool {\n    return $customer->getPlan() === 'enterprise';\n});\n```\n\n## Drivers\n\n| Driver | Storage | Use case |\n|---|---|---|\n| `database` | DB table | Production — persistent, shared across servers |\n| `array` | In-memory | Testing — no persistence |\n\n```php\n\u002F\u002F config\u002Fpennant.php\n'default' => env('PENNANT_STORE', 'database'),\n```\n\n## Eager loading\n\n```php\n\u002F\u002F Prevent N+1 when checking features for multiple users\nFeature::for($users)->loadAll();\n\n\u002F\u002F Load specific features\nFeature::for($users)->load(['new-dashboard', 'advanced-reporting']);\n```\n\n## Core rules\n\n- **Use class-based features** for anything non-trivial — they're testable and discoverable.\n- **Scope to the right model** — user, customer, or team depending on the feature.\n- **Eager load** when checking features for collections of users.\n- **Purge after full rollout** — remove the flag once 100% of users have the feature.\n- **Use `array` driver in tests** — prevents test pollution.\n- **Clean up old flags** — feature flags are temporary, not permanent config.\n\n## Output format\n\n1. Feature flag definition with scope and resolve logic\n2. Integration in controllers\u002Fservices using Feature::active()\n\n## Auto-trigger keywords\n\n- feature flag\n- feature toggle\n- Pennant\n- gradual rollout\n- A\u002FB test\n- feature gate\n\n## Gotcha\n\n- Feature flags in database driver require migration — don't forget `php artisan pennant:purge` for cleanup.\n- The model tends to check flags without a scope — always pass the authenticated user or a default scope.\n- Don't nest feature flag checks — it makes the logic impossible to reason about.\n\n## Do NOT\n\n- Do NOT leave feature flags forever — remove them after full rollout.\n- Do NOT use feature flags for permanent configuration — use config files.\n- Do NOT check features in tight loops without eager loading.\n- Do NOT forget to purge stored values when changing the resolve logic.\n",{"name":5,"packs":42,"trust":43,"domain":36,"install":44,"model_tier":46,"workspaces":47,"description":7},[20],{"level":26},{"default":38,"removable":45},true,"medium",[36],"main","12bd765ce1d800501d45dfb8232102793af01290","src\u002Fskills\u002Flaravel-pennant",1,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config","https:\u002F\u002Fevent4u.app","https:\u002F\u002Fgithub.com\u002Fevent4u-app","Your events in your hand","2026-11-14 02:29:41",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":45},[59,62,65],{"tool":60,"command":61},"npx","npx skills add event4u-app\u002Fagent-config --skill laravel-pennant",{"tool":63,"command":64},"bunx","bunx skills add event4u-app\u002Fagent-config --skill laravel-pennant",{"tool":66,"command":67},"pnpm","pnpm dlx skills add event4u-app\u002Fagent-config --skill laravel-pennant","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Flaravel-pennant\u002FSKILL.md",[],[71,84,96,107,118,126],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":37},"01M6X84PK96XBPENXH66JCTSD1","unknown-key-fixture","Declares a key the schema does not know.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Funknown-key\u002FSKILL.md",[],[78,79,80,81,82,83],"unknown key fixture","Unknown key","fixture","unknown","schema","package",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":37},"01M6X84HW7NAHZ7GZMQ9RXK1XJ","portable-fixture","Declares only semantics the MCP-lite carrier transports whole.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fportable\u002FSKILL.md",[],[80,91,92,93,94,83,95],"portable","portable fixture","engineer","only","MCP",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":37},"01M6X84F29FE0RGGZ1ZTFGZTX2","non-portable-fixture","Declares a runtime semantic the carrier drops.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fnon-portable\u002FSKILL.md",[],[92,103,91,80,104,105,106,83],"non portable fixture","semantic","high","runtime",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":37},"01M6X848F706PT9MDCX75JKJ6B","candidate-zero-width","A candidate whose prose carries an invisible joiner.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fzero-width-injection\u002FSKILL.md",[],[114,115,116,117],"candidate zero width","candidate","ZeRO","prose",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":37},"01M6X841SSC2T31VDF41SA6DG1","candidate-disclosure-suppression","A candidate whose prose tells the agent to withhold from the user.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdisclosure-suppression\u002FSKILL.md",[],[125,115,117,33],"candidate disclosure suppression",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":37},"01M6X83TFS5AGPBPVTQNWP0BB3","candidate-dangerous-frontmatter","A candidate claiming an unscoped tool grant and a permission bypass.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdangerous-frontmatter\u002FSKILL.md",[],[133,115,134,135,136,137],"candidate dangerous frontmatter","frontmatter","shell","permission","tool"]