Skip to content
Back to skills

Frameworkmakecollection

ASecurity

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

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 8, 2026
toolsphp

Security analysis

A100/100

Scanned February 10, 2026

npx -y skills add majiayu000/claude-skill-registry --skill frameworkmakecollection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Frameworkmakecollection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Frameworkmakecollection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-frameworkmakecollection/badge)](https://www.skillsdirectory.com/skills/majiayu000-frameworkmakecollection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: framework:make:collection
description: Génère classe Collection typée avec traits Atournayre
license: MIT
version: 1.0.0
---

# Framework Make Collection Skill

## 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.