create-test
Skill10 starsChanged 4 months agoMITView on GitHub
Use when create or update tests to ensure full coverage for current changes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- flyme0000/claude-skillstheir own version, first seen Jun 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- flyme0000/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-problemSkill
- api-reviewSkill
- article-writingSkill
- assignment-compliance-checkSkill
- automation-audit-opsSkill
- autonomous-loopsSkill
- benchmark-optimization-loopSkill
- benchmarkSkill
- blueprintSkill
- class-refactoringSkill
- cleanup-local-branchesSkill
- codebase-simplification-auditSkill
- code-review-bugsnagSkill
- code-review-githubSkill
- code-review-jiraSkill
- code-reviewSkill
- composer-updateSkill
- create-issues-from-textSkill
- create-issueSkill
- create-missing-tests-in-prSkill
- design-systemSkill
- docker-patternsSkill
- e2e-testingSkill
- frontend-a11ySkill
- frontend-design-directionSkill
- frontend-patternsSkill
- frontend-slidesSkill
- git-workflowSkill
- laravel-authorization-reviewSkill
- laravel-securitySkill
- laravel-telescopeSkill
- latency-critical-systemsSkill
- merge-github-prSkill
- mysql-patternsSkill
- mysql-problem-solverSkill
- penetration-testerSkill
- postgres-patternsSkill
- prepare-issue-contextSkill
- process-code-reviewSkill
- product-capabilitySkill
- production-auditSkill
- pr-staged-merge-planSkill
- pr-summarySkill
- record-project-memorySkill
- redis-patternsSkill
- refactor-entry-point-to-actionSkill
- refresh-claude-mdSkill
- resolve-issueSkill
- rewrite-tests-pestSkill
- security-bounty-hunterSkill
- security-reviewSkill
- security-threat-analysisSkill
- seoSkill
- skill-creatorSkill
- slack-messagingSkill
- smartest-project-additionSkill
- test-driven-developmentSkill
- tester-cookbookSkill
- test-like-humanSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 16 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Create or update tests to cover current changes according to project conventions.
- Very specific: line 18
If the current project uses Laravel, also apply @rules/laravel/laravel.mdc, @rules/laravel/architecture.mdc, @rules/laravel/filament.mdc, …
- Distinctive: line 19
Do not modify production code unless strictly required — the only exception is the Pre-existing issue handling workflow below, which lands …
- Distinctive: line 31
Only after Read, Map, and Verify are complete may test-writing begin.
- Distinctive: line 42
Prefer updating existing tests
- Distinctive: line 43
Create new tests only if necessary
- Distinctive: line 44
Follow project conventions and helpers
- Distinctive: line 56
Run relevant tests after each change and confirm they pass
- Distinctive: line 61
Ensure 100% code coverage for all changed or added code paths
- Distinctive: line 66
Run available fixers on changed test files and fix any violations
- Very specific: line 67
Run available checkers/analyzers on changed test files and resolve all reported errors by rewriting the flagged code, never by adding a …
- Very specific: line 70
Run a quick code review of the created/updated tests against @rules/code-testing/general.mdc
- Very specific: line 86
Use a Conventional Commits subject per @rules/git/general.mdc: fix(<scope>): pre-existing — <description> for bugs and security, …
- Distinctive: line 92
If a pre-existing issue is non-trivial (would significantly expand the change or requires architectural discussion), do not fix it.
- Distinctive: line 107
Prefer updating existing tests over creating new ones
- Distinctive: line 108
Keep tests simple and deterministic
- Distinctive: line 111
Follow project test conventions strictly
- Distinctive: line 112
Prefer minimal tests for maximum coverage
- Distinctive: line 113
Use data providers where they improve readability and reduce duplication
- Distinctive: line 114
Keep tests readable and maintainable
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 — the only exception is the Pre-existing issue handling workflow below, which lands its production-code fixes in their own separate commits
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 code under test 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 names or the change description.
- Map — map the change's blast radius: every changed code path, its call sites, the data-flow 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 (run the code path or an exploratory assertion where applicable). If what you read contradicts the change description, stop and surface the discrepancy instead of writing tests on a wrong premise.
Only after Read, Map, and Verify are complete may test-writing begin.
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
- 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. When changing what a test asserts, rename the description in the same change so the code-review test-organization gate passes downstream.
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 incomposer.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 by rewriting the flagged code, never by adding a suppression annotation (
@rules/php/core-standards.mdcPHP Practices)
7. Test Review
- Run a quick code review of the created/updated tests against
@rules/code-testing/general.mdc - Fix any findings before finalizing
8. Pre-existing issue handling
While writing tests, you may uncover problems that are unrelated to the current change but were already present in the code you had to read or exercise. The following categories qualify:
- Bugs — incorrect logic, broken edge cases, or runtime errors revealed by exploratory test runs, but already present before this task.
- Project-rule violations — code that contradicts any rule listed in this skill's Constraints block or any other rule under
.claude/rules/. - Security vulnerabilities — anything
@rules/security/backend.md,@rules/security/frontend.md, or@rules/security/mobile.mdwould flag.
Rules:
- Do not silently ignore a pre-existing issue you encountered in code you had to read or exercise to write the tests for the current change.
- Do not expand scope by actively scanning unrelated files for pre-existing issues. Limit attention to files already touched or exercised by the current change.
- Land each pre-existing fix (and its regression test) in its own separate commit, distinct from the test-coverage commit for the current change:
- Use a Conventional Commits subject per
@rules/git/general.mdc:fix(<scope>): pre-existing — <description>for bugs and security,refactor(<scope>): pre-existing — <description>for rule violations without behavior change. - The
pre-existing —prefix is mandatory so reviewers can identify these commits at a glance. - Test coverage workflow depends on the commit type:
fix(<scope>): pre-existing — …(bug, security) — add the regression test in the same commit as the fix; the test must fail before the fix lands and pass after.refactor(<scope>): pre-existing — …(project-rule violation, behavior-preserving) — apply@rules/refactoring/general.mdcTest Coverage Contract: when the target lines are below 100% coverage, author a dedicatedtest(<scope>): cover <area> before pre-existing refactorcommit before the refactor commit, and do not modify pre-existing tests inside the refactor commit (mechanical renames forced by the refactor itself stay exempt and must be flagged in the commit body).
- Use a Conventional Commits subject per
- The "Do not modify production code unless strictly required" constraint above is overridden for these fixes — the production-code change is the fix itself, and it lives in its own commit.
- If a pre-existing issue is non-trivial (would significantly expand the change or requires architectural discussion), do not fix it. Surface it in the skill's output report as a deferred follow-up with the reason.
Output
- Created or updated test files
- Coverage status for current changes (must be 100%)
- Test review result
- List of pre-existing fix commits (if any), each with a one-line rationale, plus any pre-existing issue deferred as a follow-up with the reason
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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

