php-reviewer

php-reviewer is an agent for Claude Code from TheBeardedBearSAS/claude-craft. It costs 32 tokens per session (4,596 once invoked), scanned A, original, MIT.

A code-review agent for modern PHP applications using Clean Architecture, a way of separating business rules from technical details, and related practices such as domain-driven design.

In plain words
What is it for?
Use it to review PHP code for architecture, strict typing, PSR-12 style, PHPStan findings, Pest or PHPUnit tests, OWASP security risks, and database performance issues.
Why use it?
It looks for PHP-specific design, typing, testing, security, and performance problems instead of treating the project as a generic codebase.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; names the NotebookEdit tool.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is docker compose exec app ./vendor/bin/infection --min-msi=80.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TheBeardedBearSAS/claude-craft
Claude Code
/plugin install claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

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 php-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/thebeardedbearsas/claude-craft/php-reviewer.svg)](https://agentmods.dev/agents/thebeardedbearsas/claude-craft/php-reviewer)
Your own site
<a href="https://agentmods.dev/agents/thebeardedbearsas/claude-craft/php-reviewer"><img src="https://agentmods.dev/badge/agents/thebeardedbearsas/claude-craft/php-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00032 $0.04596
Opus 5 $0.00016 $0.02298
Sonnet 5 $0.00006 $0.00919
Haiku 4.5 $0.00003 $0.00460

Measured 6d ago against content hash 8cdba92f965d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

php-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 6d 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.

.claude/agents/php-reviewer.md · 585 lines

How it starts

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

Agent Auditeur PHP 8.5 / Clean Architecture

Identite

Je suis un specialiste de la revue de code PHP 8.5 et Clean Architecture. Mon approche est centree sur les problemes specifiques a PHP : la rigueur du typage avec strict_types, l'architecture hexagonale et DDD, la qualite statique avec PHPStan niveau 10 (PHPStan 2.0+), les tests avec Pest 4, et la securite OWASP. Je ne fais pas un audit generique -- je detecte ce qui casse, ralentit ou complexifie inutilement une application PHP moderne utilisant les fonctionnalites de PHP 8.4+ (property hooks, asymmetric visibility) et PHP 8.5 (pipe operator, clone with, #[\NoDiscard], URI extension).

Systeme de notation (100 points)

Categorie Points Focus
Architecture et Clean Code 30 Clean Architecture, hexagonal, DDD, CQRS, property hooks
PHP 8.5 et Qualite 20 PSR-12, PHPStan level 10, strict_types, features modernes
Tests 25 Pest 4, PHPUnit 12, mutation testing, browser testing
Securite et Performance 25 OWASP, SQL injection, N+1, cache

1. Architecture et Clean Code (30 points)

Arbre de decision : Analyse de l'architecture

Le projet suit-il Clean Architecture / Hexagonal ?
  NON --> CRITIQUE : les couches doivent etre separees
  OUI --> Le Domain a-t-il des dependances externes ?
    OUI --> CRITIQUE : le Domain doit etre pur (pas de framework, pas d'ORM)
    NON --> Les interfaces sont-elles dans le Domain ?
      NON --> MAJEUR : les ports doivent etre dans le Domain
      OUI --> Les implementations sont-elles dans Infrastructure ?
        NON --> MAJEUR : violation de la direction des dependances

Le modele de domaine est-il anemique ?
  OUI --> Les entites n'ont que des getters/setters ?
    OUI --> CRITIQUE : modele anemique, la logique metier doit etre dans les entites
    NON --> La logique metier est-elle dans les services ?
      OUI --> MAJEUR : deplacer vers les entites/aggregats

Les Value Objects utilisent-ils property hooks (PHP 8.4+) ?
  NON --> MINEUR : property hooks simplifient la validation
  OUI --> Les proprietes publiques sont-elles asymetriques (public private(set)) ?
    NON --> MINEUR : asymmetric visibility renforce l'immutabilite

Read the full file on GitHub · 585 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. 6d ago First seen · 585 lines · 32 tokens per session scan A 8cdba92f965d

Subscribe to this mod's changes

php-reviewer is an agent published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 4,596 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

Laravel Expert Agent

Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices.

github/awesome-copilot · 27 tokens

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

rust-expert

Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.

travisjneuman/.claude · 78 tokens

python-expert

Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.

travisjneuman/.claude · 31 tokens

typescript-expert

TypeScript type system mastery including generics, conditional types, and advanced patterns. Use when solving complex type problems or improving type safety.

travisjneuman/.claude · 31 tokens

kotlin-expert

Kotlin Multiplatform, Compose Multiplatform, coroutines, Ktor, and JVM ecosystem specialist. Use when writing Kotlin code, building KMP shared modules, or developing with Jetpack Compose. Trigger phrases: Kotlin, KMP, Compose Multiplatform, coroutines, Ktor, Gradle, JVM, Flow, suspend, sealed class, data class.

travisjneuman/.claude · 80 tokens