symfony
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Symfony assistance covering PHP HTTP kernel, Twig, Doctrine ORM, services, and MakerBundle. Use when building enterprise PHP applications and web services.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- 1tomany/agent-skillstheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- 1tomany/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 143
Write custom repository query builders:
- Very specific: line 177
Run bin/console lint:container and bin/console lint:yaml in CI/CD pipelines.
- Distinctive: line 182
Put business logic inside controllers.
- Very specific: line 183
Run cache:clear directly on active production traffic.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Symfony
Symfony is a decoupled, reusable PHP framework and set of components, emphasizing strict typing, PHP Attributes, and enterprise application architecture.
When to Use
- Enterprise PHP Web Applications & APIs: High-performance backend architectures adhering strictly to design patterns.
- Modular Enterprise Microservices: Decoupled Symfony Components (HTTP Kernel, Console, Messenger, Serializer).
- Asynchronous Message Queue Processing: Handling event-driven message architectures with Symfony Messenger.
- REST & GraphQL with API Platform: Auto-generating compliant JSON:API and OpenAPI backends.
Quick Start
// src/Controller/ApiController.php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Attribute\Route;
class ApiController extends AbstractController
{
#[Route('/api/status', name: 'api_status', methods: ['GET'])]
public function status(): JsonResponse
{
return $this->json(['status' => 'operational', 'framework' => 'symfony']);
}
}Core Concepts
Modern Attribute Routing & Dependency Injection
Writing controllers with PHP 8.2+ native attributes:
namespace App\Controller;
use App\Repository\CustomerRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route('/api/v1/customers', name: 'api_customers_')]
class CustomerController extends AbstractController
{
public function __construct(
private readonly CustomerRepository $customerRepository
) {}
#[Route('/{id}', name: 'show', methods: ['GET'])]
public function show(int $id): JsonResponse
{
$customer = $this->customerRepository->find($id);
if (!$customer) {
return $this->json(['error' => 'Customer not found'], Response::HTTP_NOT_FOUND);
}
return $this->json($customer);
}
}Doctrine ORM Entities & Attributes
Mapping database tables with native PHP attributes:
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity]
#[ORM\Table(name: 'orders')]
class Order
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Assert\NotBlank]
private string $reference;
#[ORM\Column(type: 'decimal', precision: 10, scale: 2)]
#[Assert\Positive]
private string $totalAmount;
public function getId(): ?int { return $this->id; }
public function getReference(): string { return $this->reference; }
public function setReference(string $ref): self { $this->reference = $ref; return $this; }
public function getTotalAmount(): string { return $this->totalAmount; }
public function setTotalAmount(string $amount): self { $this->totalAmount = $amount; return $this; }
}Symfony Messenger for Async Processing
Decoupled message dispatching and handling:
namespace App\Message;
class ProcessInvoiceMessage
{
public function __construct(public readonly int $orderId) {}
}
// In Message Handler:
namespace App\MessageHandler;
use App\Message\ProcessInvoiceMessage;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler]
class ProcessInvoiceHandler
{
public function __invoke(ProcessInvoiceMessage $message): void
{
// Handle background invoice generation
}
}Common Patterns
Doctrine Entity Repository with Custom DQL Query
Problem: Generic find() methods unable to execute efficient joined queries.
Solution: Write custom repository query builders:
namespace App\Repository;
use App\Entity\Product;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
class ProductRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Product::class);
}
public function findTopInStock(int $limit = 10): array
{
return $this->createQueryBuilder('p')
->andWhere('p.stock > 0')
->orderBy('p.createdAt', 'DESC')
->setMaxResults($limit)
->getQuery()
->getResult();
}
}Best Practices
Do:
- Target Symfony 7+ using PHP 8.2+ native attributes for routing, entities, and validation.
- Utilize Symfony Messenger for all asynchronous and queue-based background processing.
- Run
bin/console lint:containerandbin/console lint:yamlin CI/CD pipelines. - Configure Symfony Cache with Redis for high-traffic session and doctrine result caching.
Don't:
- Put business logic inside controllers; encapsulate workflows in domain services.
- Run
cache:cleardirectly on active production traffic; warm up cache in a staging release directory. - Disable CSRF protection on state-changing web form submissions.
Troubleshooting
| Error | Cause | Solution |
ServiceNotFoundException: You have requested a non-existent service | Service not autowired or missing in config/services.yaml. | Ensure class is in src/ and check autowiring in services.yaml. |
No route found for "GET /path" | Route attribute missing or cache stale. | Clear Symfony cache: php bin/console cache:clear. |
DriverException: An exception occurred in the driver: Access denied | Database credentials incorrect in .env or DATABASE_URL. | Update .env.local with valid database host, username, and password. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

