add-doctrine-entity

add-doctrine-entity is a skill for Claude Code, Codex from tarlepp/symfony-flex-backend. It costs 29 tokens per session (900 once invoked), scanned A, original, MIT.

A repository-specific workflow for adding or changing a Doctrine ORM entity, which is a PHP class mapped to a database table. It covers the entity's persistence mapping, repository, resource, migration, tests, and related conventions.

In plain words
What is it for?
Use it to add a persisted domain object or change its fields, relationships, timestamps, deletion behavior, or Doctrine mapping. It also guides the required migration and persistence tests.
Why use it?
Adding stored data involves more than creating a class: the database schema, application mapping, and tests must agree. This helps keep those changes consistent with the existing Symfony project.

Skill for Claude CodeCodex

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

Good fit Use it to add a persisted domain object or change its fields, relationships, timestamps, deletion behavior, or Doctrine mapping. It also guides the required migration and persistence tests.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/add-doctrine-entity"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/add-doctrine-entity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 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.00029 $0.00900
Opus 5.5 $0.00012 $0.00360
Sonnet 5.5 $0.00006 $0.00180
Haiku 4.5 $0.00003 $0.00090

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

Security

Grade A, and why

add-doctrine-entity 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-doctrine-entity/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 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 persisted domain entity or changing an existing entity's Doctrine mapping. In this repository, every entity must have a corresponding repository and resource. A CRUD REST endpoint, DTOs, and AutoMapper configuration are separate concerns and should be added when the requested behavior needs them.

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

Table of Contents ᐞ

Workflow ᐞ

  1. Inspect a similar entity and its tests under src/Entity/ and tests/ before choosing a mapping and persistence pattern.
  2. Confirm what the entity needs to support: REST input/output, relations, audit fields, and soft/hard deletion. Reuse an existing entity trait or shared pattern only when its behavior fits; do not add unrelated fields.
  3. Place the class in src/Entity/ and use Doctrine ORM PHP attributes. Persisted application entities normally implement App\Entity\Interfaces\EntityInterface; follow the existing UUID, timestamp, and blameable conventions where applicable. Check how the interface and traits behave before using them, and account for read-only or derived entities that have different requirements.
  4. Define column types, nullability, lengths, indexes, unique constraints, and relationship ownership explicitly and consistently with the schema. Use typed properties and methods. For relationships, update both sides only where the existing bidirectional association pattern requires it. Avoid accidental lazy-loading or serialization cycles.
  5. If entity properties are exposed through the API, add the appropriate Serializer groups and OpenAPI attributes following nearby entities. Keep API exposure intentional; do not expose sensitive fields. Put request validation constraints on the appropriate DTO as well as entity-level constraints only where existing patterns call for them.
  6. Generate a migration inside the PHP development container with bin/console doctrine:migrations:diff. Review the generated SQL and migration class for data safety, nullability, indexes, foreign keys, defaults, and reversible behavior. Edit the generated migration when needed. Never use doctrine:schema:update or hand-write ad hoc SQL to change a live schema. Do not run migrations against production.
  7. Add tests for entity behavior, ORM mapping, persistence, and relationships as applicable.
  8. Add a corresponding repository under src/Repository/, extending or following BaseRepository and its entity-specific typing conventions. Reuse the existing repository methods and traits; add custom queries only when the entity requires them. Follow add-doctrine-query for query-specific behavior and validation.
  9. Add a corresponding resource under src/Resource/, extending RestResource with the entity and repository types. Keep orchestration and business behavior in the resource, and use the existing resource lifecycle patterns where relevant. An entity's repository and resource are required even when it has no CRUD controller.
  10. If the request needs DTOs, request mapping, or a CRUD REST endpoint, follow add-rest-resource for those parts. Add these layers only when required by the requested behavior.

Read the full file on GitHub · 87 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 · -3 lines 3bad94b5efd7
  2. 16d ago Changed 09075d2c209d
  3. 17d ago Changed · +1 lines 177e89d58406
  4. 1mo ago Changed · +20 lines 9b4671fa2ad3
  5. 1mo ago Changed · +2 lines 413de4357fe7
  6. 1mo ago First seen · 67 lines · 29 tokens per session scan A 05d15e1f72d0

Subscribe to this mod's changes

add-doctrine-entity is a skill published in the GitHub repository tarlepp/symfony-flex-backend (286 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 900 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-doctrine-entity compared with skills from other repositories

add-doctrine-entity next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-doctrine-entitytarlepp/symfony-flex-backendSkill286yesterdayMITA29Claude 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