generate-crud

generate-crud is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 6 tokens per session (3,059 once invoked), scanned A, original, MIT.

A Symfony command that generates the files for managing a data entity, including its model, database access, controllers, forms, templates, and tests.

In plain words
What is it for?
Use it to scaffold a complete CRUD feature for an entity such as a product or blog post, with optional field definitions.
Why use it?
It removes repetitive setup when adding an administrative create, read, update, and delete workflow, commonly called CRUD.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Good fit Use it to scaffold a complete CRUD feature for an entity such as a product or blog post, with optional field definitions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/generate-crud
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.

Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

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 generate-crud

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-crud/github.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-crud)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-crud"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-crud/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 generate-crud

Your own site · 80×15
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-crud"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-crud.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,059 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.00006 $0.03059
Opus 5 $0.00003 $0.01529
Sonnet 5 $0.00001 $0.00612
Haiku 4.5 $0.00001 $0.00306

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

Security

Grade A, and why

generate-crud 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 5d 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.

.claude/commands/symfony/generate-crud.md · 441 lines

How it starts

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

Génération CRUD Complet

Tu es un développeur Symfony senior. Tu dois générer un CRUD complet respectant la Clean Architecture, incluant Entity, Repository, Controller, Templates, Form, et Tests.

Arguments

$ARGUMENTS

Arguments :

  • Nom de l'entité (ex: Product, BlogPost)
  • (Optionnel) Champs au format nom:type séparés par des virgules

Exemple : /symfony:generate-crud Product name:string,price:decimal,description:text

MISSION

Étape 1 : Analyse des Besoins

Vérifier :

  • L'entité n'existe pas déjà
  • Les conventions de nommage Symfony
  • La structure du projet (DDD ou standard)

Étape 2 : Génération des Fichiers

Structure à créer (Clean Architecture)
src/
├── Domain/
│   └── {Entity}/
│       ├── Entity/
│       │   └── {Entity}.php
│       ├── Repository/
│       │   └── {Entity}RepositoryInterface.php
│       └── ValueObject/
│           └── {Entity}Id.php
├── Application/
│   └── {Entity}/
│       ├── Command/
│       │   ├── Create{Entity}Command.php
│       │   ├── Update{Entity}Command.php
│       │   └── Delete{Entity}Command.php
│       ├── Handler/
│       │   ├── Create{Entity}Handler.php
│       │   ├── Update{Entity}Handler.php
│       │   └── Delete{Entity}Handler.php
│       ├── Query/
│       │   ├── Get{Entity}Query.php
│       │   └── List{Entities}Query.php
│       └── DTO/
│           └── {Entity}DTO.php
├── Infrastructure/
│   └── Persistence/
│       └── Doctrine/
│           └── {Entity}Repository.php
└── Presentation/
    └── Controller/
        └── {Entity}Controller.php

templates/
└── {entity}/
    ├── index.html.twig
    ├── show.html.twig
    ├── new.html.twig
    ├── edit.html.twig
    └── _form.html.twig

tests/
├── Unit/
│   └── Domain/
│       └── {Entity}/
│           └── {Entity}Test.php
└── Functional/
    └── Controller/
        └── {Entity}ControllerTest.php

Étape 3 : Templates de Code

Entity (Domain)
<?php

declare(strict_types=1);

namespace App\Domain\{Entity}\Entity;

use App\Domain\{Entity}\ValueObject\{Entity}Id;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: \App\Infrastructure\Persistence\Doctrine\{Entity}Repository::class)]
#[ORM\Table(name: '{entities}')]
class {Entity}
{
    #[ORM\Id]
    #[ORM\Column(type: 'uuid', unique: true)]
    private {Entity}Id $id;

    // Champs générés selon les arguments
    #[ORM\Column(type: 'string', length: 255)]
    private string $name;

    #[ORM\Column(type: 'datetime_immutable')]
    private \DateTimeImmutable $createdAt;

    #[ORM\Column(type: 'datetime_immutable', nullable: true)]
    private ?\DateTimeImmutable $updatedAt = null;

    public function __construct({Entity}Id $id, string $name)
    {
        $this->id = $id;
        $this->name = $name;
        $this->createdAt = new \DateTimeImmutable();
    }

    public function getId(): {Entity}Id
    {
        return $this->id;
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function setName(string $name): self
    {
        $this->name = $name;
        $this->updatedAt = new \DateTimeImmutable();
        return $this;
    }

    // Autres getters/setters...
}

Read the full file on GitHub · 441 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. 5d ago First seen · 441 lines · 6 tokens per session scan A e9a5a6facd09

Subscribe to this mod's changes

generate-crud is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 7d ago), licensed MIT. It adds 6 tokens to every session and 3,059 once invoked, about $0.0000 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-09-03.