← ClaudeAtlas

wp-phpstan-stubslisted

Use when creating a new PHPStan stubs package for a WordPress plugin, theme, or Composer package — scaffolding the full repo structure (composer.json, configs/bootstrap.php, configs/finder.php, bin/generate.sh, bin/release-latest-versions.sh, .github/workflows/release.yml, phpstan.neon), fetching version lists from WP.org plugin API (api.wordpress.org/plugins) or Packagist API, using php-stubs/generator, or setting up the GitHub release workflow with jq. Triggers: "create stubs for X plugin", "scaffold PHPStan stubs", "new stubs package", "add PHPStan stubs for WooCommerce", "stubs repo setup", "generate stub file", "PHPStan cannot find this class", "missing type hints for third-party plugin", "add stubs for this Composer package", "php-stubs/generator", "bin/generate.sh", "configs/bootstrap.php for stubs", "configs/finder.php", "release-latest-versions.sh", "WP.org plugin API for versions", "Packagist API for versions", "jq regex error in stubs script", "GitHub Actions release workflow for stubs", "phpstan.n
mralaminahamed/wp-dev-skills · ★ 27 · Data & Documents · score 77
Install: claude install-skill mralaminahamed/wp-dev-skills
# 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 sourc