testing-best-practices
Skill by Flatroy
Testing Best Practices is an agent skill with rules for designing and reviewing Laravel tests. It covers coverage, naming, assertions, test data, isolation, HTTP and security boundaries, and suite performance. It is for developers working on Laravel projects that use PHPUnit.
Install testing-best-practices
Built from the published package, never by AI.
git clone --depth 1 https://github.com/Flatroy/stupid-inventory-laravel /tmp/stupid-inventory-laravel && mkdir -p ~/.claude/skills && cp -r /tmp/stupid-inventory-laravel/.claude/skills/testing-best-practices ~/.claude/skills/testing-best-practicesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/Flatroy/stupid-inventory-laravel /tmp/stupid-inventory-laravel && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/stupid-inventory-laravel/.claude/skills/testing-best-practices ~/.gemini/antigravity-cli/skills/testing-best-practicesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install testing-best-practices in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
Testing Best Practices is an agent skill that gives rules for designing Laravel tests. Each rule file explains what to do and why. The rules cover test selection, naming, assertions, endpoint coverage, test data, isolation, security, suite performance, and test review. The skill tells the assistant to read nearby tests first and to follow project conventions over its own guidance.
The skill applies to Laravel projects that use PHPUnit. It points to search-docs for Laravel API syntax and to the PHPUnit 11.5.57 documentation for PHPUnit syntax. It is aimed at developers who write or review Laravel tests. It asks the assistant to report defects in the code under test before writing tests, and it does not add new test dependencies unless the user asks.
Written from the project's SKILL.md and checked against it.
What it can do
- What to testChooses which changed decisions, branches, validations, and authorizations need test coverage.
- Naming and structureSets rules for file layout, test names, and groups.
- AssertionsGuides arrange-act-assert structure and choosing the correct assertion.
- Endpoint testsCovers endpoint coverage, authentication, authorization, tenant isolation, and validation.
- Test dataExplains factories, test data ownership, and repeated input values.
- IsolationCovers fakes, mocks, outbound HTTP, time, randomness, and databases.
- Security testsCovers escaping, injection, cross-tenant access, and privilege checks.
- Suite performanceGives environment and CI settings for a slow test suite.
- Test reviewProvides a checklist for reviewing a test or a whole suite.
What you need
- Laravel project
- PHPUnit
Try asking
- Review the tests in this Laravel project for duplicated coverage
- Write PHPUnit feature tests for the orders endpoint with validation
- Check this policy and its tests for authorization gaps
Good to know
- Rules govern new tests; existing tests following project conventions are not rewritten.
- Real-browser tests need laravel/dusk, which this project does not install.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/testing-best-practices/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to testing-best-practices
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
testing-best-practices: common questions
Does Testing Best Practices install new test packages?
No. The skill says to use the test tools the project already installs and to add a new test dependency, plugin, or browser only after the user asks for it.
Does it support Pest or only PHPUnit?
The source says to use framework guidance or search-docs for Pest and PHPUnit syntax, and that this project uses PHPUnit.
Can it write real-browser tests?
The skill mentions laravel/dusk only if the user asks for a real-browser test, because that package and a browser download are not installed in this project.
How do I install testing-best-practices?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is testing-best-practices free?
The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.
Is testing-best-practices safe to use?
It scores 77 of 100. Grades: maintenance A, licence C, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to testing-best-practices?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
