add-rest-resource

add-rest-resource is a skill for Claude Code, Codex from tarlepp/symfony-flex-backend. It costs 28 tokens per session (946 once invoked), scanned A, original, MIT.

A Symfony workflow for adding or extending a CRUD REST resource, meaning an API endpoint that can create, read, update, and delete data. It connects entities, data-transfer objects, repositories, resources, controllers, validation, mapping, migrations, and tests using the repository's patterns.

In plain words
What is it for?
Use it to add a CRUD API resource or change its fields, responses, inputs, behavior, routes, roles, or persistence. It guides Doctrine migrations and tests for the endpoint and related data.
Why use it?
A REST feature crosses database, API input and output, validation, routing, and permissions. This helps keep those layers aligned instead of creating a separate or inconsistent implementation.

Skill for Claude CodeCodex

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

Good fit Use it to add a CRUD API resource or change its fields, responses, inputs, behavior, routes, roles, or persistence. It guides Doctrine migrations and tests for the endpoint and related data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tarlepp/symfony-flex-backend/add-rest-resource
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-rest-resource
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-rest-resource

README.md
[![agentmods](https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-rest-resource/github.svg)](https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-rest-resource)
Your own site
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-rest-resource"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-rest-resource/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-rest-resource

Your own site · 80×15
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-rest-resource"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-rest-resource.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 946 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.00028 $0.00946
Opus 5.5 $0.00011 $0.00378
Sonnet 5.5 $0.00006 $0.00189
Haiku 4.5 $0.00003 $0.00095

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

Security

Grade A, and why

add-rest-resource 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-rest-resource/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 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 a CRUD API resource or extending an existing resource's input, output, or behavior.

Follow the shared skill guidance, including repository instructions and AI rules.

Table of Contents ᐞ

Workflow ᐞ

  1. Inspect the target endpoint's tests and a complete nearby feature. ApiKey is one reference implementation; confirm its patterns against current code before reusing them. Check existing routes, role requirements, DTO conventions, and migrations before editing.
  2. Keep the change within the existing vertical-slice architecture: Entity -> DTO / AutoMapper -> Repository -> Resource -> Controller. Extend an existing class or pattern where appropriate; do not create a parallel abstraction.
  3. For a persistence change, update the entity using Doctrine attributes and existing entity interfaces/traits. Add serialization groups and Symfony Validator constraints consistent with the field's API exposure and validation needs. Generate and review a Doctrine migration; do not use doctrine:schema:update or hand-write schema changes. Follow add-doctrine-entity for entity changes; every entity requires a corresponding repository and resource.
  4. Define API input/output through DTOs in src/DTO/. Follow the existing RestDto patterns, validation constraints, and patch/visited-field behavior. Update src/AutoMapper/ request mapping and configuration when request values need conversion (for example, resolving related entity IDs to entity references). Follow add-api-dto-mapping for the detailed DTO, validation, mapping, and argument-resolution workflow. Do not expose entities directly in responses.
  5. Add or update the repository in src/Repository/, following BaseRepository conventions and entity generics. Keep query/data-access behavior there; put orchestration and business rules in a resource or service. Follow add-doctrine-query for custom queries, filtering, search, sorting, pagination, and database tests.
  6. Add or update the resource in src/Resource/, extending RestResource and preserving its entity/repository types. Reuse lifecycle callbacks and repository helpers where they fit instead of duplicating generic CRUD behavior.
  7. Add or update the controller and route using the closest existing endpoint pattern. Generic CRUD endpoints commonly extend App\Rest\Controller, use role-specific action traits, map create/update/patch methods to their DTO classes, and apply explicit route and authorization attributes. Keep access checks at least as restrictive as the intended API policy. Use a custom __invoke controller only when that matches the endpoint's existing style.
  8. Exercise the changed actions through HTTP. Assert successful response status, shape, and field exposure, plus validation failures and permitted/denied callers where affected. For writes, verify persisted state and create/update/patch differences rather than only a successful status. Update fixtures only when the tests need the new data.

Read the full file on GitHub · 89 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 · -1 lines 9296ceaf4b20
  2. 16d ago Changed · -2 lines a424aaac8903
  3. 17d ago Changed · +2 lines b425b5037f84
  4. 1mo ago Changed · +7 lines d7658d42da3a
  5. 1mo ago Changed · +20 lines c6b336a5ab78
  6. 1mo ago Changed · +3 lines ac41195641fe
  7. 1mo ago First seen · 60 lines · 28 tokens per session scan A 1b201761ec65

Subscribe to this mod's changes

add-rest-resource is a skill published in the GitHub repository tarlepp/symfony-flex-backend (286 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 946 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-18.

Related

add-rest-resource compared with skills from other repositories

add-rest-resource next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-rest-resourcetarlepp/symfony-flex-backendSkill286yesterdayMITA28Claude Code, Codex
horse-database-poolingHashLoad/horseSkill1.4k23d agoMITA30Claude Code, Codex
flapi-restDataZooDE/flapiSkill756d agononeA116Claude Code
flapi-setupDataZooDE/flapiSkill756d agononeA133Claude Code
flapi-cache-designDataZooDE/flapiSkill756d agononeB150Claude Code
api-platform-performancegerard-labs/superpowers-api-platformSkill26mo agoMITA0Claude Code
doctrine-fetch-modesgerard-labs/superpowers-api-platformSkill26mo agoMITA130Claude Code