Analyse With Phpstan
ListedAnalyse code for potential PHP errors and bugs using Phpstan, improving code quality and preventing runtime issues.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add phpstan/phpstan --skill analyse-with-phpstan -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
phpstan
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill failed 1 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.
No undeclared network calls: failed
Contacts 1 host that is neither well-known infrastructure nor declared in the skill's frontmatter: api.phpstan.org.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
Hosts contacted
api.phpstan.orgundeclaredWhat it found
- .claude/skills/analyse-with-phpstan/SKILL.md:33contacts api.phpstan.org
curl -s -X POST 'https://api.phpstan.org/analyse' \
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
No pipe-to-shell installers: passed
No pipe-to-shell or download-and-run installers.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
Pinned to a commit: passed
Scanned phpstan/phpstan at f30b81c6fb.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- f30b81c6fb
- Scanned
- 1 file, 92 lines
About this skill
What it does
This skill uses PHPStan, a static analysis tool for PHP. It analyzes your codebase to detect bugs and errors without actually running the code. This helps improve code quality by identifying potential issues like unused variables, unreachable statements, and type inconsistencies. The skill provides detailed reports highlighting these problems.
When to use it
- Code Review: Integrate into a CI/CD pipeline to automatically check for coding standards violations before merging changes.
- Bug Prevention: Proactively identify potential errors early in the development cycle.
- Refactoring: Gain confidence when refactoring code by ensuring no new issues are introduced.
- Learning PHP: Understand common pitfalls and best practices through analysis feedback.
Key capabilities
- Static Analysis of PHP Code
- Bug Detection
- Error Reporting
- Coding Standards Enforcement
Example prompts
- "Analyze this PHP file for potential errors:
path/to/my_file.php" - "Run a static analysis on my project and report any type inconsistencies."
- "Check this code snippet for unused variables:
[code snippet]"
Tips & gotchas
- Requires a working PHP environment with PHPStan installed.
- The accuracy of the analysis depends on the complexity of the codebase and the configuration of PHPStan.