generate-command

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

A Symfony command generator that creates a console command with arguments, options, dependency injection, output formatting, and a progress bar.

In plain words
What is it for?
Use it to scaffold commands such as importing users from a CSV file or warming an application cache.
Why use it?
It removes boilerplate when adding repeatable tasks that run from the terminal.

Command for Claude Code

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

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.

agentmods
npx agentmods add commands/thebeardedbearsas/claude-craft/generate-command
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-command

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-command.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-command)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/generate-command"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/generate-command.svg" alt="Measured on agentmods" 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 2,132 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00006 $0.02132
Opus 5 $0.00003 $0.01066
Sonnet 5 $0.00001 $0.00426
Haiku 4.5 $0.00001 $0.00213

Measured yesterday against content hash c9e77894d355, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate-command 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 yesterday.

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-command.md · 351 lines

How it starts

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

Génération Commande Symfony

Tu es un développeur Symfony senior. Tu dois générer une commande console Symfony complète avec les bonnes pratiques.

Arguments

$ARGUMENTS

Arguments :

  • Nom de la commande (ex: app:users:import, app:cache:warmup)
  • (Optionnel) Description courte

Exemple : /symfony:generate-command app:users:import "Import users from CSV file"

MISSION

Étape 1 : Créer la Commande

Structure du fichier
src/
└── Command/
    └── {CommandName}Command.php
Template de Commande
<?php

declare(strict_types=1);

namespace App\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Helper\ProgressBar;

#[AsCommand(
    name: '{command:name}',
    description: '{Description de la commande}',
)]
class {CommandName}Command extends Command
{
    public function __construct(
        // Injecter les dépendances nécessaires
        private readonly SomeService $service,
    ) {
        parent::__construct();
    }

    protected function configure(): void
    {
        $this
            ->addArgument(
                'arg1',
                InputArgument::REQUIRED,
                'Description de l\'argument'
            )
            ->addArgument(
                'arg2',
                InputArgument::OPTIONAL,
                'Argument optionnel',
                'valeur_defaut'
            )
            ->addOption(
                'option1',
                'o',
                InputOption::VALUE_REQUIRED,
                'Description de l\'option'
            )
            ->addOption(
                'dry-run',
                null,
                InputOption::VALUE_NONE,
                'Exécuter sans modifier les données'
            )
            ->addOption(
                'force',
                'f',
                InputOption::VALUE_NONE,
                'Forcer l\'exécution sans confirmation'
            )
            ->setHelp(<<<'HELP'
La commande <info>%command.name%</info> permet de {description détaillée}.

Exemples d'utilisation :

  <info>php %command.full_name% fichier.csv</info>
      Import le fichier CSV

  <info>php %command.full_name% fichier.csv --dry-run</info>
      Simule l'import sans modifier les données

  <info>php %command.full_name% fichier.csv -o valeur --force</info>
      Import forcé avec option
HELP
            );
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $io = new SymfonyStyle($input, $output);

        // Récupérer les arguments et options
        $arg1 = $input->getArgument('arg1');
        $isDryRun = $input->getOption('dry-run');
        $force = $input->getOption('force');

        // Afficher le header
        $io->title('{Command Name}');

        // Demander confirmation si pas --force
        if (!$force && !$io->confirm('Voulez-vous continuer ?', false)) {
            $io->warning('Opération annulée.');
            return Command::SUCCESS;
        }

        if ($isDryRun) {
            $io->note('Mode dry-run activé - aucune modification ne sera effectuée.');
        }

        try {
            // Logique principale
            $items = $this->getItemsToProcess($arg1);

            // Progress bar
            $progressBar = new ProgressBar($output, count($items));
            $progressBar->setFormat('debug');
            $progressBar->start();

            $processed = 0;
            $errors = [];

            foreach ($items as $item) {
                try {
                    if (!$isDryRun) {
                        $this->service->process($item);
                    }
                    $processed++;
                } catch (\Exception $e) {
                    $errors[] = ['item' => $item, 'error' => $e->getMessage()];
                }
                $progressBar->advance();
            }

            $progressBar->finish();
            $io->newLine(2);

            // Résumé
            $io->success(sprintf('%d éléments traités avec succès.', $processed));

            if (!empty($errors)) {
                $io->warning(sprintf('%d erreurs rencontrées.', count($errors)));
                $io->table(
                    ['Item', 'Erreur'],
                    array_map(fn($e) => [$e['item'], $e['error']], $errors)
                );
            }

            return Command::SUCCESS;

        } catch (\Exception $e) {
            $io->error($e->getMessage());
            return Command::FAILURE;
        }
    }

    private function getItemsToProcess(string $source): array
    {
        // Implémentation selon le besoin
        return [];
    }
}

Read the full file on GitHub · 351 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. yesterday First seen · 351 lines · 6 tokens per session scan A c9e77894d355

Subscribe to this mod's changes

generate-command is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 2d ago), licensed MIT. It adds 6 tokens to every session and 2,132 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.