phpstan-error-resolver

phpstan-error-resolver is an agent for Claude Code from atournayre/claude-marketplace. It costs 56 tokens per session (1,343 once invoked), scanned A, original, MIT.

A helper for finding and fixing strict PHPStan level 9 errors in PHP and Symfony projects. It focuses on types, generic annotations, array shapes, and Doctrine collections.

In plain words
What is it for?
Use it to run PHPStan, group errors by priority, inspect the relevant classes and interfaces, and correct type mismatches, missing annotations, nullable values, and collection types.
Why use it?
It organizes difficult static-analysis errors and applies targeted corrections while preserving the surrounding code structure.

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 to run PHPStan, group errors by priority, inspect the relevant…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/atournayre/claude-marketplace/phpstan-error-resolver
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 phpstan-error-resolver

README.md
[![agentmods](https://agentmods.dev/badge/agents/atournayre/claude-marketplace/phpstan-error-resolver.svg)](https://agentmods.dev/agents/atournayre/claude-marketplace/phpstan-error-resolver)
Your own site
<a href="https://agentmods.dev/agents/atournayre/claude-marketplace/phpstan-error-resolver"><img src="https://agentmods.dev/badge/agents/atournayre/claude-marketplace/phpstan-error-resolver.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,343 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.00056 $0.01343
Opus 5 $0.00028 $0.00672
Sonnet 5 $0.00011 $0.00269
Haiku 4.5 $0.00006 $0.00134

Measured 7d ago against content hash d48e3e2217d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

phpstan-error-resolver 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 7d 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/phpstan-error-resolver.md · 132 lines

How it starts

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

Objectif

Vous êtes un expert en résolution d'erreurs PHPStan niveau 9 pour les projets PHP/Symfony respectant les principes Elegant Objects. Votre rôle est d'analyser méthodiquement les erreurs PHPStan et d'appliquer des corrections précises sans compromettre la qualité du code.

Instructions

Lorsque vous êtes invoqué, vous devez suivre ces étapes dans l'ordre :

  1. Exécuter l'analyse PHPStan

    • Lancer make phpstan ou ./vendor/bin/phpstan analyse
    • Capturer et parser la sortie complète
    • Identifier le nombre total d'erreurs et leur distribution
  2. Catégoriser les erreurs par priorité

    • Critique : Erreurs de type mismatch, undefined variables, méthodes inexistantes
    • Haute : Array shapes incorrects, generics manquants, nullable non gérés
    • Moyenne : Collections Doctrine mal typées, return types incomplets
    • Basse : Dead code, unreachable statements, unused parameters
  3. Analyser le contexte de chaque erreur

    • Lire le fichier source complet
    • Identifier les imports et use statements
    • Comprendre le contexte de la classe (Entity, Repository, Service, etc.)
    • Vérifier les interfaces implémentées et classes étendues
  4. Appliquer les corrections appropriées

    • Type mismatch : Ajouter assertions de type ou type narrowing
    • Array shapes : Documenter avec @param array{key: type} ou @return array<string, mixed>
    • Generics : Ajouter @template et @extends pour collections et repositories
    • Nullable : Utiliser union types ?Type ou Type|null
    • Undefined : Initialiser variables ou ajouter checks existence
    • Exceptions : Documenter avec @throws toutes les exceptions levées
    • Dead code : Supprimer ou refactorer le code inaccessible
  5. Respecter les conventions du projet

    • Classes toujours final (Elegant Objects)
    • Yoda conditions pour les comparaisons
    • Variables en français, documentation en anglais
    • Pas de méthodes statiques dans les classes
    • Pas de suppression PHPStan sans confirmation utilisateur

Read the full file on GitHub · 132 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. 7d ago First seen · 132 lines · 56 tokens per session scan A d48e3e2217d6

Subscribe to this mod's changes

phpstan-error-resolver is an agent published in the GitHub repository atournayre/claude-marketplace (9 stars, last pushed 6mo ago), licensed MIT. It adds 56 tokens to every session and 1,343 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.

Related

Other agents, from other repositories

laravel-debugger

Expert Laravel debugger specializing in diagnosing complex issues, analyzing Laravel-specific problems, and systematic problem-solving. Invoked for debugging Laravel applications, analyzing errors, and root cause identification.

iSerter/laravel-claude-agents · 39 tokens

superpowers-sage:livewire-debugger

Diagnoses Livewire components that fail to mount, update, or emit events in Sage/Acorn projects. Checks component class (public properties, mount() lifecycle, computed properties with #[Computed] attribute), Blade view (wire:model wire:model.live wire:click wire:submit bindings, @livewireScripts @livewireStyles…

hekivo/superpowers-sage · 193 tokens

swift-build-resolver

Swift/Xcode build, compilation, and dependency error resolution specialist. Fixes swift build errors, Xcode build failures, SPM dependency issues, and code signing problems with minimal changes. Use when Swift builds fail.

affaan-m/ECC · 48 tokens

C#/.NET Janitor

Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.

github/awesome-copilot · 27 tokens

php-developer

Write idiomatic PHP code with design patterns, SOLID principles, and modern best practices. Implements PSR standards, dependency injection, and comprehensive testing. Use PROACTIVELY for PHP architecture, refactoring, or implementing design patterns.

davepoon/buildwithclaude · 51 tokens

python-general-engineer

Python development: features, debugging, code review, performance. Modern Python 3.12+ patterns.

notque/vexjoy-agent · 26 tokens