RU

run-db-matrix

Runs plugin test matrices locally using both MongoDB and PostgreSQL.

Install

mkdir -p .claude/skills/run-db-matrix && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18160" && unzip -o skill.zip -d .claude/skills/run-db-matrix && rm skill.zip

Installs to .claude/skills/run-db-matrix

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when the user wants to run a single plugin's full Mongo + Postgres test matrix locally. Wraps `pnpm test:matrix <plugin>`.
126 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • →Run a single plugin's Mongo and Postgres test matrix locally
  • →Execute integration tests against multiple database engines
  • →Verify no leaked processes after tests complete
  • →Generate types for a plugin via `pnpm generate <slug>`
  • →Migrate a plugin's database via `pnpm migrate <slug>`

How it works

The skill executes `pnpm test:matrix <slug>` and `pnpm test:container <slug>` to run integration tests against Mongo and Postgres, then checks for leaked processes.

Inputs & outputs

You give it
A plugin slug (e.g., 'my-plugin')
You get back
Test results from running the Mongo and Postgres test matrix

When to use run-db-matrix

  • →Run plugin test matrix
  • →Verify database integration
  • →Test production parity

About this skill

Run the DB matrix

  1. Ask the user which plugin if not obvious from context.
  2. Run: pnpm test:matrix <slug>. This runs the plugin once per lane its test:matrix script names: DB_MATRIX=mongo and DB_MATRIX=postgres everywhere, and for analytics also DB_MATRIX=sqlite twice, once with the native engine on worker threads (what a WAL file with a 5 s busy timeout gets) and once forced onto the main thread (ANALYTICS_SQLITE_THREAD=main). Mongo runs in-memory; Postgres runs in a real postgres:16 container via testcontainers (Docker required; testcontainers needs DOCKER_HOST pointed at a Docker socket it cannot find on its own, such as OrbStack's); SQLite runs on a temp libsql file. Coverage is decided in two places: the package's test:matrix script decides which spec files run in each lane, and each describeForDb block's dbs option decides which lanes that block joins. Most plugins' scripts name individual spec files (grep -n '"test:matrix"' packages/*/package.json), so a spec missing from that list is silently excluded from Postgres no matter how it is written; analytics is currently the only plugin whose script runs its whole tests/int directory on every lane. A block pinned to one DB likewise runs only where the pin allows.
  3. One lane alone, from the package directory: DB_MATRIX=sqlite pnpm exec vitest run tests/int. Analytics' config caps a Mongo lane at 3 workers and a Postgres lane at 4 and runs a SQLite lane in forked workers; pass --maxWorkers=3 on another plugin's Mongo lane. Run one lane at a time.
  4. For both DBs in containers (max prod parity): pnpm test:container <slug>.
  5. After tests complete, verify no leaked processes: pnpm check:processes and docker ps (testcontainers leave a ryuk reaper behind for a few seconds). Kill with pnpm clean:processes if needed.
  6. NEVER run pnpm exec payload generate:* or pnpm exec payload migrate:* directly to "regenerate types" or "set up the DB" as part of debugging; the bin script hangs. Use pnpm generate <slug> / pnpm migrate <slug> which route through scripts/payload.sh (120s deadline).

When not to use it

  • →When the user does not want to run a plugin's full Mongo + Postgres test matrix
  • →When the user is not testing locally
  • →When the user wants to run `pnpm exec payload generate:*` or `pnpm exec payload migrate:*` directly

Limitations

  • →Requires Docker for Postgres container via testcontainers
  • →Does not directly run `pnpm exec payload generate:*` or `pnpm exec payload migrate:*`
  • →Focuses on a single plugin's test matrix

How it compares

This skill provides a standardized and verified method for running a plugin's full database test matrix locally, including process cleanup, which is more structured than manual command execution.

Compared to similar skills

run-db-matrix side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
run-db-matrix (this skill)04moNo flagsIntermediate
generating-database-seed-data103moReviewIntermediate
testing-workflow1612moReviewIntermediate
generate-validation-notebook06moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

testing-workflow

amo-tech-ai

Comprehensive testing workflow for E2E, integration, and unit tests. Use when testing applications layer-by-layer, validating user journeys, or running test suites.

1683

generate-validation-notebook

monte-carlo-data

Generate SQL validation notebooks for dbt changes. Pass a GitHub PR URL or local dbt repo path.

00

validation

ProfPowell

Validate data with JSON Schema and AJV. Use when validating API requests, form submissions, database inputs, or any data boundaries. Provides deterministic validation with consistent error formats.

00

cocoindex

cocoindex-io

Comprehensive toolkit for developing with the CocoIndex library. Use when users need to create data transformation pipelines (flows), write custom functions, or operate flows via CLI or API. Covers building ETL workflows for AI data processing, including embedding documents into vector databases, building knowledge graphs, creating search indexes, or processing data streams with incremental updates.

6116

cqrs-implementation

wshobson

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

753

Search skills

Search the agent skills registry