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 agentmods add skills/pekral/cursor-rules/create-missing-tests-in-prnpx 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.svg" alt="Measured on agentmods" 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 | $0.00059 | $0.02326 |
| Opus 5 | $0.00030 | $0.01163 |
| Sonnet 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 3d 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.
- 3d 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 (6 stars, last pushed 3d ago), licensed MIT. It adds 59 tokens to every session and 2,326 once invoked, about $0.0003 per session on Opus 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
browse-and-evaluate
Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.
loop-engineering
Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).
render-airdrop-carousel
Assemble a viral iOS "AirDrop" notification-carousel video ad (≈6–8s, 9:16) from a brand line plus 6–16 real product photos — a native AirDrop share-sheet card ("Brand would like to share a · Decline / Accept") springs up and its preview window CYCLES through the products, landing on a range/lineup payoff with an…
render-3d-product-showcase
Assemble a premium 3D product-showcase ad from a config — four beat clips (an orbiting hero rotation, a macro push-in, a physics reveal, a typographic close) normalized to the brand-color canvas, hard-concatenated in order, closed on a deterministic Playwright brand end card, and mixed under one instrumental bed at…
vfx-text-cursor
Cursor light trail, chromatic rays, and directional flares for word-by-word quote reveals in video intros.
music
Generate, remix, extend, edit, and analyze AI music (Mureka). Triggers on: "音乐", "music", "生成音乐", "generate music", "翻唱", "cover", "混音", "remix", "续写", "extend", "纯音乐", "instrumental", "配乐", "soundtrack", "分轨", "stem", "识别歌词", "recognize lyrics", "作曲", "compose", "create a song", "做一首歌".