Generates feature flag implementations for PHP projects. Creates flag services, configuration, percentage rollouts, user targeting, and integration with deployment pipelines.
From accnpx claudepluginhub dykyi-roman/awesome-claude-code --plugin accThis skill uses the workspace's default tool permissions.
references/templates.mdGenerates feature flag implementation for progressive deployments.
<?php
// src/Infrastructure/FeatureFlag/FeatureFlagServiceInterface.php
declare(strict_types=1);
namespace App\Infrastructure\FeatureFlag;
interface FeatureFlagServiceInterface
{
/**
* Check if a feature is enabled globally.
*/
public function isEnabled(string $feature): bool;
/**
* Check if a feature is enabled for a specific user.
*/
public function isEnabledForUser(string $feature, string $userId): bool;
/**
* Check if a feature is enabled based on percentage rollout.
*/
public function isEnabledForPercentage(string $feature, string $identifier): bool;
/**
* Get the variant for A/B testing.
*/
public function getVariant(string $feature, string $userId): string;
/**
* Get all enabled features for a user.
*/
public function getEnabledFeatures(string $userId): array;
}
<?php
// src/Infrastructure/FeatureFlag/FeatureConfig.php
declare(strict_types=1);
namespace App\Infrastructure\FeatureFlag;
final readonly class FeatureConfig
{
/**
* @param string[] $allowedUsers
* @param string[] $blockedUsers
* @param string[] $variants
* @param array<string, mixed> $metadata
*/
public function __construct(
public string $name,
public bool $enabled = false,
public ?int $percentage = null,
public array $allowedUsers = [],
public array $blockedUsers = [],
public array $variants = [],
public array $metadata = [],
) {}
/**
* @param array<string, mixed> $data
*/
public static function fromArray(array $data): self
{
return new self(
name: $data['name'],
enabled: $data['enabled'] ?? false,
percentage: $data['percentage'] ?? null,
allowedUsers: $data['allowed_users'] ?? [],
blockedUsers: $data['blocked_users'] ?? [],
variants: $data['variants'] ?? [],
metadata: $data['metadata'] ?? [],
);
}
}
See references/templates.md for: InMemory implementation, YAML configuration, Config Loader, Attribute, Middleware, Twig Extension, Template usage, CI/CD integration, Redis implementation.
Choose storage backend:
Define flag types:
Integrate with framework:
Set up CI/CD integration:
Provide:
The generator will:
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.