create-feature-flags
Generates feature flag implementations for PHP projects. Creates flag services, configuration, percentage rollouts, user targeting, and integration with deployment pipelines.
Works with
---
name: create-feature-flags
description: Generates feature flag implementations for PHP projects. Creates flag services, configuration, percentage rollouts, user targeting, and integration with deployment pipelines.
license: MIT
---
# Feature Flag Generator
Generates feature flag implementation for progressive deployments.
## Feature Flag Service Interface
```php
<?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;
}
```
## Feature Configuration DTO
```php
<?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.
## Generation Instructions
1. **Choose storage backend:**
- In-memory (config file)
- Redis (dynamic updates)
- Database (audit trail)
- External service (LaunchDarkly, etc.)
2. **Define flag types:**
- Boolean (on/off)
- Percentage rollout
- User targeting
- A/B variants
3. **Integrate with framework:**
- Middleware for request context
- Twig extension for templates
- Service for business logic
4. **Set up CI/CD integration:**
- Environment-based defaults
- Dynamic update endpoints
- Rollback capabilities
## Usage
Provide:
- Storage backend preference
- Framework (Symfony, Laravel, etc.)
- Flag types needed
- CI/CD platform
The generator will:
1. Create interface and implementation
2. Add configuration loader
3. Integrate with framework
4. Set up CI/CD hooksMore Deployment & CI/CD skills
azure-enterprise-infra-planner
microsoft/azure-skills
Architect and provision enterprise Azure infrastructure from workload descriptions. For cloud architects and platform engineers planning networking, identity, security, compliance, and multi-resource topologies with WAF alignment. Generates Bicep or Terraform directly (no azd). WHEN: 'plan Azure infrastructure', 'architect Azure landing zone', 'design hub-spoke network', 'plan multi-region DR topology', 'set up VNets firewalls and private endpoints', 'subscription-scope Bicep deployment', 'Azure Backup for VM workloads'. PREFER azure-prepare FOR app-centric workflows.
azure-kubernetes-app-deploy
microsoft/azure-skills
Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.
finetuning
microsoft/azure-skills
Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

