framework:make:collection

Génère classe Collection typée avec traits Atournayre

8 stars

Best use case

framework:make:collection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Génère classe Collection typée avec traits Atournayre

Teams using framework:make:collection should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/make-collection/SKILL.md --create-dirs "https://raw.githubusercontent.com/atournayre/claude-marketplace/main/framework/skills/make-collection/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/make-collection/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How framework:make:collection Compares

Feature / Agentframework:make:collectionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Génère classe Collection typée avec traits Atournayre

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Framework Make Collection Skill

## Instructions à Exécuter

**IMPORTANT : Exécute ce workflow étape par étape :**


## Description
Génère une classe Collection typée pour gérer des ensembles d'entités avec les traits et interfaces Atournayre.

## Usage
```
Use skill framework:make:collection
```

## Variables requises
- **{EntityName}** - Nom de l'entité en PascalCase (ex: Product)
- **{entityName}** - Nom de l'entité en camelCase (ex: product)
- **{namespace}** - Namespace du projet (défaut: App)

## Dépendances
- Entité dans `src/Entity/{EntityName}.php`
- Framework `atournayre/framework`

## Outputs
- `src/Collection/{EntityName}Collection.php`

## Workflow

1. Demander le nom de l'entité (EntityName)
2. Vérifier que l'entité existe dans `src/Entity/{EntityName}.php`
   - Si non : arrêter et demander de créer l'entité d'abord
3. Générer la classe Collection depuis le template `templates/Collection/`
4. Afficher le fichier créé

## Patterns appliqués

- Classe `final`
- Interfaces : AsListInterface, ToArrayInterface, CountInterface, CountByInterface, AtLeastOneElementInterface, HasSeveralElementsInterface, HasNoElementInterface, HasOneElementInterface, HasXElementsInterface, LoggableInterface
- Traits : Collection, Collection\ToArray, Collection\Countable
- Méthode statique `asList(array $collection)`

## References

- [Usage](references/usage.md) - Exemples d'utilisation et méthodes métier

## Notes
- Respect du principe YAGNI : pas de méthodes génériques anticipées
- Seules les méthodes explicitement demandées doivent être ajoutées
- Les traits fournissent déjà les fonctionnalités de base

Related Skills

symfony-framework

8
from atournayre/claude-marketplace

Comprehensive Symfony 6.4 development skill for web applications, APIs, and microservices.

symfony:make

8
from atournayre/claude-marketplace

Cherche si il existe un maker Symfony pour faire la tache demandée et l'utilise si il existe. Si aucun maker n'existe alors utilise la slash command "/prepare"

framework:make:urls

8
from atournayre/claude-marketplace

Génère classe Urls + Message CQRS + Handler

framework:make:story

8
from atournayre/claude-marketplace

Génère Story Foundry pour fixtures de tests

framework:make:out

8
from atournayre/claude-marketplace

Génère classe Out (DTO immuable pour output)

framework:make:invalide

8
from atournayre/claude-marketplace

Génère classe Invalide (exceptions métier)

framework:make:factory

8
from atournayre/claude-marketplace

Génère Factory Foundry pour tests

framework:make:entity

8
from atournayre/claude-marketplace

Génère une entité Doctrine avec repository selon principes Elegant Objects

framework:make:contracts

8
from atournayre/claude-marketplace

Génère les interfaces de contrats pour une architecture Elegant Objects

framework:make:all

8
from atournayre/claude-marketplace

Génère tous les fichiers pour une entité complète (orchestrateur)

fix-grammar

8
from atournayre/claude-marketplace

Fix grammar and spelling errors in one or multiple files while preserving formatting

phpstan-resolver

8
from atournayre/claude-marketplace

Résout automatiquement les erreurs PHPStan en analysant et corrigeant les problèmes de types. Boucle jusqu'à zéro erreur ou stagnation.