create-test

Create or update deterministic tests covering changed code paths.

Updated Aug 15, 2025
One-click install
npx skills add https://github.com/pekral/pekral.cz --skill create-test-pekral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-test
Source: https://github.com/pekral/pekral.cz/tree/main/.claude/skills/create-test
Command: npx skills add https://github.com/pekral/pekral.cz --skill create-test-pekral

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you keep your test suite reliable by ensuring new or changed code is covered with deterministic tests that follow the project’s conventions.

Core Features & Use Cases

  • Coverage-focused test creation: Finds existing tests and adds or updates coverage for changed code paths.
  • Conventions-aware Laravel support (when applicable): Applies additional Laravel-specific rules for projects using Laravel and related stacks.
  • Diff-scoped verification: Runs only the diff-scoped coverage command when coverage tooling is available, avoiding full-suite coverage runs.

Quick Start

Use the create-test skill to update or add tests for the changes you just made so that all changed code paths are covered and the diff-scoped coverage check reports 100%.

Frequently Asked Questions about create-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate tests for changed code paths in my current diff?

To generate tests for changed code paths, this skill locates existing tests and adds or updates deterministic coverage specifically for the modified lines in your diff, ensuring new code is protected. It enforces project rule sets and maintains convention-compliant test style.

What is diff-scoped code coverage verification and how does it work?

Diff-scoped code coverage verification runs only the coverage commands targeting your current changes rather than the full test suite. This approach validates that newly modified code paths achieve 100% coverage while avoiding the time cost of executing unrelated tests.

Can I use this to add Laravel and Pest tests following my project conventions?

Yes, you can add Laravel and Pest tests following your project conventions. The skill applies conventions-aware rules for Laravel stacks, enforces project rule sets, and removes flakiness to maintain deterministic, convention-compliant test style.

What's the best way to update existing tests when missing coverage is identified?

The best way to update existing tests when missing coverage is identified is by extending the located test files with deterministic tests for the specific modified code paths. The skill minimizes production changes and validates the results using diff-scoped coverage commands.

Does this test generation approach work with Phing and other PHP build tools?

Yes, this test generation approach works with PHP build tools like Phing. It integrates into ongoing development workflows by locating existing tests, extending coverage for missing code paths, and validating through diff-scoped coverage commands without requiring full-suite runs.