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-custom-api-endpointgit 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-custom-api-endpoint)<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-custom-api-endpoint"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-custom-api-endpoint/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-custom-api-endpoint"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-custom-api-endpoint.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.00039 | $0.01412 |
| Opus 5.5 | $0.00016 | $0.00565 |
| Sonnet 5.5 | $0.00008 | $0.00282 |
| Haiku 4.5 | $0.00004 | $0.00141 |
Grade A, and why
add-custom-api-endpoint 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What is this?
Use this skill for a custom API operation that does not fit the generic CRUD controller lifecycle, such as a profile operation, relationship action, or purpose-built lookup. Do not scaffold an entity, repository, resource, or CRUD controller unless the requested behavior actually needs those layers. For a complete CRUD feature, use add-rest-resource.
Follow the shared skill guidance, including repository instructions and AI rules.
Table of Contents ᐞ
Workflow ᐞ
- Inspect the closest custom controller and its HTTP test under
src/Controller/andtests/E2E/Controller/. Useful references includeProfile/IndexController,User/AttachUserGroupController, andUser/DeleteUserControllerfor authenticated profile and state-changing operations. For small service-backed operational endpoints, also inspectHealthzControllerwithtests/E2E/Controller/HealthzControllerTestandVersionControllerwithtests/E2E/Controller/VersionControllerTest. These illustrate focused controllers delegating to services, documenting a response, and testing HTTP behavior and relevant side effects (such as avoiding request-log rows). Check their current behavior before reusing a pattern. Read route configuration and affected services, DTOs, callers, and API metadata as needed. - Define the endpoint contract before implementation: route and HTTP method, path/query/body inputs, response status and shape, validation and error behavior, authorization, and side effects. Preserve compatibility where applicable. Ask before making unspecified choices that change the public API, access policy, or persistent data.
- Put a single custom endpoint action in a focused controller under
src/Controller/, normally using#[AsController], a route attribute, and__invoke. Use typed constructor injection and keep the controller at the HTTP boundary: coordinate the request and response, and delegate business rules or persistence orchestration to the appropriate existing resource or service. Do not add generic CRUD traits or duplicate behavior already owned by a resource. - Declare the intended HTTP methods and constrain route parameters where appropriate. Trace how route values become controller arguments, including entity resolution, and verify this against a nearby endpoint. Do not assume a route placeholder alone enforces the intended format or existence checks.
- For request data, use a DTO with Symfony Validator constraints when the
operation has structured or validated input. Keep accepted fields and
response exposure explicit; never return entities or sensitive properties
unintentionally. Inspect request-body handling before choosing how JSON is
mapped.
RestDtoValueResolveris for registered generic REST controller create/update/patch actions; do not assume it binds DTOs to custom__invokecontrollers. Follow add-api-dto-mapping when request mapping, DTO validation, or AutoMapper configuration changes. - Apply authorization explicitly at the endpoint or relevant service boundary using the established security attributes and voter patterns. Trace the actual caller identity, subject, and route argument binding; do not assume authentication alone permits the operation. Preserve existing firewall, role, voter, and access-control behavior. Follow implement-api-authentication for authentication or broad access-policy changes, and add-security-voter for subject-based permissions.
- Document the public API with the project's OpenAPI attributes where applicable: operation or tag, inputs, request body, success response shape, and relevant validation or authorization errors. Keep the documented contract aligned with the actual route and response serialization context. For shared serialization, formats, headers, or error envelopes, also use update-api-response-contract. For schema, security-description, or generation changes, also use update-api-documentation.
- Add or update an E2E HTTP test under
tests/E2E/Controller/that exercises the real route and relevant collaborators. Cover successful status and response shape, unauthenticated or forbidden callers as applicable, invalid inputs, and meaningful failure paths. For writes, assert persisted state or the resulting side effect, including idempotency or conflict behavior when part of the contract. Follow write-tests for test structure, fixtures, and runner conventions. - If the endpoint changes persisted entity structure, follow add-doctrine-entity for repository, resource, migration, and schema work. If it adds repository filtering or search behavior, also follow add-doctrine-query. Avoid those layers for endpoint-only behavior that does not require them.
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 · -4 lines 28929116e80c
- 16d ago Changed · -1 lines 2b10dec6e119
- 1mo ago Changed · +4 lines d5b41bae9c23
- 1mo ago First seen · 119 lines · 39 tokens per session scan A a04645717b92
add-custom-api-endpoint is a skill published in the GitHub repository tarlepp/symfony-flex-backend (286 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 1,412 once invoked, about $0.0002 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-custom-api-endpoint compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-custom-api-endpointtarlepp/symfony-flex-backend | Skill | 286 | yesterday | MIT | A | 39 | 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 |
| fastapiericrisco/rsc-harness | Skill | 695 | yesterday | MIT | A | 94 | 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 |