Syntic
← All skills
EngineeringFreeCommunityv1.0.0

review

Use when systematically reviewing Playwright test files for anti-patterns, best-practice gaps, and coverage issues.

About this skill

Use when systematically reviewing Playwright test files for anti-patterns, best-practice gaps, and coverage issues.

SKILL.md

review.SKILL.md

Place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.

SKILL.md
---
name: review
description: Use when systematically reviewing Playwright test files for anti-patterns, best-practice gaps, and coverage issues.
category: Engineering
version: 1.0.0
tools: []
---

# Review Playwright Tests

Systematically review Playwright test files for anti-patterns, best practices, and coverage gaps.

## Scope

Accepts:
- A file path: review that specific test file
- A directory: review all test files in the directory
- Empty: review all tests in the project's configured test directory

## Gathering Context

- Read Playwright configuration for project settings
- Identify all `*.spec.ts` / `*.spec.js` files in scope
- For single-file reviews, check related page objects and fixtures

## Anti-Patterns Assessment

Evaluate test files against 20 anti-patterns:

**Critical (must fix):**
- `waitForTimeout()` usage (use role-based assertions instead)
- Non-web-first assertions (`expect(await ...)`)
- Hardcoded URLs instead of `baseURL` from config
- CSS/XPath selectors when role-based alternatives exist
- Missing `await` on Playwright method calls
- Shared mutable state between test cases
- Test execution order dependencies

**Warning (should fix):**
- Tests longer than 50 lines (consider splitting)
- Magic strings without named constants
- Missing error and edge case test coverage
- `page.evaluate()` for operations locators can perform
- Nested `test.describe()` more than 2 levels deep
- Generic test names ("should work", "test 1")

**Info (consider):**
- Missing page objects for pages with 5+ locators
- Inline test data instead of factory/fixture patterns
- Missing accessibility assertions
- No visual regression tests for UI-heavy pages
- Console error assertions not checked
- Network idle waits instead of specific interaction assertions
- Missing `test.describe()` grouping

## Scoring Methodology

Rate each file 1-10:
- **9-10**: Production-ready, follows all patterns
- **7-8**: Good code, minor improvements possible
- **5-6**: Functional but has anti-patterns
- **3-4**: Significant issues, likely flaky
- **1-2**: Needs rewrite

## Review Report Output

For each file:
- Score (1-10)
- Critical issues found with line numbers
- Warning-level issues
- Suggestions for improvement
- Suggested fixes (ask user before applying)

## Project-Wide Review

For large test suites, parallelize review of individual files, then aggregate results into summary table showing:
- Total files reviewed, average score
- Critical issue count, warning count
- Coverage gaps (pages/features with no tests)

Install

Syntic App

  1. 1Create a dedicated folder for this skill in your local skills library.
  2. 2Place SKILL.md into that folder.
  3. 3Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1Save SKILL.md in your local Syntic Code skills directory.
  2. 2Keep related files in the same skill folder.
  3. 3Run in a safe environment and validate outputs.