wp-phpstan

wp-phpstan is a skill for Claude Code, Codex from ihatesea69/HieuNghi-AI-Skills. It costs 47 tokens per session (931 once invoked), scanned A, a copy of wp-phpstan, MIT.

A guide for using PHPStan to inspect PHP code without running it, including WordPress-specific code.

In plain words
What is it for?
Use it to configure PHPStan, add WordPress type information, manage baselines, and fix reported errors in plugins, themes, or sites.
Why use it?
It helps find type mistakes and unsafe assumptions early, including problems involving WordPress functions and third-party code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure PHPStan, add WordPress type information, manage baselines, and fix reported errors in plugins, themes, or sites.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ihatesea69/hieunghi-ai-skills/wp-phpstan
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.

Any agent
npx skills add ihatesea69/HieuNghi-AI-Skills --skill wp-phpstan
Clone the repo
git clone --depth 1 https://github.com/ihatesea69/HieuNghi-AI-Skills

Made for: Claude Code, Codex.

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 wp-phpstan

README.md
[![agentmods](https://agentmods.dev/badge/skills/ihatesea69/hieunghi-ai-skills/wp-phpstan/github.svg)](https://agentmods.dev/skills/ihatesea69/hieunghi-ai-skills/wp-phpstan)
Your own site
<a href="https://agentmods.dev/skills/ihatesea69/hieunghi-ai-skills/wp-phpstan"><img src="https://agentmods.dev/badge/skills/ihatesea69/hieunghi-ai-skills/wp-phpstan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-phpstan

Your own site · 80×15
<a href="https://agentmods.dev/skills/ihatesea69/hieunghi-ai-skills/wp-phpstan"><img src="https://agentmods.dev/badge/skills/ihatesea69/hieunghi-ai-skills/wp-phpstan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 931 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 100% copy Near-identical to another mod 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.00047 $0.00931
Opus 5 $0.00023 $0.00465
Sonnet 5 $0.00009 $0.00186
Haiku 4.5 $0.00005 $0.00093

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

Security

Grade A, and why

wp-phpstan 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/phpstan_inspect.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to wp-phpstan — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

wordpress_skills/wp-phpstan/SKILL.md · 98 lines

How it starts

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

WP PHPStan

When to use

Use this skill when working on PHPStan in a WordPress codebase, for example:

  • setting up or updating phpstan.neon / phpstan.neon.dist
  • generating or updating phpstan-baseline.neon
  • fixing PHPStan errors via WordPress-friendly PHPDoc (REST requests, hooks, query results)
  • handling third-party plugin/theme classes safely (stubs/autoload/targeted ignores)

Inputs required

  • wp-project-triage output (run first if you haven't)
  • Whether adding/updating Composer dev dependencies is allowed (stubs).
  • Whether changing the baseline is allowed for this task.

Procedure

0) Discover PHPStan entrypoints (deterministic)

  1. Inspect PHPStan setup (config, baseline, scripts):
    • node skills/wp-phpstan/scripts/phpstan_inspect.mjs

Prefer the repo’s existing composer script (e.g. composer run phpstan) when present.

1) Ensure WordPress core stubs are loaded

szepeviktor/phpstan-wordpress or php-stubs/wordpress-stubs are effectively required for most WordPress plugin/theme repos. Without it, expect a high volume of errors about unknown WordPress core functions.

  • Confirm the package is installed (see composer.dependencies in the inspect report).
  • Ensure the PHPStan config references the stubs (see references/third-party-classes.md).

2) Ensure a sane phpstan.neon for WordPress projects

  • Keep paths focused on first-party code (plugin/theme directories).
  • Exclude generated and vendored code (vendor/, node_modules/, build artifacts, tests unless explicitly analyzed).
  • Keep ignoreErrors entries narrow and documented.

See:

  • references/configuration.md

3) Fix errors with WordPress-specific typing (preferred)

Prefer correcting types over ignoring errors. Common WP patterns that need help:

  • REST endpoints: type request parameters using WP_REST_Request<...>
  • Hook callbacks: add accurate @param types for callback args
  • Database results and iterables: use array shapes or object shapes for query results
  • Action Scheduler: type $args array shapes for job callbacks

Read the full file on GitHub · 98 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 98 lines · 47 tokens per session scan A 227d3025f585

Subscribe to this mod's changes

wp-phpstan is a skill published in the GitHub repository ihatesea69/HieuNghi-AI-Skills (3 stars, last pushed 6mo ago), licensed MIT. It adds 47 tokens to every session and 931 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to wp-phpstan, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

trace-and-isolate

Applies systematic tracing and isolation techniques to pinpoint exactly where a bug originates in code. Use when a bug is hard to locate, code is not working as expected, an error or crash appears with unclear cause, a regression was introduced between recent commits, or you need to narrow down which component…

rohitg00/skillkit · 120 tokens

parallel-investigation

Coordinates parallel investigation threads to simultaneously explore multiple hypotheses or root causes across different system areas. Use when debugging production incidents, slow API performance, multi-system integration failures, or complex bugs where the root cause is unclear and multiple plausible theories exist…

rohitg00/skillkit · 97 tokens

hypothesis-testing

Applies the scientific method to debugging by helping users form specific, testable hypotheses, design targeted experiments, and systematically confirm or reject theories to find root causes. Use when a user says their code isn't working, they're getting an error, something broke, they want to troubleshoot a bug, or…

rohitg00/skillkit · 103 tokens

root-cause-analysis

Performs systematic root cause analysis to identify the true source of bugs, errors, and unexpected behavior through structured investigation phases — not just treating symptoms. Use when a user reports a bug, crash, error, or broken behavior and needs to debug, troubleshoot, or investigate why something is not…

rohitg00/skillkit · 110 tokens

workflows-doctor

Diagnose Zapier Workflows skill and SDK CLI compatibility. Use when a workflow skill asks for a compatibility check, when SDK commands or flags are missing, when a workflow skill may be stale, or when updating workflow skills after an SDK CLI change.

zapier/agent-skills · 55 tokens

sf-debug

Debug and troubleshoot Salesforce applications using debug logs, governor limit monitoring, error diagnosis, and performance profiling. Use when analyzing debug logs, diagnosing governor limit violations, interpreting stack traces, resolving common Salesforce errors, or profiling Apex performance. Activate on .log…

Clientell-Ai/salesforce-skills · 89 tokens