add-custom-api-endpoint

add-custom-api-endpoint is a skill for Claude Code, Codex from tarlepp/symfony-flex-backend. It costs 39 tokens per session (1,412 once invoked), scanned A, original, MIT.

A workflow for adding or changing a custom HTTP API endpoint that does not follow the usual create, read, update, and delete pattern. It covers the controller, URL routing, input objects, authorization, service logic, API documentation, and HTTP tests.

In plain words
What is it for?
Use it for operations such as profile actions, relationship changes, focused lookups, health checks, or version endpoints backed by a service.
Why use it?
It helps keep a purpose-built endpoint aligned with the repository's conventions without adding unnecessary database or CRUD layers. It also ensures the endpoint's access rules and HTTP behavior are documented and tested.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for operations such as profile actions, relationship changes, focused lookups, health checks, or version endpoints backed by a service.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tarlepp/symfony-flex-backend/add-custom-api-endpoint
Install

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.

Any agent
npx skills add tarlepp/symfony-flex-backend --skill add-custom-api-endpoint
Clone the repo
git clone --depth 1 https://github.com/tarlepp/symfony-flex-backend

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for add-custom-api-endpoint

README.md
[![agentmods](https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-custom-api-endpoint/github.svg)](https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-custom-api-endpoint)
Your own site
<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.

agentmods 80×15 button for add-custom-api-endpoint

Your own site · 80×15
<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>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,412 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 11d ago against content hash 28929116e80c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.github/skills/add-custom-api-endpoint/SKILL.md · 118 lines

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 ᐞ

  1. Inspect the closest custom controller and its HTTP test under src/Controller/ and tests/E2E/Controller/. Useful references include Profile/IndexController, User/AttachUserGroupController, and User/DeleteUserController for authenticated profile and state-changing operations. For small service-backed operational endpoints, also inspect HealthzController with tests/E2E/Controller/HealthzControllerTest and VersionController with tests/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.
  2. 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.
  3. 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.
  4. 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.
  5. 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. RestDtoValueResolver is for registered generic REST controller create/update/patch actions; do not assume it binds DTOs to custom __invoke controllers. Follow add-api-dto-mapping when request mapping, DTO validation, or AutoMapper configuration changes.
  6. 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.
  7. 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.
  8. 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.
  9. 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.

Read the full file on GitHub · 118 lines

Changes

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.

  1. 11d ago Changed · -4 lines 28929116e80c
  2. 16d ago Changed · -1 lines 2b10dec6e119
  3. 1mo ago Changed · +4 lines d5b41bae9c23
  4. 1mo ago First seen · 119 lines · 39 tokens per session scan A a04645717b92

Subscribe to this mod's changes

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.

Related

add-custom-api-endpoint compared with skills from other repositories

add-custom-api-endpoint next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-custom-api-endpointtarlepp/symfony-flex-backendSkill286yesterdayMITA39Claude Code, Codex
api-integration-architectsickn33/agentic-awesome-skillsSkill51kyesterdayMITA33Claude Code
dmrwemake-services/django-modern-restSkill1.6kyesterdayMITA80Claude Code, Codex
fastapiericrisco/rsc-harnessSkill695yesterdayMITA94Claude Code, Codex
api-connector-builderericrisco/rsc-harnessSkill695yesterdayMITA80Claude Code, Codex
dmr-openapi-skeletonwemake-services/django-modern-restSkill1.6kyesterdayMITA97Claude Code, Codex
dmr-from-dj-rest-authwemake-services/django-modern-restSkill1.6kyesterdayMITA67Claude Code, Codex