What is quality-tools?
Use when PHPStan, Rector, or ECS output appears — "phpstan says mixed", type errors, "fix code style", "run rector" — even when Eloquent/Laravel/model code is also mentioned.
event4u-app/agent-config
Use when PHPStan, Rector, or ECS output appears — "phpstan says mixed", type errors, "fix code style", "run rector" — even when Eloquent/Laravel/model code is also mentioned.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/quality-tools"Quick start
Install it or open the source, trigger it with a clear task, then follow the source workflow.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/quality-tools"Use quality-tools to help me with: [describe your task]. Before you begin, tell me what input you need, the steps you will follow, and the expected output.
No structured workflow was detected; follow the original SKILL.md below.
Continue to the workflowDirect answers
Use when PHPStan, Rector, or ECS output appears — "phpstan says mixed", type errors, "fix code style", "run rector" — even when Eloquent/Laravel/model code is also mentioned.
It is relevant to workflows involving Testing, Engineering, Research.
SkillSignal detected this source-specific command: npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/quality-tools". Inspect the repository and command before running it.
The upstream source does not declare a dedicated Agent platform.
Static analysis detected exec-script, write-files signals. Review the cited source lines before installing; these signals are not a security audit.
This page combines upstream documentation with deterministic repository, quality, and static-risk signals. It is not described as a manual test or security review.
SkillSignal brief
Use when PHPStan, Rector, or ECS output appears — "phpstan says mixed", type errors, "fix code style", "run rector" — even when Eloquent/Laravel/model code is also mentioned.
Useful in these contexts
Core capabilities
Distilled from the source
About 8 min · 25 sections
PHP: PHPStan (static analysis), Rector (automated refactoring), ECS (coding standards)
JS/TS: Biome (linting + formatting), TypeScript compiler (type checking), Jest/Vitest (tests)
Tool exit code and error count summary
Fixed issues or remaining errors to address
Quality breakdown
Based on traceable docs and repository signals; stars are not treated as quality.
Compare before choosing
These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
Use BEFORE editing shared code — enumerates every call site, event consumer, queue worker, API client, migration, and test that a planned change will touch, with a file:line citation per dependency.
Use when the user shares a Sentry error, Jira bug ticket, or error description and wants root cause analysis. Also for proactive bug hunting and code audits for hidden bugs.
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
Use this skill whenever running or configuring code quality tools:
NEVER RUN QUALITY TOOLS PROACTIVELY WHEN quality.local_auto_run IS
false OR MISSING (THE DEFAULT). DO NOT ASK WHETHER TO RUN THEM.
THE USER RUNS THEM MANUALLY. REMOTE CI IS THE AUTHORITATIVE GATE.
Toolchains differ per language and project and are often unknown to the agent — discovering and running them burns time and tokens. Under the default, exactly three triggers justify running a quality tool:
/fix quality./fix:ci is the canonical flow).quality.local_auto_run: true restores the legacy autonomous behaviour
(run the pipeline when work is ready for verification). When runs are
suppressed, the completion message says "quality gates delegated to
remote CI" — never that the tools passed.
Detect which tools to run based on what files were changed:
# Check changed file extensions (diff against base branch)
git diff --name-only origin/main..HEAD | grep -E '\.(php)$' # → PHP tools
git diff --name-only origin/main..HEAD | grep -E '\.(js|ts|tsx)$' # → JS/TS tools
If both PHP and JS/TS files changed → run both pipelines.
verify-before-complete rule — no pass claims without fresh output; suppressed runs are surfaced as "delegated to remote CI", never claimedphp-coding rule → PHPStan section — inline ignores, PHPDoc rulescontexts/execution/verification-mechanics.md — Gate zero (local_auto_run) + timing when true (quality tools ONCE at the end, not after each edit)testing-anti-patterns and
process-anti-patterns.md —
test-side rationalizations these tools cannot catch (e.g. "CI is red,
patch first, test later").Check composer.json to determine which tools are available and how to run them.
Use the first matching command style:
composer.json contains | Command style | Example |
|---|---|---|
A project-specific quality wrapper (exposes quality:* commands) | php artisan quality:* or composer quality:* | php artisan quality:phpstan |
phpstan/phpstan or larastan/larastan | vendor/bin/phpstan | vendor/bin/phpstan analyse |
rector/rector | vendor/bin/rector | vendor/bin/rector process |
symplify/easy-coding-standard | vendor/bin/ecs | vendor/bin/ecs check --fix |
Priority: If a project ships a quality:* wrapper (Artisan or Composer script), always prefer it —
wrappers typically add git-aware execution, caching, automatic baseline regeneration, and memory
management on top of the native tools.
If none of the above is installed → skip quality checks, inform the user.
All commands run inside the Docker container if Docker is used (docker compose exec or make console).
# Native:
vendor/bin/phpstan analyse # Analyse all configured paths
vendor/bin/phpstan analyse --memory-limit=512M # With memory limit
vendor/bin/phpstan analyse --error-format=github # CI-friendly format
# With a project-specific quality wrapper:
php artisan quality:phpstan # Laravel
composer quality:phpstan # Composer
Native flags:
| Flag | Description |
|---|---|
--memory-limit=SIZE | Set memory limit (e.g. 512M, 1G) |
--debug | Activate debug mode |
--error-format=FORMAT | Output format: table (default), github, gitlab |
--pro | Toggle PHPStan Pro |
Wrapper-only flags (typical of a quality:* wrapper — verify in the project):
| Flag | Description |
|---|---|
--baseline | Generate/update phpstan baseline file |
--ignore-git | Skip Git check, analyse all files |
--xdebug | Activate Xdebug mode |
# Native:
vendor/bin/ecs check # Dry-run
vendor/bin/ecs check --fix # Auto-fix
# With a project-specific quality wrapper:
php artisan quality:ecs --fix # Laravel
composer quality:ecs -- --fix # Composer
Native flags:
| Flag | Description |
|---|---|
--fix | Fix errors automatically |
--clear-cache | Clear the ECS cache |
Wrapper-only flags (typical of a quality:* wrapper — verify in the project):
| Flag | Description |
|---|---|
--ignore-git | Skip Git check, check all files |
--paths-to-scan[=PATHS] | Custom paths, e.g. --paths-to-scan='["./core"]' |
--source-branch[=BRANCH] | Source branch (default: HEAD) |
--target-branch[=BRANCH] | Target branch to compare against |
# Native:
vendor/bin/rector process # Auto-fix
vendor/bin/rector process --dry-run # Preview changes
# With a project-specific quality wrapper:
php artisan quality:rector --fix # Laravel
composer quality:rector -- --fix # Composer
Native flags:
| Flag | Description |
|---|---|
--dry-run | Preview changes without applying |
--clear-cache | Clear the Rector cache |
Wrapper-only flags (typical of a quality:* wrapper — verify in the project):
| Flag | Description |
|---|---|
--ignore-git | Skip Git check, check all files |
--paths-to-scan[=PATHS] | Custom paths |
--source-branch[=BRANCH] | Source branch (default: HEAD) |
--target-branch[=BRANCH] | Target branch to compare against |
There is no native single command for running all three tools. Run them in sequence:
# Full pipeline (native):
vendor/bin/rector process && vendor/bin/ecs check --fix && vendor/bin/phpstan analyse
# With a project-specific quality wrapper (if it ships these combined commands):
php artisan quality:refactor --fix # Rector + ECS
php artisan quality:finalize # Rector + ECS + PHPStan (full pipeline)
If step 3 finds errors → fix and repeat from step 2.
Detect commands from project (see Tool Detection above).
Config files are typically in the project root. Do NOT modify without explicit user permission.
Detect config location:
phpstan.neon, ecs.php, rector.phpphpstan.neon.dist instead of phpstan.neon| File | Tool | Purpose |
|---|---|---|
phpstan.neon | PHPStan | Level, paths, extensions, ignoreErrors, disallowed calls |
phpstan-baseline.neon | PHPStan | Baseline for existing errors (auto-managed, do NOT edit) |
ecs.php | ECS | Code style: rule sets, configured rules, skip list |
rector.php | Rector | Refactoring: rule sets, PHP version sets, skip list |
Read the actual config files to understand what rules are active:
level, paths, ignoreErrors, includes (baselines, extensions)Common patterns across projects:
disallowedFunctionCalls banning var_dump(), dd()phpstan-baseline.neon by hand.quality:* commands), it may regenerate the baseline automatically.Priority order for dealing with PHPStan errors:
// @phpstan-ignore-next-line — false positive: reason here
phpstan.neon changes ARE allowedAdding ignoreErrors entries to phpstan.neon is allowed when:
$this at runtime, PHPStan can't resolve artisan(),
get(), etc. on PHPUnit\Framework\TestCase)If unsure whether a phpstan.neon change is appropriate → ask the user before making the change.
phpstan-baseline.neon)ignoreErrors for individual files or specific code issues that should be fixed@phpstan-ignore-next-line without a reason commentSee also: php-coding rule → PHPStan section.
tests/Unit/ automatically use UnitTestCase as the base class (configured in tests/Pest.php).ignoreErrors patterns in phpstan.neon.By default, all tools only check files changed since the last commit.
| Flag | Effect |
|---|---|
| (default) | Only changed files (fast, for iterative work) |
--ignore-git | All files (cache still applies) |
--clear-cache | Changed files, but ignore cache |
--ignore-git --clear-cache | Complete fresh run of all files |
Check package.json for available tools:
| Indicator | Tool |
|---|---|
@biomejs/biome in devDependencies | Biome — linting + formatting |
typescript in devDependencies | TypeScript — type checking |
jest or vitest in devDependencies | Test runner |
eslint in devDependencies | ESLint — legacy linting (check if Biome replaces it) |
prettier in devDependencies | Prettier — legacy formatting (check if Biome replaces it) |
Biome replaces ESLint + Prettier in one tool.
biome.json or biome.jsoncassist.actions.source.organizeImports)# Check (dry-run) — shows errors without fixing
npx biome check .
# Fix — auto-fix all fixable issues (formatting + linting + imports)
npx biome check --write .
# Format only
npx biome format --write .
# Lint only
npx biome lint .
Check package.json scripts — projects typically define:
npm run biome # Check (dry-run)
npm run biome:fix # Auto-fix
Always prefer npm scripts over raw npx commands when they exist.
# Type check without emitting files
npx tsc --noEmit
# Via npm script (preferred)
npm run tscheck
tsconfig.json (may have tsconfig.app.json, tsconfig.node.json for different targets)strict: true should be enabled in all projectscompilerOptions.paths for import aliases# Run all tests
npm test
# Run specific test file
npx jest path/to/test.spec.ts
# Run with coverage
npx jest --coverage
# Watch mode
npx jest --watch
After JS/TS code changes, run this sequence:
1. npx biome check --write . → Auto-fix formatting + linting
2. npx tsc --noEmit → Verify type safety
3. npm test → Run test suite
Or via npm scripts:
1. npm run biome:fix → Auto-fix
2. npm run tscheck → Type check
3. npm test → Tests
If step 2 finds type errors → fix them in code, then re-run step 1 (Biome may reformat).
All PHP commands run inside the Docker container (make console or docker compose exec).
JS/TS commands run on the host or in a Node container, depending on the project setup:
Makefile / Taskfile.yml has targets for linting/testing.docker-compose.yml has a Node service.quality:* wrapper may expose different flags than the native tools — check the project's wrapper before assuming flags.-T flag to avoid TTY issues in non-interactive mode.vendor/bin/phpstan or vendor/bin/ecs directly — use the wrapper.phpstan-baseline.neon — it's auto-managed.tsc --noEmit) for TypeScript projects.--write if the intent is to fix (otherwise it's dry-run only).