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.
npx skills add marcelorodrigo/agent-skills --skill phpstan-fixergit clone --depth 1 https://github.com/marcelorodrigo/agent-skillsWrote 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.
[](https://agentmods.dev/skills/marcelorodrigo/agent-skills/phpstan-fixer)<a href="https://agentmods.dev/skills/marcelorodrigo/agent-skills/phpstan-fixer"><img src="https://agentmods.dev/badge/skills/marcelorodrigo/agent-skills/phpstan-fixer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.03426 |
| Opus 5 | $0.00023 | $0.01713 |
| Sonnet 5 | $0.00009 | $0.00685 |
| Haiku 4.5 | $0.00005 | $0.00343 |
Grade A, and why
phpstan-fixer 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.
How it starts
The opening of the file, as written. The whole thing — 634 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHPStan Error Fixer
Fix PHPStan static analysis errors through proper type annotations, PHPDocs, and code improvements. This skill teaches agents how to resolve errors without suppressing them, respecting the project's configured strictness level.
Core Principles
- Never suppress errors as first resort — Fix the root cause with proper types and annotations
- Respect user configuration — Never modify
phpstan.neonsettings (level, paths, parameters) - No silent ignoring — Never add
ignoreErrorsto config without explicit user approval - Context-aware fixes — Understand the project type (Laravel, Symfony, vanilla PHP) before proposing solutions
- Ask before ignoring — If a legitimate ignore is needed, explain why and get user approval first
- Don't fix third-party code — Never modify files in
vendor/. Use stub files instead to override wrong types
Workflow
Step 1: Understand the Project Context
Before fixing errors, identify the project type:
# Check for Laravel
grep laravel/framework composer.json
# Check for Symfony
grep symfony/symfony composer.json
# Check for PHPStan extensions
grep phpstan composer.json
# Read PHPStan config
cat phpstan.neon
# Check project guidelines
cat AGENTS.md
Key information to extract:
- PHPStan level (0-10, or max)
- Installed PHPStan extensions (larastan, phpstan-strict-rules, etc.)
- Framework-specific helpers (Laravel IDE Helper, Symfony plugin)
- Project-specific type conventions
Step 2: Analyze the Error
PHPStan errors have this structure:
------ ----------------------------------------------
Line /path/to/File.php
------ ----------------------------------------------
42 Parameter $user of method foo() has invalid
type App\User.
💡 Identifier: parameter.type
------ ----------------------------------------------
Extract:
- Error identifier (e.g.,
parameter.type,missingType.return) - Error location (file, line number)
- Context (what's the code trying to do?)
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.
- 6d ago First seen · 634 lines · 46 tokens per session scan A c9877b80e613
phpstan-fixer is a skill published in the GitHub repository marcelorodrigo/agent-skills (18 stars, last pushed 3d ago), licensed MIT. It adds 46 tokens to every session and 3,426 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.
Other skills, from other repositories
sentry-php-sdk
Full Sentry SDK setup for PHP. Use when asked to "add Sentry to PHP", "install sentry/sentry", "setup Sentry in PHP", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for PHP applications. Supports plain PHP, Laravel, and Symfony.
bug-root-cause-finder
Root cause analysis methods for PHP bugs. Provides 5 Whys technique, fault tree analysis, git bisect guidance, and stack trace parsing.
check-cascading-failures
Detects cascading failure risks in PHP systems. Identifies shared resources, unbounded queues, missing backpressure, thread pool exhaustion, and failure propagation paths.
php-quality-tooling
Use when setting up PHPStan, Rector, or PHP-CS-Fixer on a non-Laravel PHP project, incl. CI wiring. Do NOT use for Laravel (Pint/Larastan), tests, or syntax.
wp-phpstan-static-analysis
Run PHPStan static analysis on a WordPress plugin or theme using szepeviktor/phpstan-wordpress. Covers the composer dev-dependencies and what is pulled transitively (phpstan/phpstan ^2.0, php-stubs/wordpress-stubs), the optional phpstan/extension-installer that auto-registers the extension, the phpstan.neon.dist…
wp-phpstan
Use when configuring, running, or fixing PHPStan static analysis in WordPress projects (plugins/themes/sites): phpstan.neon setup, baselines, WordPress-specific typing, and handling third-party plugin classes.