01
It starts by itself
test files changed. Runs in GitHub Actions or Claude Code routine.
- ↻ test files changed
pull_request touches test or spec files
Tests check behavior, not implementation.
Install the Frontend Testing Best Practices skill and make it a habit: follow https://gethabit.dev/skills/sergiodxa/frontend-testing-best-practices.md
2K installs92 starsMIT licenceSource on GitHub ↗

Frontend Testing Best Practices
by sergiodxa · 2K installs
The skill
The frontend testing best practices skill helps frontend developers write and review tests that favor E2E over unit tests, keep mocking minimal and test behavior instead of implementation.
Only when you ask.
The habit
Tests check behavior, not implementation.
↻ Runs by itselftest files changed
When does it start? How does it check its work? What does it remember?
Stops after one pull request per run.
Collect new and changed unit and E2E tests in the pull request.
Flag component unit tests and heavy mocking that should be E2E tests.
Confirm E2E tests sit in e2e/tests/ and unit tests sit beside pure functions.
Prefer role, then label, then text, then test ID.
Run the tests and list findings by rule.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the Frontend Testing Best Practices skill helps.
For pure functions, placed next to the source file.
The skill says three or more mocks means you should write an E2E test.
Copy the prompt at the top into your agent. It installs the skill from sergiodxa/agent-skills and sets up the habit. Or run npx skills add sergiodxa/agent-skills --skill frontend-testing-best-practices.
Yes. It is published under MIT. Habit is free too.
Install the Frontend Testing Best Practices skill and make it a habit: follow https://gethabit.dev/skills/sergiodxa/frontend-testing-best-practices.md
All sergiodxa skills →More code skills →
Works in
Made by sergiodxa, published under MIT. Habit links to the original and never changes it. Is this your skill?