Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add pekral/cursor-rules --skill create-missing-tests-in-prgit clone --depth 1 https://github.com/pekral/cursor-rulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pekral/cursor-rules/create-missing-tests-in-pr)<a href="https://agentmods.dev/skills/pekral/cursor-rules/create-missing-tests-in-pr"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/create-missing-tests-in-pr/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pekral/cursor-rules/create-missing-tests-in-pr"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/create-missing-tests-in-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.02326 |
| Opus 5.5 | $0.00024 | $0.00930 |
| Sonnet 5.5 | $0.00012 | $0.00465 |
| Haiku 4.5 | $0.00006 | $0.00233 |
Grade A, and why
create-missing-tests-in-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Constraint:
- Apply @rules/php/core-standards.mdc
- Apply @rules/git/general.mdc
- 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 - If you are not on the main git branch in the project, switch to it.
- This task is based on the existing pull request review.
- First read your existing code review for the current pull request and identify all testing recommendations related to current changes.
- Never change the assignment scope.
- Only add or modify tests when needed.
- Production code may only be changed if it is strictly required by the existing create-test skill or test infrastructure, otherwise do not modify it — the only exception is the Pre-existing issue handling workflow below, which lands its production-code fixes in their own separate commits.
- Use @skills/create-test/SKILL.md for all test-writing work.
Read, Map & Verify before writing tests (mandatory pre-flight):
Reading, mapping, and verifying come first; writing tests comes last. This pre-flight is blocking — do not add or modify a single line until all three steps pass, and never act on an assumption you have not confirmed by reading the code.
- Read — open and read the actual changed code and the code it depends on (callers, called methods, related existing tests, configuration). Confirm what the code does by reading it, not by guessing from the review text or names.
- Map — map the change's blast radius: every uncovered code path the review flagged, its call sites, the branches a test must exercise, and the existing test conventions, helpers, and fixtures to reuse instead of reinventing.
- Verify — check your assumptions against the real code and its observed behavior, and confirm each recommended test does not already exist before adding it. If what you read contradicts the review recommendation, surface the discrepancy instead of writing tests on a wrong premise.
Only after Read, Map, and Verify are complete may test-writing begin.
Steps:
- Load the current pull request context using GitHub CLI (
gh) first. Ifghis not available, use a GitHub MCP server. If neither is available, stop and return a failed result about missing GitHub tools. - Read your existing code review for the pull request.
- Extract all recommendations related to missing tests, missing scenarios, edge cases, regression coverage, and coverage gaps.
- Analyze the current branch changes against the review findings.
- Verify whether the recommended tests already exist in the codebase.
- Check whether current changes have 100% coverage for the changed files only, using the project's available coverage tooling (per the Coverage gate in
@skills/code-review/SKILL.md). Do not gate on the project-wide coverage percentage — if the project ships no coverage tooling at all, stop and report it as a blocker, and do not add a new bespoke coverage script to the consuming project. - If coverage is incomplete or recommended test scenarios are missing, use @skills/create-test/SKILL.md.
- Follow existing project test conventions, helpers, patterns, and abstractions.
- Prefer updating existing tests first. Create new tests only if required.
- Create deterministic every time!
- Make sure tests are deterministic and not flaky.
- In tests, avoid reflection; use mocks instead (even partial ones, if they are effective and easy to read).
- Tests must not contain conditions (e.g.,
if,switch); split conditional logic into separate test cases instead. - Use data providers where they improve readability and simplify repeated test cases.
- After adding or updating tests, run only the necessary tests for the current changes.
- If coverage tooling exists, verify that current changes are covered
with 100% coverage for the changed files only, using the project's available coverage tooling (per the Coverage gate in
@skills/code-review/SKILL.md) — do not gate on the full-suite coverage percentage. Delete any generated coverage report file once read so it is not accidentally committed. - If fixers or test-related wrappers exist in the project, use them (prefer Phing targets from
build.xml/phing.xml; fall back to Composer scripts incomposer.json). - Do not run the whole test suite unless it is required for the changed files workflow.
- If the review recommendation is already satisfied by existing tests, do not duplicate test coverage.
- Place new test files per
@rules/code-testing/general.mdcTest Organization — the test file path mirrors the namespace of the SUT (e.g.App\Service\Billing\InvoiceCalculator→tests/Service/Billing/InvoiceCalculatorTest.php), the file name is{ClassName}Test.php(or{ClassName}{Scenario}Test.phpfor an extracted scenario file of the same SUT), and cross-cutting tests sit under an intent-named directory (tests/Feature/<flow>,tests/Contract/<vendor>,tests/Integration/<area>). - Name every
it()/test()block to match the scenario the body asserts — plain-language descriptions such asit('returns zero for an empty cart')ortest('throws InvalidArgumentException when the discount is negative'). Never use placeholders (it('it works'),test('test1'),test('happy path')), method names (test('calculate'),it('handles getUser')), or descriptions that contradict the assertions, so the code-review test-organization gate passes when the PR is re-reviewed.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 131 lines · 59 tokens per session scan A 06f88137673f
create-missing-tests-in-pr is a skill published in the GitHub repository pekral/cursor-rules (11 stars, last pushed 19d ago), licensed MIT. It adds 59 tokens to every session and 2,326 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
Test Scaffold (Laravel/PHPUnit)
Generate PHP/Laravel (PHPUnit) test skeletons from specifications.
Laravel Dusk Testing
Expert-level Laravel Dusk browser testing skill for PHP/Laravel applications. Covers Chrome-based E2E testing, browser assertions, Page Objects, component testing, authentication helpers, and database integration.
commit
Fix, gate and commit the current change.
respond-review
Act on a reviewer agent's feedback systematically — categorize findings, apply fixes, verify tests still pass. Use after request-review returns a report, or when user wants to work through code review findings.
php-laravel
Use this skill when building Laravel applications — MVC structure, Eloquent ORM, service layer, validation, queues, and testing. This skill enforces: thin controllers, service layer for business logic, Eloquent best practices with eager loading, form request validation, and queue job structure. Requires Laravel 10+ or…
simulate-agents
Run Mock User and Auditor agents against a feature in fresh contexts before human review. Use after verify-work, before request-review, when user wants pre-review simulation.