Setup PHP Gitignore
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Create or refresh the root .gitignore for a PHP/Composer project — a universal base plus flavor-specific sections
for whatever is actually detected (Laravel application, WordPress plugin or theme, PrestaShop module, Node tooling,
PHPCS/PHPStan caches, an Antora docs build). It mirrors iru-setup-typescript-gitignore and
iru-setup-java-gitignore for the PHP ecosystem and never overwrites an existing .gitignore without showing a
diff and getting approval.
Purpose
iru-setup-php-gitignore bootstraps a .gitignore that matches what a PHP project really produces: vendor/,
auth.json, PHPUnit/Pest caches, build/ report output (Clover/JUnit/coverage HTML), code-style caches, env files
(keeping .env.example), OS/editor noise and the repository-wide .integration-test.lock/ directory and the UI tests' .ui-screenshots/ capture directory (every flavor renders UI).
It adds a
section only when the thing it targets is present — Laravel’s skeleton entries (public/build, public/hot,
public/storage, storage/.key, IDE-helper files), WordPress release zips and .wp-env.override.json, PrestaShop
config_.xml caches (with config.xml kept tracked), Node, Playwright browser-UI-test output (test-results/, playwright-report/, blob-report/,
/playwright/.cache/, plus artifacts/ for wp-scripts test-playwright), PHPCS/PHPStan cache paths read from their
configs, and Antora build output. It never ignores composer.lock and proposes removing such a line from an existing file.
When .gitignore already exists it announces an update, shows the merged draft as a diff, and asks Update (merge,
keep hand-added entries) / Keep as is / Replace (template only).
Plugin
Shipped by the iru-php plugin of the ai-catalog marketplace (install with /plugin install iru-php@ai-catalog; see Plugins).
Invocation
/iru-setup-php-gitignore
Optionally with an args block of key: value lines (see below) for scripted runs.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
|
Outputs
-
A root
.gitignore— created from scratch, updated (merged, keeping hand-added lines), or replaced with the template — or left untouched when kept as is. -
A report stating whether the run was from scratch or an update, the action taken (created / updated / replaced / kept as is, and whether it came from the user’s answer or
on-existing), the detected flavor, which conditional sections were included or skipped and why, any Laravel nested.gitignorefiles found missing, whether acomposer.lockignore line was removed, and which hand-added lines were preserved or dropped. -
Explicit warnings: review the file before committing (detection is heuristic); run
git rm -r --cachedmanually for anything already tracked under a newly ignored path (rotate credentials ifauth.jsonor.envwas committed); commitcomposer.lock; and which sections were verified (Laravel skeleton, PrestaShop native modules) versus inferred.
Execution flow
Dependencies
Invokes
None — iru-setup-php-gitignore is a leaf skill; it only reads manifests and config files and writes .gitignore.
It relies on the flavor markers also used by Explore and
Setup PHP Repository, but does not call them.
Invoked by
-
Setup PHP Repository — Step 7, root .gitignore, via the
iru-isolated-skill-executoragent.
Source
SKILL.md on GitHub — the file this page was generated from.