Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tarlepp/symfony-flex-backend --skill add-validation-constraintgit clone --depth 1 https://github.com/tarlepp/symfony-flex-backendWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-validation-constraint)<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-validation-constraint"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-validation-constraint/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-validation-constraint"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-validation-constraint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.01142 |
| Opus 5.5 | $0.00012 | $0.00457 |
| Sonnet 5.5 | $0.00006 | $0.00228 |
| Haiku 4.5 | $0.00003 | $0.00114 |
Grade A, and why
add-validation-constraint scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What is this?
Use this skill when adding or changing a project-specific Symfony validation
rule under src/Validator/Constraints/. For using constraints on API DTOs, also
follow add-api-dto-mapping; a custom constraint
does not require changing a DTO if its validation scope is elsewhere.
Follow the shared skill guidance, including repository instructions and AI rules.
Table of Contents ᐞ
Workflow ᐞ
- Inspect the relevant DTO or domain object, existing constraint and validator
pairs under
src/Validator/Constraints/, and nearby tests undertests/Integration/Validator/Constraints/. Examples includeLocale/LocaleValidator,Timezone/TimezoneValidator, andUniqueUsername/UniqueUsernameValidator. Check their current behavior and the installed Symfony Validator APIs before applying a pattern. - Define the rule's scope and contract: property or class level, supported input types, null/blank behavior, groups, violation message and parameters, error code, and any service or repository lookup. Ask before choosing unspecified validation semantics that change accepted input or API errors.
- Implement the constraint as a
Constraintsubclass inApp\Validator\Constraints. Declare its PHP attribute target to match the intended scope. For class-level validation, implementgetTargets()as needed. Define stable message and error-code constants and map the code inERROR_NAMES, following current local conventions. If the constraint has options, use a typed constructor compatible with Symfony's base constructor; preserve options, groups, and payload behavior. - Implement the matching
*Validatoras aConstraintValidatorin the same namespace. Inject required collaborators through the constructor and use the existingApp\autowiring/autoconfiguration rather than manual instantiation or redundant service tags. Verify Symfony's validator discovery and naming behavior when using a non-default validator class. - Keep validation focused on the rule. Define deliberately how
nullor blank values are handled; optionality and requiredness usually belong to separate constraints such asNotBlank. Validate supported value types explicitly: throw Symfony'sUnexpectedTypeExceptionfor the wrong constraint andUnexpectedValueExceptionfor incompatible values when that is the intended contract. Do not silently cast, normalize, or accept malformed input unless the rule explicitly defines that behavior. - Add violations through the validator context using the declared message, parameters, and error code. Avoid leaking secrets or unnecessary personal or persisted data through violation messages, logs, or parameters. Surface collaborator failures according to the repository's error-handling conventions; do not convert infrastructure failures into a valid result or a misleading validation violation.
- Add tests for valid and invalid values, null/blank and unsupported types
where relevant, and the exact violation message/code/parameters. If the
validator uses a repository or service, test the rule's observable behavior
with controlled collaborator responses. Also verify the constraint through
Symfony's configured Validator service when service discovery, constraint
mapping, or dependency injection matters; direct calls to
validateInContextalone do not prove framework wiring. - For DTO usage, place the constraint on the correct field or class and preserve operation-specific validation groups and create/update/patch behavior. Follow add-api-dto-mapping for request mapping, DTO validation, and HTTP-boundary coverage when the API contract changes. Keep entity validation separate from request DTO validation unless the existing domain behavior requires both.
- Update API error documentation or other existing documentation when the externally observable validation contract changes. Do not add a migration unless persisted entity structure changes; follow the entity skill when it does.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · -1 lines 0bbb01c6ffa4
- 16d ago Changed · -1 lines 5478ccff60b8
- 1mo ago First seen · 104 lines · 31 tokens per session scan A 8e850e1039b2
add-validation-constraint is a skill published in the GitHub repository tarlepp/symfony-flex-backend (286 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 1,142 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.
add-validation-constraint compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-validation-constrainttarlepp/symfony-flex-backend | Skill | 286 | yesterday | MIT | A | 31 | Claude Code, Codex |
| api-integration-architectsickn33/agentic-awesome-skills | Skill | 51k | yesterday | MIT | A | 33 | Claude Code |
| dmrwemake-services/django-modern-rest | Skill | 1.6k | yesterday | MIT | A | 80 | Claude Code, Codex |
| api-connector-builderericrisco/rsc-harness | Skill | 695 | yesterday | MIT | A | 80 | Claude Code, Codex |
| dmr-openapi-skeletonwemake-services/django-modern-rest | Skill | 1.6k | yesterday | MIT | A | 97 | Claude Code, Codex |
| dmr-from-dj-rest-authwemake-services/django-modern-rest | Skill | 1.6k | yesterday | MIT | A | 67 | Claude Code, Codex |
| dmr-from-drfwemake-services/django-modern-rest | Skill | 1.6k | yesterday | MIT | A | 69 | Claude Code, Codex |