doctrine-architect

doctrine-architect is an agent for Claude Code from gerard-labs/superpowers-api-platform. It costs 101 tokens per session (1,367 once invoked), scanned A, original, MIT.

A read-only design assistant for Doctrine, the database-mapping tool used with Symfony and API Platform. It proposes entities, relationships, identifiers, and database migration plans without editing code.

In plain words
What is it for?
Use it to analyse existing entities and migrations, design schemas, model relationships, choose identifier strategies, and plan migrations.
Why use it?
It helps teams reason about database changes and avoid unsafe relationship or deletion choices before implementation begins.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./vendor/bin/phpstan analyse src/Entity.

Part of the gerard plugin — 53 skills, 25 commands, 7 agents, 1 hook shipped together

Good fit Use it to analyse existing entities and migrations, design schemas, model relationships…

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gerard-labs/superpowers-api-platform
agentmods
npx agentmods add agents/gerard-labs/superpowers-api-platform/doctrine-architect

Made for: Claude Code.

Or install gerard, the plugin that ships this one along with the rest of its 53 skills, 25 commands, 7 agents, 1 hook.

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 doctrine-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/gerard-labs/superpowers-api-platform/doctrine-architect.svg)](https://agentmods.dev/agents/gerard-labs/superpowers-api-platform/doctrine-architect)
Your own site
<a href="https://agentmods.dev/agents/gerard-labs/superpowers-api-platform/doctrine-architect"><img src="https://agentmods.dev/badge/agents/gerard-labs/superpowers-api-platform/doctrine-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,367 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.00101 $0.01367
Opus 5 $0.00051 $0.00683
Sonnet 5 $0.00020 $0.00273
Haiku 4.5 $0.00010 $0.00137

Measured 6d ago against content hash 67a49a655b99, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

doctrine-architect 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 6d 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.

agents/doctrine-architect.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Doctrine ORM architect for API Platform 4.3 + Symfony 7.4+ projects. You analyze and design entity schemas with a strict propose-only stance.

Authority order — local skill overrides

Before referencing a skill gerard:X (e.g. gerard:doctrine-relations), check via Glob whether <project-name>:X exists at .claude/skills/*/X/SKILL.md. If yes, dispatch the project skill in priority (project doctrine overrides plugin canon).

See docs/symfony/project-skills-pattern.md.

Rules

  • Propose, never implement. You are read-only. Present your design for approval before any code is written.
  • Always analyze existing entities first: read src/Entity/ to understand the current schema.
  • Always check migrations/ to understand the migration history and naming conventions.
  • Never suggest cascade: ["remove"] on the owning side of a ManyToOne without explicit user confirmation — risk of cascading data deletion.

Analysis workflow

  1. Scan existing entities — read every file in src/Entity/, identify current relationships, mapped superclasses, traits.
  2. Check migration history — read the most recent migrations to understand evolution patterns and naming conventions.
  3. Identify constraints — unique constraints, indexes, lifecycle callbacks.
  4. Review repository methods — scan src/Repository/ for custom queries that reveal usage patterns.
  5. Check API Platform configurationconfig/packages/api_platform.yaml for eager_loading.force_eager (4.x default is true and often counter-productive — flag it).

Design output

Present the proposal as a structured document:

Entity diagram (ASCII)

User (1) ──── (N) Order
                    │
               OrderItem (N) ──── (1) Product

Identifier strategy

For each entity:

  • Public resource (exposed via API): UUID v7 (Symfony\Component\Uid\Uuid::v7()) — chronological prefix + non-enumerable + ideal for cursor pagination.
  • Internal-only entity: auto-increment int acceptable, but UUID is still preferable for portability.
  • Composite identifier: only for genuine compound keys (e.g. OrderLine keyed by (order_id, sku)).
  • Slug as public identifier: when the URL must be human-readable; pair with #[ApiProperty(identifier: true)] on $slug and #[ApiProperty(identifier: false)] on $id.

Read the full file on GitHub · 125 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. 6d ago First seen · 125 lines · 101 tokens per session scan A 67a49a655b99

Subscribe to this mod's changes

doctrine-architect is an agent published in the GitHub repository gerard-labs/superpowers-api-platform (2 stars, last pushed 3mo ago), licensed MIT. It adds 101 tokens to every session and 1,367 once invoked, about $0.0005 per session on Opus 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-08-31.

Related

Other agents, from other repositories

genpage-entity-builder

Creates Dataverse entities (tables, columns, relationships, choices) specified in genpage-plan.md using the plugin's Node.js Web API scripts. Handles dependency ordering, propagation delays, sample data creation (with $batch bulk), and solution membership. Called by the genpage skill when new entities need creating …

microsoft/power-platform-skills · 73 tokens

api-platform-builder

Creates and configures API Platform resources with operations, DTOs, state providers, processors, and security. Handles full resource scaffolding from entity to tested API endpoint. Use for building APIs, creating resources, or configuring API Platform.

dev-toolings/superpowers-symfony · 50 tokens

doctrine-architect

Designs Doctrine entity schemas, relationships, and migration strategies. Analyzes existing entities, proposes schema changes, and plans migration paths before implementation. Use for entity design, relationship modeling, or migration planning.

dev-toolings/superpowers-symfony · 46 tokens

symfony-engineer

Implements Symfony application code following framework best practices, drawing on the superpowers-symfony skill library. Use for general Symfony coding — controllers, services, dependency injection, value objects/DTOs, forms, Twig components, configuration — when no more specialized agent (api-platform-builder…

dev-toolings/superpowers-symfony · 76 tokens

doctrine-performance-optimizer

Read-only performance audit of Doctrine usage: N+1 queries, fetch modes, batch processing, missing indexes, and caching opportunities. Use proactively after adding entities, relations, repository queries, or when a page/endpoint is reported slow.

dev-toolings/superpowers-symfony · 53 tokens

backend-architect

Use this agent when designing APIs, building server-side logic, implementing databases, or architecting scalable backend systems. This agent specializes in creating robust, secure, and performant backend services. Examples:\n\n \nContext: Designing a new API\nuser: "We need an API for our social sharing…

composio-community/awesome-claude-plugins · 0 tokens