agentleFS
wachterjohanneswachterjohannes/symfony-skills/skills/components/SKILL.md

components

Skill4 starsChanged 2 months agoMITView on GitHub

Use before hand-writing infrastructure or utilities such as a lock, a queue, a cache, an HTTP client, mail, scheduling, rate limiting, shell commands, slugs or file searches, or before adding a third-party library for one of these.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before hand-writing infrastructure, or adding a third-party library for it, check whether a Symfony component covers it.

    line 11
  2. Very specific:

    Check symfony.lock first; the project may already have it.

    line 36

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reach for the component

Before hand-writing infrastructure, or adding a third-party library for it, check whether a Symfony component covers it. It usually does. The check costs one look; the hand-rolled version costs whoever maintains it.

The map

The task needsThe component
a job that must not run twice at oncesymfony/lock: LockFactory, or LockableTrait in a command
work moved off the requestsymfony/messenger: a message class, #[AsMessageHandler], an async transport
recurring jobs defined in PHPsymfony/scheduler
calling an HTTP APIsymfony/http-client: HttpClientInterface, one scoped client per API
caching a computed valuesymfony/cache: CacheInterface::get() with a callback
sending mailsymfony/mailer: MailerInterface, an Email object
throttling logins or API callssymfony/rate-limiter
a status field with rules about transitionssymfony/workflow
unique identifierssymfony/uid: Uuid or Ulid
time you need to control in testssymfony/clock: ClockInterface, ClockAwareTrait
running an external programsymfony/process: Process, never exec() or shell_exec()
a URL-safe slug from a titlesymfony/string: SluggerInterface, not a preg_replace chain
mapping JSON or arrays to objectssymfony/serializer
finding files by pattern or agesymfony/finder: Finder, not a hand-rolled recursive iterator

Using one

Check symfony.lock first; the project may already have it. If not:

symfony composer require symfony/lock

The Flex recipe wires the default configuration. Do not copy configuration by hand from a blog post when a recipe exists.

This is not a rule to use every component. It is an order of operations: look first, write code second. A while loop polling a database column is not a queue, a static array is not a cache, and a timestamp column checked before sending is not a lock.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.