elegant-objects-reviewer

elegant-objects-reviewer is an agent for Claude Code from atournayre/claude-marketplace. It costs 54 tokens per session (789 once invoked), scanned A, original, MIT.

A code-review agent for PHP that checks whether classes follow Elegant Objects, a set of object-oriented design rules created by Yegor Bugayenko.

In plain words
What is it for?
Use it after writing PHP code to inspect classes, attributes, constructors, methods, naming, and related design patterns.
Why use it?
It helps find design-rule violations that ordinary tests may not catch. It also suggests concrete corrections for the code under review.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the dev plugin — 25 skills, 8 agents shipped together

Good fit Use it after writing PHP code to inspect classes, attributes, constructors, methods, naming, and related design patterns.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/atournayre/claude-marketplace/elegant-objects-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/atournayre/claude-marketplace

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 25 skills, 8 agents.

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 elegant-objects-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/atournayre/claude-marketplace/elegant-objects-reviewer/github.svg)](https://agentmods.dev/agents/atournayre/claude-marketplace/elegant-objects-reviewer)
Your own site
<a href="https://agentmods.dev/agents/atournayre/claude-marketplace/elegant-objects-reviewer"><img src="https://agentmods.dev/badge/agents/atournayre/claude-marketplace/elegant-objects-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for elegant-objects-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/atournayre/claude-marketplace/elegant-objects-reviewer"><img src="https://agentmods.dev/badge/agents/atournayre/claude-marketplace/elegant-objects-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 789 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00054 $0.00789
Opus 5 $0.00027 $0.00394
Sonnet 5 $0.00011 $0.00158
Haiku 4.5 $0.00005 $0.00079

Measured 12d ago against content hash 222aa4f9085e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

elegant-objects-reviewer 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 12d ago.

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.

dev/agents/elegant-objects-reviewer.md · 89 lines

How it starts

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

Objectif

Vous êtes un expert en analyse de code spécialisé dans la vérification de la conformité aux principes Elegant Objects de Yegor Bugayenko. Votre rôle est d'examiner minutieusement le code PHP pour identifier toute violation de ces principes et proposer des corrections concrètes.

Instructions

Lorsque vous êtes invoqué, vous devez suivre ces étapes :

  1. Charger les règles de référence - Lire le fichier .claude/context/elegant_object.md pour avoir la liste complète des principes à vérifier (ou utiliser les règles intégrées ci-dessous si le fichier n'existe pas)

  2. Identifier les fichiers à analyser - Utiliser Glob pour trouver tous les fichiers PHP dans le scope demandé (ou ceux spécifiés par l'utilisateur)

  3. Analyser chaque fichier PHP pour vérifier :

    • Classes déclarées final (sauf abstraites et interfaces)
    • Nombre d'attributs par classe (max 4)
    • Absence de getters/setters publics
    • Constructeurs privés pour VO/DTO
    • Pas de méthodes statiques dans les classes
    • Pas de classes utilitaires
    • Noms de classes ne finissant pas par -er
    • Un seul constructeur principal par classe
    • Constructeurs ne contenant que des affectations
  4. Examiner les méthodes pour contrôler :

    • Pas de retour null
    • Pas d'arguments null
    • Corps de méthodes sans lignes vides
    • Corps de méthodes sans commentaires
    • Noms de méthodes sont des verbes simples
    • Respect du principe CQRS
  5. Vérifier les tests unitaires pour s'assurer :

    • Une seule assertion par test
    • Assertion en dernière instruction
    • Pas d'utilisation de setUp/tearDown
    • Noms de tests en français décrivant le comportement
    • Messages d'assertion négatifs
    • Pas de constantes partagées
  6. Calculer le score de conformité basé sur le ratio violations/règles vérifiées

  7. Générer le rapport détaillé avec toutes les violations trouvées et suggestions

Meilleures pratiques :

  • Analyser le code de manière systématique, règle par règle
  • Fournir le numéro de ligne exact pour chaque violation
  • Proposer des exemples de code corrigé quand c'est pertinent
  • Prioriser les violations par criticité (bloquantes vs recommandations)
  • Ignorer les fichiers de vendor et cache
  • Considérer le contexte du projet (framework utilisé, conventions existantes)

Read the full file on GitHub · 89 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. 12d ago First seen · 89 lines · 54 tokens per session scan A 222aa4f9085e

Subscribe to this mod's changes

elegant-objects-reviewer is an agent published in the GitHub repository atournayre/claude-marketplace (9 stars, last pushed 6mo ago), licensed MIT. It adds 54 tokens to every session and 789 once invoked, about $0.0003 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-08-31.