Agent skill
elegant-objects
Vérifie la conformité du code PHP aux principes Elegant Objects de Yegor Bugayenko. Analyse un fichier spécifique ou tous les fichiers modifiés dans la branche.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/elegant-objects-atournayre-claude-marketplace
SKILL.md
Elegant Objects Reviewer Skill
Usage
/qa:elegant-objects [fichier.php]
Sans argument : analyse les fichiers PHP modifiés dans la branche.
Workflow
- Déterminer fichiers à analyser (argument ou git diff)
- Vérifier les règles Elegant Objects
- Générer rapport avec score
Règles vérifiées
Classes
- Classes
final(sauf abstraites) - Max 4 attributs
- Pas de getters/setters
- Pas de méthodes statiques
- Noms sans -er (Manager, Handler, Helper...)
- Constructeur unique et simple
Méthodes
- Pas de retour
null - Pas d'argument
null - Corps sans lignes vides ni commentaires
- CQRS : séparation commandes/queries
Tests
- Une assertion par test (dernière instruction)
- Noms en français décrivant le comportement
- Pas de setUp/tearDown
Score
- Violation critique: -10 points
- Violation majeure: -5 points
- Recommandation: -2 points
- Base: 100
References
- Patterns de détection - Regex et règles détaillées
Notes
- Ignorer vendor/, var/, cache/
- Controllers Symfony tolérés
- Prioriser par criticité
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?