ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

Phpstan

PHP Static Analysis Tool - discover bugs in your code without running it! php-analyzer, php, php, php7, php-analyzer, static-analysis.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/ckchzh/php-analyzer
Or

PHP Analyzer

A thorough PHP development toolkit for checking, validating, formatting, linting, and analyzing PHP code. Works entirely offline with local storage, zero configuration, and a clean command-line interface.

Why PHP Analyzer?

  • Works entirely offline — your data never leaves your machine
  • Simple command-line interface, no GUI needed
  • 12 core PHP analysis commands plus utility commands
  • Export to JSON, CSV, or plain text anytime
  • Automatic history and activity logging

Commands

CommandDescription
php-analyzer check <input>Check PHP code or configuration for issues
php-analyzer validate <input>Validate PHP syntax, structure, or schemas
php-analyzer generate <input>Generate PHP boilerplate, stubs, or scaffolding
php-analyzer format <input>Format PHP code to consistent style standards
php-analyzer lint <input>Lint PHP files for code quality issues
php-analyzer explain <input>Explain PHP concepts, errors, or code patterns
php-analyzer convert <input>Convert between PHP versions or formats
php-analyzer template <input>Create or manage PHP code templates
php-analyzer diff <input>Diff PHP files or configurations
php-analyzer preview <input>Preview changes before applying
php-analyzer fix <input>Auto-fix common PHP issues
php-analyzer report <input>Generate analysis reports
php-analyzer statsShow summary statistics for all logged entries
php-analyzer export <fmt>Export data (json, csv, or txt)
php-analyzer search <term>Search across all logged entries
php-analyzer recentShow last 20 activity entries
php-analyzer statusHealth check — version, data dir, disk usage
php-analyzer helpShow full help with all available commands
php-analyzer versionShow current version (v2.0.0)

Each core command (check, validate, generate, format, lint, explain, convert, template, diff, preview, fix, report) works in two modes:

  • Without arguments: shows recent entries from that command's log
  • With arguments: records the input with a timestamp and saves to the command-specific log file

Data Storage

All data is stored locally at ~/.local/share/php-analyzer/. Each command maintains its own .log file (e.g., check.log, lint.log, format.log). A unified history.log tracks all activity across commands with timestamps. Use the export command to back up your data in JSON, CSV, or plain text format at any time.

Requirements

  • Bash 4.0+ (uses set -euo pipefail)
  • Standard Unix utilities: date, wc, du, tail, grep, sed, cat, basename
  • No external dependencies or API keys required
  • Works on Linux, macOS, and WSL

When to Use

Metadata

Author@ckchzh
Stars3562
Views0
Updated2026-03-29
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-ckchzh-php-analyzer": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.