/syarif-laravel-ai-skills:responsive-ui-testingfrom syarif-laravel-ai-skills
Audits Laravel UI responsiveness with Playwright across mobile, tablet, and desktop viewports. Checks overflow, clipping, forms, tables, modals, navigation, and Livewire state changes.
Ships in syarif-laravel-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when asked to test whether a Laravel application interface is responsive, mobile-friendly, or visually stable across screen sizes.
Do not conclude that a page is responsive merely because it loads on one mobile viewport or has no JavaScript errors.
When the request is to design, redesign, or implement the frontend before auditing it, use ui-agent-browser first. This skill is the final responsive and visual-stability gate after the UI and backend contract are already wired.
Use e2e-playwright when responsive findings should become durable Playwright regression tests.
Verify that the application remains usable and visually correct across:
Test at least these viewports:
| Target | Width | Height |
|---|---|---|
| Small mobile | 320 | 568 |
| Standard mobile | 375 | 812 |
| Large mobile | 430 | 932 |
| Tablet portrait | 768 | 1024 |
| Laptop | 1366 | 768 |
| Desktop | 1920 | 1080 |
Also test Playwright mobile device profiles when available, such as an iPhone and a Pixel device.
For every tested page and viewport:
Use a browser-side assertion like this:
const overflow = await page.evaluate(() => ({
scrollWidth: document.documentElement.scrollWidth,
clientWidth: document.documentElement.clientWidth,
hasOverflow:
document.documentElement.scrollWidth >
document.documentElement.clientWidth + 1,
}));
expect(
overflow.hasOverflow,
`Horizontal overflow: ${overflow.scrollWidth}px > ${overflow.clientWidth}px`,
).toBeFalsy();
Inspect visible elements and report those extending outside the viewport:
const offenders = await page.evaluate(() => {
const viewportWidth = window.innerWidth;
const viewportHeight = window.innerHeight;
return Array.from(document.querySelectorAll("body *"))
.filter((element) => {
const htmlElement = element as HTMLElement;
const style = window.getComputedStyle(htmlElement);
const rect = htmlElement.getBoundingClientRect();
if (
style.display === "none" ||
style.visibility === "hidden" ||
rect.width === 0 ||
rect.height === 0
) {
return false;
}
return (
rect.left < -1 ||
rect.right > viewportWidth + 1 ||
rect.top < -1 ||
rect.bottom > viewportHeight + 1
);
})
.slice(0, 50)
.map((element) => ({
tag: element.tagName.toLowerCase(),
id: element.id,
className: String((element as HTMLElement).className),
text: element.textContent?.trim().slice(0, 80),
rect: element.getBoundingClientRect().toJSON(),
}));
});
expect(offenders).toEqual([]);
Treat fixed-position overlays and intentionally scrollable containers carefully. Do not automatically mark deliberate off-canvas navigation as a failure.
Create or update a project-local browser test such as tests/e2e/responsive.spec.ts when the project uses Playwright:
import { expect, test } from "@playwright/test";
const viewports = [
{ name: "mobile-320", width: 320, height: 568 },
{ name: "mobile-375", width: 375, height: 812 },
{ name: "mobile-430", width: 430, height: 932 },
{ name: "tablet-768", width: 768, height: 1024 },
{ name: "laptop-1366", width: 1366, height: 768 },
{ name: "desktop-1920", width: 1920, height: 1080 },
];
const routes = ["/dashboard", "/settings"];
for (const viewport of viewports) {
test.describe(viewport.name, () => {
test.use({ viewport });
for (const route of routes) {
test(`${route} is responsive`, async ({ page }, testInfo) => {
await page.goto(route);
await page.waitForLoadState("networkidle");
await page.evaluate(() => document.fonts?.ready);
const overflow = await page.evaluate(() => ({
documentWidth: document.documentElement.scrollWidth,
viewportWidth: document.documentElement.clientWidth,
}));
expect(
overflow.documentWidth,
`Horizontal overflow on ${route}`,
).toBeLessThanOrEqual(overflow.viewportWidth + 1);
await expect(page).toHaveScreenshot(
`${route.replaceAll("/", "-") || "home"}-${testInfo.project.name}.png`,
{ fullPage: true, animations: "disabled" },
);
});
}
});
}
Adapt routes to the real Laravel app. Seed deterministic data and authenticate through existing project helpers before asserting protected pages.
Use screenshots for stable pages after:
Inspect:
Group findings by severity:
For every issue include:
Do not declare the application responsive unless:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
laravel, playwright, responsive-design, visual-testing, ui-audit
72 skills in this plugin
/actions-and-servicesUse Actions and Services as deliberate Laravel application boundaries for use cases, integrations, and reusable workflows./ai-sdkBuild AI features with the first-party Laravel AI SDK (Laravel 13+); agents, embeddings, images, audio, and tool calling with provider-agnostic APIs/api-resources-and-paginationLaravel guidance to use API Resources with pagination and conditional fields; keep response shapes stable and cache-friendly/api-surface-evolutionLaravel guidance to evolve APIs safely using versioned DTOs/transformers, deprecations, and compatibility tests/architectureApply Laravel-native architecture decisions without forcing unnecessary repositories, interfaces, DTOs, or custom layers./blade-components-and-layoutsLaravel guidance to compose UIs with Blade components, slots, and layouts; keep templates pure and testableGenerated from the plugin's indexed repository (soden46/syarif-laravel-ai-skills) — no native marketplace selected
npx claudepluginhub p/soden46-syarif-laravel-ai-skills