elegant-objects

Detect Elegant Objects rule violations in PHP files and generate prioritized reports.

9|2|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/atournayre/claude-marketplace --skill elegant-objects
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elegant-objects
Source: https://github.com/atournayre/claude-marketplace/tree/main/qa/skills/elegant-objects
Command: npx skills add https://github.com/atournayre/claude-marketplace --skill elegant-objects

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the time-consuming manual process of reviewing PHP code for adherence to Elegant Objects design principles, ensuring consistent code quality across your codebase.

Core Features & Use Cases

  • Automated Code Analysis: Scans PHP files for violations of 20+ Elegant Objects rules including class design, method structure, and testing practices.
  • Intelligent Scoring System: Provides a comprehensive quality score with prioritized recommendations for improvement.
  • Git Integration: Automatically analyzes modified files in your current branch or specific files on demand.
  • Use Case: Imagine you're refactoring a legacy PHP application. Use this Skill to automatically identify all classes with getters/setters, static methods, and other anti-patterns, then get specific suggestions for object-oriented improvements.

Quick Start

Use the elegant-objects skill to analyze all modified PHP files in the current branch for Elegant Objects compliance.

Frequently Asked Questions about elegant-objects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect Elegant Objects violations in my PHP code?

Elegant Objects analysis scans PHP files for violations of 20+ design rules including class constraints, method structure, and testing practices. Run the Skill on your PHP files or modified Git branch to receive a prioritized report identifying anti-patterns like getters, setters, static methods, and non-compliant test structures.

What PHP code quality rules does Elegant Objects enforce?

The Skill enforces class rules (final by default, max four attributes, no getters/setters, no static methods, verb-only method names, single constructor), method rules (no null returns, no null arguments, no blank lines or inline comments), and test rules (one assertion per test, French-descriptive names, no setUp/tearDown).

Can I analyze only modified PHP files in my Git branch?

Yes. The Skill integrates with Git to automatically analyze only files changed in your current branch, or you can specify individual PHP files on demand for targeted reviews.

How does the Elegant Objects scoring system work?

The Skill produces a comprehensive quality score with a base of 100, calculated by evaluating compliance across all 20+ design rules. The report prioritizes violations by impact and provides actionable remediation guidance for each finding.

What's the best way to refactor legacy PHP code for better design?

Use automated code analysis to identify design anti-patterns systematically across your codebase, then prioritize remediation by impact. This Skill detects all Elegant Objects violations and ranks them, enabling targeted refactoring of getters, setters, static methods, and test structure.

Do I need to manually review PHP files for design compliance?

No. Automated scanning eliminates manual review by detecting violations of Elegant Objects principles across class design, method structure, and testing practices, then generating a prioritized report with specific improvement suggestions.