Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

symfony-componentssymfony 组件

Agent Skill

symfony-components 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,812

周安装

74

GitHub Stars

16

下载量

580
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:symfony-components(symfony 组件)
来源仓库:https://github.com/krzysztofsurdy/code-virtuoso
仓库路径:skills/symfony-components
安装命令:
npx skills add https://github.com/krzysztofsurdy/code-virtuoso --skill symfony-components
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/krzysztofsurdy/code-virtuoso --skill symfony-components

简介

symfony-components 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于代码库分析、组件文档查询或技术方案调研等研究检索类任务场景。
  • 通过关键词、任务描述或来源线索触发检索,返回结构化候选信息供进一步核验。
  • 安装命令为 npx skills add https://github.com/krzysztofsurdy/code-virtuoso --skill symfony-components。
  • 使用前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。

SKILL.md

Symfony Components

Complete reference for all 38 Symfony components — patterns, APIs, configuration, and best practices for PHP 8.3+ and Symfony 7.x.

Component Index

HTTP & Runtime

  • HttpFoundation — Object-oriented HTTP requests/responses replacing PHP globals → reference
  • HttpKernel — Request handling, kernel events, controller resolution, middleware → reference
  • PSR-7 Bridge — Bidirectional HttpFoundation ↔ PSR-7 conversion → reference
  • Runtime — Decoupled bootstrapping for multiple runtime environments → reference

Messaging

  • Messenger — Sync/async message buses, transports (AMQP, Redis, Doctrine), middleware, envelopes → reference

Console

  • Console — CLI commands, input/output handling, helpers, formatters, progress bars → reference

Dependency Injection

  • DependencyInjection — Service container, autowiring, compiler passes, tagged services → reference
  • Contracts — Decoupled abstractions for interoperability (Cache, EventDispatcher, HttpClient, etc.) → reference

Forms & Validation

  • Form — Form creation, field types, events, data transformers, collections, theming → reference
  • Validator — JSR-303 constraints, custom validators, groups, severity levels → reference
  • OptionsResolver — Option configuration with defaults, validation, normalization, nesting → reference

Cache, Lock & Semaphore

  • Cache — PSR-6/PSR-16 adapters, tag-based invalidation, stampede prevention → reference
  • Lock — Exclusive resource locking across processes/servers (Redis, PostgreSQL, file) → reference
  • Semaphore — Concurrent access with configurable limits (Redis, DynamoDB) → reference

Events & Workflow

  • EventDispatcher — Observer/Mediator patterns, listeners, subscribers, priorities → reference
  • Workflow — State machines, workflow transitions, guards, metadata, events → reference

Configuration & Expressions

  • Config — Configuration loading, validation, caching, tree building, bundle config → reference
  • ExpressionLanguage — Safe expression sandbox for business rules, validation, security → reference
  • Yaml — YAML parsing, dumping, linting with full data type support → reference

Filesystem, Finder & Process

  • Filesystem — Platform-independent file/directory operations, atomic writes, path utils → reference
  • Finder — File search with fluent criteria (name, size, date, depth, content) → reference
  • Process — Secure system command execution, async processes, output streaming → reference

Serialization & Types

  • PropertyAccess — Read/write objects and arrays via string paths (foo.bar[baz]) → reference
  • PropertyInfo — Property metadata extraction (types, access, descriptions) → reference
  • TypeInfo — PHP type extraction, resolution, and validation → reference
  • VarDumper — Enhanced variable debugging with HTML/CLI formatters → reference
  • VarExporter — Export PHP data to OPcache-optimized code, lazy ghost/proxy objects → reference

Testing

  • BrowserKit — Simulated browser for programmatic HTTP, cookies, history → reference
  • DomCrawler — HTML/XML traversal, CSS selectors, form automation → reference
  • CssSelector — CSS-to-XPath conversion for DOM querying → reference
  • PHPUnit Bridge — Deprecation reporting, time/DNS mocking, parallel tests → reference

Data & Text Utilities

  • Uid — UUID (v1–v8) and ULID generation, conversion, Doctrine integration → reference
  • Clock — Testable time abstraction with MockClock and DatePoint → reference
  • Intl — Internationalization data (languages, countries, currencies, timezones) → reference
  • JsonPath — RFC 9535 JSONPath queries on JSON structures → reference
  • Mime — MIME message creation for emails and content types → reference
  • Ldap — LDAP/Active Directory connections, queries, and management → reference
  • Asset — URL generation and versioning for web assets → reference

Quick Patterns

Dependency Injection (Autowiring)

# services.yaml — most services are autowired automatically
services:
    _defaults:
        autowire: true
        autoconfigure: true
    App\:
        resource: '../src/'
        exclude: '../src/{DI,Entity,Kernel.php}'

Define a Route + Controller

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");
    }
}

Dispatch a Message (Async)

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()));
    }
}

Create and Validate a Form

$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');
}

Cache with Tags

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']);

Console Command

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;
    }
}

Event Subscriber

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
    }
}

Workflow Transition

if ($workflow->can($article, 'publish')) {
    $workflow->apply($article, 'publish');
}

Lock a Resource

$lock = $factory->createLock('pdf-generation', ttl: 30);
if ($lock->acquire()) {
    try {
        generatePdf();
    } finally {
        $lock->release();
    }
}

Best Practices

  • Target PHP 8.3+ and Symfony 7.x with strict typing
  • Use attributes over YAML/XML for routes, commands, message handlers, event listeners
  • Prefer autowiring — only register services manually when configuration is needed
  • Use Cache Contracts ($cache->get()) over raw PSR-6 for stampede prevention
  • Apply validation groups to support multiple form contexts
  • Use state machines by default; use workflows only when parallel states are needed
  • Create custom constraints for business logic that can't be expressed with built-in ones
  • Mock time and DNS in tests using PHPUnit Bridge for deterministic results

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.55%
按下载量换算195

Claude

31.09%
按下载量换算180

Cursor

17.84%
按下载量换算103

Gemini CLI

8.58%
按下载量换算50

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills