Best for
- Tests are running too slowly (locally or in CI)
- Database setup/teardown is a bottleneck
- Parallel testing needs optimization
event4u-app/agent-config/src/skills/test-performance/SKILL.md
Use when optimizing test suite performance — database setup, seeder optimization, parallel testing, CI pipeline efficiency, or RefreshDatabase alternatives.
Decision brief
Use when optimizing test suite performance — database setup, seeder optimization, parallel testing, CI pipeline efficiency, or RefreshDatabase alternatives.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/test-performance"Inspect the Agent Skill "test-performance" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/test-performance/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Before optimizing, always measure:
Tests are running too slowly (locally or in CI)
Before optimizing, always measure:
find tests/ app/Modules//Tests/ -name ".php" | xargs grep -l "it(" | wc -l
grep -rh "it(" tests/Unit/ app/Modules//Tests/Unit/ --include=".php" | wc -l grep -rh "it(" tests/Component/ app/Modules//Tests/Component/ --include=".php" | wc -l grep -rh "it(" tests/Integration/ app/Modules//Tests/Integration/ --include=".php" | wc -l
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill when:
Before optimizing, always measure:
# Count tests per suite
find tests/ app/Modules/*/Tests/ -name "*.php" | xargs grep -l "it(" | wc -l
# Count by suite type
grep -rh "it(" tests/Unit/ app/Modules/*/Tests/Unit/ --include="*.php" | wc -l
grep -rh "it(" tests/Component/ app/Modules/*/Tests/Component/ --include="*.php" | wc -l
grep -rh "it(" tests/Integration/ app/Modules/*/Tests/Integration/ --include="*.php" | wc -l
# Count migrations
ls database/migrations/*.php | wc -l
# Count seeders
find database/seeders database/seeder-data -name "*.php" -path "*/data/*" | wc -l
The typical test lifecycle is:
Process Start → Migrate → Seed → [Test → Rollback] × N → Process End
↑ expensive (once per worker)
Check these areas in order of typical impact:
| Area | What to check | Typical impact |
|---|---|---|
| Migration count | How many CREATE TABLE statements? | High if >20 |
| Schema dump | Is database/schema/ used? | High if missing |
| Seeder INSERT method | Individual save() vs bulk insert? | Medium |
| Truncation | Per-seeder truncate vs centralized? | Low (but causes correctness issues) |
| Connection discovery | Dynamic getPdo() probing? | Low |
| Parallel worker setup | Does each worker re-migrate? | High |
Laravel's schema:dump consolidates all migrations into one SQL file.
Instead of running N individual CREATE TABLE migrations, it loads one SQL dump.
php artisan schema:dump --database=api_database
# Generates database/schema/api_database-schema.sql
Savings: 58 migrations → 1 SQL load = ~10-25s per worker.
Instead of each parallel worker running migrate+seed independently:
# Prepare template
php artisan migrate:fresh --database=template_db
php artisan db:seed --database=template_db
# Clone per worker
mysqldump template_db | mysql worker_db_test_1
Savings: Eliminate per-worker migrate+seed entirely.
Add a config flag to skip database setup when DB is already prepared:
// config/testing.php
'skip_migrate_seed' => EnvHelper::boolean('TESTING_SKIP_MIGRATE_SEED', false),
Developer workflow: make migrate-testing once, then make test-quick repeatedly.
Replace individual $model->save() with bulk insert:
// Before: N INSERT statements
foreach ($data as $row) {
$model = new MyModel($row);
$model->save();
}
// After: 1 INSERT statement
MyModel::insert($data);
$models = MyModel::whereIn('id', $ids)->get();
Per-seeder truncation is redundant after migrate:fresh and causes:
Make truncation configurable, default off:
// config/testing.php
'seed_truncate' => EnvHelper::boolean('DB_SEED_TRUNCATE', false),
Replace dynamic getPdo() probing with explicit config:
// config/testing.php
'connections_to_transact' => ['api_database', 'customer_database'],
agents/reference/docs/seeders.md — seeder conventions (if exists)--filter.Alternatives
wshobson/agents
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
K-Dense-AI/scientific-agent-skills
Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.
Jeffallan/claude-skills
Analyzes code diffs and files to identify bugs, security vulnerabilities (SQL injection, XSS, insecure deserialization), code smells, N+1 queries, naming issues, and architectural concerns, then produces a structured review report with prioritized, actionable feedback. Use when reviewing pull requests, conducting code quality audits, identifying refactoring opportunities, or checking for security issues. Invoke for PR reviews, code quality checks, refactoring suggestions, review code, code quali
affaan-m/ECC
Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.