Splits mixed Server/Client Next.js pages into clean boundaries — extracts client logic into `*Client.tsx`, rewrites `page.tsx` as a pure Server Component, flags repeated JSX for componentisation, and detects styling inconsistencies across the codebase. Trigger on: refactor requests, mixed Server/Client files, pages >200 LOC with hooks, duplicated JSX, or any style drift between components.
97
96%
Does it follow best practices?
Impact
98%
1.02xAverage score across 3 eval scenarios
Passed
No known issues
State: what was detected, why it's a problem, what you'll change. Wait for approval before modifying any file.
metadata never in a "use client" file — use layout.tsx if it spans multiple routesuseState, useEffect, useRouter, etc.) must live in Client Componentsmetadata in a Client Component, or Server/Client concerns mixed in one fileapp/<route>/<FeatureName>Client.tsx — move "use client", all hooks, JSX, handlerspage.tsx:import type { Metadata } from 'next';
import FeatureNameClient from './FeatureNameClient';
export const metadata: Metadata = { /* ... */ };
export default function Page() { return <FeatureNameClient />; }"use client" or hooks in page.tsx, no syntax errors, project buildsFlag 2+ JSX blocks with identical structure (same wrapper, classNames, child layout) differing only in data values, or .map() calls rendering >3 elements per item. Extract into a domain-named component (ProjectSection, WorkEntry) — not Section1. Confirm before extracting.
During any refactor or property change, scan for drift. Flag when 2+ places share an apparently intentional value but express it inconsistently.
| Category | What to flag |
|---|---|
| Layout & Spacing | Duplicate/overriding utilities on one element (px-4 px-6); inconsistent scale values across instances; same pattern using different responsive prefixes (md: vs lg:); style={{}} overrides conflicting with classNames; same component with diverging Tailwind variants across call sites |
| Color & Tokens | text-[#3B82F6] vs text-blue-500 — hardcoded hex matching an existing token; shadow-md, shadow-lg, inline box-shadow mixed for the same elevation level |
| Structure & Scale | <Button /> exists but some sites recreate it with raw classes; same class defined differently across .module.css files; hardcoded z-index values with no defined scale |
When detected: list affected files/locations, propose a CSS variable/Tailwind token or base component, wait for approval.
Full file contents only. No placeholders. Code must compile.
58415cb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.