wp-phpstan-stubs

wp-phpstan-stubs is a skill for Claude Code from mralaminahamed/wp-dev-skills. It costs 293 tokens per session (5,152 once invoked), scanned C, original, MIT.

A scaffold for a PHPStan stubs package for a WordPress plugin, theme, or Composer package. PHPStan stubs describe external code so the PHP static analyzer can check it accurately.

In plain words
What is it for?
Creating Composer metadata, PHPStan configuration, finder and bootstrap files, version-fetching scripts, and release automation for a new stubs package.
Why use it?
It provides the standard repository files and scripts needed to maintain and release those descriptions across package versions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is run: bash bin/release-latest-versions.sh.

Part of the wp-dev-skills plugin — 19 skills, 1 command shipped together

Good fit Creating Composer metadata, PHPStan configuration, finder and bootstrap files, version-fetching scripts, and release automation for a new stubs package.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mralaminahamed/wp-dev-skills
agentmods
npx agentmods add skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs

Made for: Claude Code.

Or install wp-dev-skills, the plugin that ships this one along with the rest of its 19 skills, 1 command.

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-stubs

README.md
[![agentmods](https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs/github.svg)](https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs)
Your own site
<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs/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-stubs

Your own site · 80×15
<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-phpstan-stubs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 293 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,152 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00293 $0.05152
Opus 5 $0.00147 $0.02576
Sonnet 5 $0.00059 $0.01030
Haiku 4.5 $0.00029 $0.00515

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

Security

Grade C, and why

wp-phpstan-stubs scanned grade C with 2 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 10d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$ROOT_DIR/source/<slug>" 2>/dev/null || true

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

WP_JSON="$(wget -q -O- "https://api.wordpress.org/plugins/info/1.0/<slug>.json")"
skills/wp-phpstan-stubs/SKILL.md · 561 lines

How it starts

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

PHPStan Stubs Scaffold

Model note: File scaffolding from a fixed template — haiku handles end-to-end. Only reach for sonnet if the source plugin has complex namespace hierarchies needing stub organization decisions.

Scaffold a complete PHPStan stubs package from scratch, following the my-org/phpstan-freemius-stubs standard structure.

When to use

  • "Create stubs for X", "new stubs package", "scaffold phpstan stubs", "add stubs for plugin/composer package".

Not for: Configuring phpstan.neon or generating baselines — use the official wp-phpstan skill. Adding PHPStan to a plugin that already has stubs installed.

References

  • references/wp-org-api.md — WP.org plugin API, version listing, download URLs, cleanup patterns
  • references/packagist-api.md — Packagist API, version filtering, source/composer.json update pattern
  • references/common-errors.md — Known errors and fixes (jq \d, unzip prompt, find+set-e, git reset, missing source/composer.json)
  • references/github-setup.md — Repo creation, branch rename trunk→main, topics, secrets, all 11 current repos

Gather Required Info

Before writing any files, collect (ask user if missing):

  1. Plugin/package name — human-readable (e.g. "SureCart", "Action Scheduler")
  2. Source type — one of:
    • wp-plugin — downloadable from WordPress.org (slug known)
    • composer — Composer package on Packagist (e.g. woocommerce/action-scheduler)
    • paid — paid plugin, user places source manually
  3. WP.org slug (if wp-plugin) — e.g. surecart, forminator
  4. Packagist package (if composer) — e.g. woocommerce/action-scheduler
  5. Source dir path inside package — where the plugin/package files land:
    • wp-plugin: source/<slug>/
    • composer: source/vendor/<vendor>/<package>/
    • paid: source/<slug>/
  6. Packagist namemy-org/phpstan-<slug>-stubs
  7. GitHub repo namephpstan-<slug>-stubs
  8. Versions to release — for wp-plugin/composer: minor version series (e.g. 3.4 3.5 3.6); for paid: manual
  9. GitHub assignee — default my-org

Read the full file on GitHub · 561 lines

Files

What ships with it

5 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. 10d ago First seen · 561 lines · 293 tokens per session scan C 1a23e1a9e1c7

Subscribe to this mod's changes

wp-phpstan-stubs is a skill published in the GitHub repository mralaminahamed/wp-dev-skills (27 stars, last pushed 1mo ago), licensed MIT. It adds 293 tokens to every session and 5,152 once invoked, about $0.0015 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

php-pro

Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects…

Jeffallan/claude-skills · 107 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

craft-php-guidelines

Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers…

michtio/craftcms-claude-skills · 336 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

solid-php

Use when applying SOLID principles to Laravel 13 / PHP 8.3+ code — file size limits, interface placement, or PHPDoc enforcement.

fusengine/agents · 35 tokens