Agent Skillsrelaticle/relaticle › pennant-development

pennant-development

GitHub

处理 Laravel Pennant 功能标志的开发技能,涵盖定义、检查、作用域设置、Blade 指令使用及测试。

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

Trigger Scenarios

查询提及 Pennant 涉及 Laravel 项目中的功能标志或开关

Install

npx skills add relaticle/relaticle --skill pennant-development -g -y
More Options

Non-standard path

npx skills add https://github.com/relaticle/relaticle/tree/main/.claude/skills/pennant-development -g -y

Use without installing

npx skills use relaticle/relaticle@pennant-development

指定 Agent (Claude Code)

npx skills add relaticle/relaticle --skill pennant-development -a claude-code -g -y

安装 repo 全部 skill

npx skills add relaticle/relaticle --all -g -y

预览 repo 内 skill

npx skills add relaticle/relaticle --list

SKILL.md

Frontmatter
{
    "name": "pennant-development",
    "license": "MIT",
    "metadata": {
        "author": "laravel"
    },
    "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."
}

Pennant Features

Documentation

Use search-docs for detailed Pennant patterns and documentation.

Basic Usage

Defining Features

use Laravel\Pennant\Feature;

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

Checking Features

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

@feature('new-dashboard')
    <x-new-dashboard />
@else
    <x-old-dashboard />
@endfeature

Activating / Deactivating

Feature::activate('new-dashboard');
Feature::for($user)->activate('new-dashboard');

Verification

  1. Check feature flag is defined
  2. Test with different scopes/users

Common Pitfalls

  • Forgetting to scope features for specific users/entities
  • Not following existing naming conventions

Version History

  • 1f433f8 Current 2026-08-20 14:43

Same Skill Collection

.claude/skills/echo-development/SKILL.md
.claude/skills/laravel-query-builder/SKILL.md
.claude/skills/medialibrary-development/SKILL.md
.claude/skills/socialite-development/SKILL.md
.claude/skills/spatie-javascript/SKILL.md
.claude/skills/spatie-laravel-php/SKILL.md
.claude/skills/spatie-security/SKILL.md
.claude/skills/spatie-version-control/SKILL.md
.github/skills/custom-fields-development/SKILL.md
.github/skills/flowforge-development/SKILL.md
.claude/skills/agent-browser-relaticle/SKILL.md
.claude/skills/ai-sdk-development/SKILL.md
.claude/skills/business-review/SKILL.md
.claude/skills/cashier-stripe-development/SKILL.md
.claude/skills/configuring-horizon/SKILL.md
.claude/skills/fortify-development/SKILL.md
.claude/skills/infer-conventions/SKILL.md
.claude/skills/laravel-best-practices/SKILL.md
.claude/skills/livewire-development/SKILL.md
.claude/skills/mcp-development/SKILL.md
.claude/skills/passport-development/SKILL.md
.claude/skills/pest-testing/SKILL.md
.claude/skills/screenshot-with-callout/SKILL.md
.claude/skills/tailwindcss-development/SKILL.md
.github/skills/livewire-development/SKILL.md
.github/skills/manual-testing/SKILL.md
.github/skills/tailwindcss-development/SKILL.md

Metadata

Files
0
Version
1f433f8
Hash
c10c4008
Indexed
2026-08-20 14:43

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 10:24
浙ICP备14020137号-1 $방문자$