Skip to main content
skill CX Codex

renderlint-e2e — Claude Code skill: setup and features

renderlint-e2e is a Claude Code skill that connects renderlint to Playwright, Storybook, and API mocks. It checks dialogs, wizard steps, and other UI states.

MIT ★ 687 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ngocanhnckh/renderlint --skill renderlint-e2e -a claude-code
Open on GitHub

What renderlint-e2e does

renderlint-e2e connects renderlint with the project's existing Playwright tests, Storybook stories, and API mocks. Its Playwright fixture checks the page after each passing test, revisits URLs with the test's cookies and responses, and allows checks during a flow with renderlint('review dialog'). The reporter combines worker findings into one report and fails the run when renderlint finds errors.

For Storybook, it checks each story in its own iframe after the play function completes; a build can run with npx storybook build, followed by npx renderlint storybook. API data can come from MSW 2.x handler files or a HAR recording through mockFrom, while explicit mock entries take precedence. Pages on other origins, including payment and identity-provider pages, are skipped.

What it helps with

  • check a dialog reached by an end-to-end test
  • catch layout issues in wizard steps and filled forms
  • recheck visited URLs with test cookies and API responses
  • scan Storybook stories after their play functions
  • reuse MSW handlers or a HAR recording for API data

Example prompts for the agent

  • Connect renderlint-e2e to the existing Playwright tests and check the page after every passing test.
  • Add an in-flow check for the dialog state with renderlint('review dialog').
  • Scan every Storybook story after its play function and load API data from src/mocks/handlers.ts.

How to install renderlint-e2e

1Skills CLI (Vercel)

npx skills add ngocanhnckh/renderlint --skill renderlint-e2e -a claude-code

2Manually: put the files in place

~/.claude/skills/renderlint-e2e/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/renderlint-e2e/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about renderlint-e2e

How do I install renderlint-e2e in Claude Code?

Run npx skills add ngocanhnckh/renderlint --skill renderlint-e2e -a claude-code, then use ~/.claude/skills/renderlint-e2e/SKILL.md.

What does renderlint-e2e do?

The skill connects renderlint to Playwright tests, Storybook stories, and project API mocks. It checks states reached by test actions, visited URLs, and stories after their play functions finish.

What API data can renderlint-e2e use?

It accepts MSW 2.x handler files through mockFrom or replays responses from a HAR recording. Explicit mock entries take priority, and a failed uncovered request produces a broken-resource warning.

Source text

SKILL.md · MIT
---
name: renderlint-e2e
description: Connect renderlint to the test setups this project already has, so every state they reach gets checked. Covers the Playwright Test fixture and reporter (states reached by clicks, dialogs, multi-step flows, each role a test signs in as), Storybook stories, and reusing MSW handlers or a HAR recording as renderlint's API data. Use when the project has Playwright tests, a Storybook, or MSW mocks.
---

# Reuse the project's tests, stories and mocks

The CLI crawls pages. Some states only exist after clicks: a dialog, step 3 of a wizard, a filled form, a menu. A project's end-to-end tests and stories already reach those states. Let renderlint check them where they are.

## Playwright Test

1. Wrap the project's `test`, once, in a fixtures file:

   ```ts
   // tests/fixtures.ts
   import { test as base } from '@playwright/test';
   import { withRenderlint } from '@yitec/renderlint/playwright';
   export const test = withRenderlint(base);
   export { expect } from '@playwright/test';
   ```

   Then change the specs to `import { test, expect } from './fixtures'`. If they already import a custom fixture file, extend that one instead: `withRenderlint(existingTest)`.

2. Add the reporter, which merges every worker's findings into one report and fails the run on errors:

   ```ts
   // playwright.config.ts
   reporter: [['list'], ['@yitec/renderlint/playwright/reporter']],
   ```

3. Run the suite as usual: `npx playwright test`. The report goes to `.renderlint/` like a CLI run.

What gets checked:
- **At the end of every passing test,** the page as the test left it (dialog open, wizard step 2), at every viewport and in dark mode. The page is put back exactly as it was afterwards.
- **Every URL a test visited** is re-opened at the end of the worker with the test's cookies, storage and API responses, and checked like the CLI does (touch on phones, data stress).
- **Mid-test,** where a state matters: `test('…', async ({ page, renderlint }) => { …; await renderlint('review dialog'); })`.

Options go in `withRenderlint(base, { … })` or `test.use({ renderlintOptions: { … } })`:
- `role`: name in the report; defaults to the project name, so one project per role works out of the box.
- `auto: 'visits' | 'end' | false`.
- `failTests`: also fail the test itself; the default only fails the run.
- any renderlint config key: `viewports`, `rules`, `ignore`.

Tests keep their own result unless `failTests: true`. Pages on other origins (payment, identity provider) are not checked.

## Storybook

```bash
npx storybook build && npx renderlint storybook                 # storybook-static/
npx renderlint storybook http://localhost:6006                   # a running Storybook
npx renderlint storybook --globals theme:dark --stories "Forms/*"
```

- Every story in `index.json` (Storybook 7+) is checked in its own iframe, after its play function finishes.
- Tag a story `skip-renderlint` to leave it out.
- Component stories (`padded` or `centered` layout) skip page-level rules such as `viewport-overflow`.
- Add stories with worst-case args (long names, empty lists) so they get checked too.

## Reuse API mocks the project already has

```json
{ "mockFrom": ["src/mocks/handlers.ts"] }
```

- **MSW 2.x handler files:** TypeScript is compiled with the project's esbuild.
- **HAR recordings:** record once against a real backend (`page.routeFromHAR` or the browser's DevTools), then replay `"mockFrom": ["recordings/app.har"]`.
- **Explicit `mock` entries win** over both.
- **Uncovered requests:** with `mockFrom`, a request none of them answers that then fails is a `broken-resource` warning. Add it to the handlers rather than ignoring it.

Details: [docs/playwright.md](https://github.com/ngocanhnckh/renderlint/blob/master/docs/playwright.md), [docs/storybook.md](https://github.com/ngocanhnckh/renderlint/blob/master/docs/storybook.md).

© ngocanhnckh · MIT · ngocanhnckh/renderlint

Similar skills

All skills for Testing and QA →

From the same set3

Project sponsors

Companies that keep this analytics open