2.6k
GitHub Stars
3
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill test-sentinel- _meta.json278 B
- claw.json583 B
- SKILL.md6.5 KB
Overview
This skill automates test creation, execution, linting, and targeted fixes for Python projects modeled after Next.js App Router stacks with Supabase/Firebase and Playwright workflows. It follows a mandatory planning protocol to ensure tests are meaningful, maintainable, and resilient. The skill runs unit, integration, and E2E tests, analyzes failures, applies fixes, and re-runs the suite until quality gates are met.
How this skill works
Before any code changes, the skill performs a planning phase: it scopes the target, surveys source files, builds a test plan, and lists mocks. It then writes colocated Vitest unit and integration tests, Playwright E2E flows, and factory fixtures, runs the suite, and inspects failures to determine whether to fix tests or application code. Finally, it runs linters, formatters, and type checks and commits changes when tests and QA gates are satisfied.
When to use it
- Add or expand test coverage for a feature, file, or entire repository.
- Diagnose and fix failing tests or flaky test behavior.
- Validate API routes, server actions, and data access logic with mocked Supabase/Firebase clients.
- Create E2E flows for critical user journeys (auth, onboarding, main feature).
- Run linting, formatting, and auto-fix steps before a release or CI merge.
Best practices
- Always execute the planning protocol before writing tests to avoid brittle coverage.
- Colocate tests and fixtures with the code under test for faster context and maintenance.
- Mock external services (Supabase, Firebase, fetch) at the test level to preserve isolation.
- Prefer factory functions for test data and clean up side effects after each test.
- Run the full suite, linter, and type checker before committing; include coverage checks.
Example use cases
- Write unit tests for utility functions and Zod schemas in src/lib/**.
- Create integration tests for API routes using a mocked Supabase server client.
- Add Playwright E2E tests to verify login and dashboard flows in CI.
- Investigate a flaky test, add retries or isolation, and document the TODO.
- Auto-fix lint and formatting issues, then re-run tests and commit changes.
FAQ
It scopes the work, surveys source code, lists scenarios and mocks, and prevents brittle tests by ensuring test design aligns with the implementation.
How are external services handled in integration tests?
External dependencies like Supabase and Firebase are mocked at the test level using colocated mocks to isolate behavior and simulate success and error responses.
When should I auto-fix versus update tests?
If failures reflect incorrect expectations or outdated tests, update the tests. If failures reveal real application bugs, fix the source code and re-run the suite.