create-test · git:20260528.6337bf3 · 2026-05-28 · sha256 ac72d36a44bf9896
create-test git:20260528.6337bf3A
Immutable. This exact content never changes and is served at /api/v1/blob/ac72d36a44bf9896.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_vswgxua2pdmxqhvg/ac72d36a44bf98964d6a3f8ddffa4870c066e5cd41f151cac38ffbb06b330702.json
Then /plugin install create-test@markdownregistry-vswgxua2pdmxqhvg in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
---
name: create-test
description: Use when create or update tests to ensure full coverage for current changes
license: MIT
metadata:
author: Petr Král (pekral.cz)
---
# Create Test
## Purpose
Create or update tests to cover current changes according to project conventions.
---
## Constraints
- Apply @rules/code-testing/general.mdc
- If the current project uses Laravel, also apply `@rules/laravel/laravel.mdc`, `@rules/laravel/architecture.mdc`, `@rules/laravel/filament.mdc`, and `@rules/laravel/livewire.mdc`
- Do not modify production code unless strictly required
---
## Execution
### 1. Analyze Context
- Locate existing tests
- Identify missing coverage for changed code
### 2. Create or Update Tests
- Prefer updating existing tests
- Create new tests only if necessary
- Follow project conventions and helpers
### 3. Ensure Coverage
- Cover all changed code paths
- Include:
- happy paths
- edge cases
- regression scenarios
### 4. Validate
- Run relevant tests after each change and confirm they pass
- Ensure deterministic behavior
- Remove flakiness
### 5. Verify Coverage
- Ensure 100% code coverage for all changed or added code paths
- If coverage tooling exists, verify coverage **for the changed files only**, using the project's available coverage tooling (per the Coverage gate in `@skills/code-review/SKILL.md`) and verify the result. Do not gate on a project-wide coverage percentage — full-suite coverage is for release gates, not for verifying current changes. Delete any generated coverage report file once read so it is not accidentally committed.
### 6. Code Style and Quality Gates
- Discover available fixers and checkers (prefer Phing targets from `build.xml`/`phing.xml`; fall back to Composer scripts in `composer.json`)
- Run available fixers on changed test files and fix any violations
- Run available checkers/analyzers on changed test files and resolve all reported errors
### 7. Test Review
- Run a quick code review of the created/updated tests against `@rules/code-testing/general.mdc`
- Fix any findings before finalizing
---
## Output
- Created or updated test files
- Coverage status for current changes (must be 100%)
- Test review result
---
## Principles
- Prefer updating existing tests over creating new ones
- Keep tests simple and deterministic
- Cover behavior, not implementation
- Focus on changed code only
- Follow project test conventions strictly
- Prefer minimal tests for maximum coverage
- Use data providers where they improve readability and reduce duplication
- Keep tests readable and maintainable