From playbooks-virtuoso
Reference for all 38 Symfony components covering APIs, configuration, best practices, and common pitfalls for PHP 8.3+ and Symfony 7.x.
How this skill is triggered — by the user, by Claude, or both
Slash command
/playbooks-virtuoso:symfony-componentsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Complete reference for all 38 Symfony components — patterns, APIs, configuration, and best practices for PHP 8.3+ and Symfony 7.x.
references/asset.mdreferences/browser-kit.mdreferences/cache.mdreferences/clock.mdreferences/config.mdreferences/console.mdreferences/contracts.mdreferences/css-selector.mdreferences/dependency-injection.mdreferences/dom-crawler.mdreferences/event-dispatcher.mdreferences/expression-language.mdreferences/filesystem.mdreferences/finder.mdreferences/form.mdreferences/http-foundation.mdreferences/http-kernel.mdreferences/intl.mdreferences/json-path.mdreferences/ldap.mdComplete reference for all 38 Symfony components — patterns, APIs, configuration, and best practices for PHP 8.3+ and Symfony 7.x.
foo.bar[baz]) → reference# services.yaml — most services are autowired automatically
services:
_defaults:
autowire: true
autoconfigure: true
App\:
resource: '../src/'
exclude: '../src/{DI,Entity,Kernel.php}'
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class ArticleController
{
#[Route('/articles/{id}', methods: ['GET'])]
public function show(int $id): Response
{
return new Response("Article $id");
}
}
use Symfony\Component\Messenger\MessageBusInterface;
class OrderService
{
public function __construct(private MessageBusInterface $bus) {}
public function place(Order $order): void
{
$this->bus->dispatch(new OrderPlaced($order->getId()));
}
}
$form = $this->createForm(ArticleType::class, $article);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$em->persist($form->getData());
$em->flush();
return $this->redirectToRoute('article_list');
}
use Symfony\Contracts\Cache\ItemInterface;
$value = $cache->get('products_list', function (ItemInterface $item) {
$item->expiresAfter(3600);
$item->tag(['products']);
return $this->repository->findAll();
});
$cache->invalidateTags(['products']);
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[AsCommand(name: 'app:process', description: 'Process items')]
class ProcessCommand extends Command
{
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Processing...');
return Command::SUCCESS;
}
}
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class OrderSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [OrderPlacedEvent::class => 'onOrderPlaced'];
}
public function onOrderPlaced(OrderPlacedEvent $event): void
{
// Handle event
}
}
if ($workflow->can($article, 'publish')) {
$workflow->apply($article, 'publish');
}
$lock = $factory->createLock('pdf-generation', ttl: 30);
if ($lock->acquire()) {
try {
generatePdf();
} finally {
$lock->release();
}
}
$cache->get()) over raw PSR-6 for stampede preventionnpx claudepluginhub krzysztofsurdy/code-virtuoso --plugin agents-virtuosoProvides Symfony framework reference with architecture patterns, DDD integration, clean architecture checklists, common violations, and antipatterns for auditing PHP projects.
Guides Symfony developers via decision tree to select UX tools like Stimulus, Turbo, TwigComponent, LiveComponent for interactive, server-rendered frontends with minimal JS.
Builds and refactors Symfony UX Twig Components with handling for props, slots, anonymous components, and CVA. Provides architectural workflow, checkpoints, and risk controls.