frontend-audit
Skill0 starsChanged 4 months agoMITView on GitHub
Audit frontend code against project skills and design standards. Use this whenever the user asks to audit, review, or check code — a single component, a feature folder, or the whole project. Also use when the user shares code and asks 'is this correct?', 'does this follow our standards?', 'review this', or 'check my implementation'. Checks UX/UI design match (theme colors, typography, layout), architecture compliance, form patterns (TanStack Form), table patterns (MRT DataTable), query patterns (TanStack Query), routing patterns, coding standards, detail page layout, and translation/i18n compliance (hardcoded strings, Zod schema factory pattern, API error translation). Suggests specific fixes referencing the relevant skill.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- behnamazimi/skillstheir own version, first seen Oct 13, 2026
- kerwinarlan/frontend-design-intelligencetheir own version, first seen Sep 3, 2026
- ShaheerKhawaja/ProductionOStheir own version, first seen Apr 12, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ShaheerKhawaja/ProductionOS★ 8same name
- behnamazimi/skills★ 1same name
- kerwinarlan/frontend-design-intelligence★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- feature-architectureSkill
- frontend-i18nSkill
- mui-themeSkill
- react-coreSkill
- react-standardSkill
- table-mrtSkill
- tanstack-formSkill
- tanstack-querySkill
- tanstack-routerSkill
- flutter-clean-arch-getxSkill
- flutter-flavorsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 10 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Before reading any files, ask the user for:
- Distinctive: line 27
If the user already shared code or a file path in their message, skip asking for scope.
- Distinctive: line 48
Read the files the user wants audited.
- Distinctive: line 58
If the user provided a Figma link, screenshot, or mockup:
- Distinctive: line 69
Check each relevant category.
- Distinctive: line 70
File and approximate line: if possible
- Distinctive: line 80
No cross-feature imports (features importing from other features)
- Very specific: line 86
All user-visible strings use useTranslation() — no hardcoded strings (full detail covered in Translation & i18n section)
- Very specific: line 88
Import aliases used (@/shared, @/features, etc.)
- Very specific: line 126
Search schemas imported from features/[feature]/schemas/[feature].schema.ts — never defined inline in route files
- Very specific: line 127
Search params validated via validateSearch: zodValidator(featureSearchSchema) — schema uses fallback(z.number(), 1).default(1) pattern from …
- Very specific: line 129
Every beforeLoad on a layout route returns { breadcrumb: '...' } — create, edit, detail, and list pages all need a breadcrumb key
- Very specific: line 138
Every user-visible string (labels, placeholders, buttons, headings, snackbar messages) passes through t() — no hardcoded English or Lao …
- Very specific: line 142
Every useMutation onError callback uses translateError(error) from useAPIErrorTranslator — not a raw string or error.message
- Very specific: line 146
If a new validation.* key is needed that doesn't match an existing shared key, it's added to both translation files — not just one
- Distinctive: line 205
If something is done correctly, say so briefly — developers need to know what to keep, not just what to change.
- Distinctive: line 206
If you can't determine compliance without reading a bundled resource (e.g., the full form composition reference), say so and read it.
- Distinctive: line 207
If the scope is large (whole project), focus on one feature at a time and offer to continue.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Audit
Perform a structured audit of frontend code against the project's established skills and design standards. The goal is actionable findings — not just a list of violations, but specific suggestions that reference the skill the developer should follow.
When This Skill Applies
- User asks to "audit", "review", "check", or "validate" any component, feature, or file
- User asks "is this correct?" or "does this follow our standards?" about code they share
- User wants to know what's wrong before submitting a PR
- User asks for a design review or UX check
Audit Workflow
Step 1: Gather Context
Before reading any files, ask the user for:
- Scope: What do you want audited? (file path, feature name, or "whole project")
- Design reference: Is there a Figma link, screenshots, or mockup to compare against? (optional)
- Focus: Is there a particular concern? (e.g., "mostly the form", "just check the architecture")
If the user already shared code or a file path in their message, skip asking for scope.
Step 2: Read the Relevant Skills
Load the skills that apply to what you're auditing. Don't load all of them — load only what's relevant to the code in front of you:
| If you see... | Read skill |
Form components, useForm, field inputs | frontend-tanstack-form |
| Table, list view, columns | frontend-table-mrt |
useQuery, useMutation, API calls | frontend-tanstack-query |
Route files, createFileRoute, navigation | frontend-tanstack-router |
src/core/ files, providers, interceptors | frontend-core |
Colors, sx props, SectionCard, InfoRow | frontend-theme |
| Detail/view page (single item display) | frontend-detail-page |
| Feature folder structure, file placement | frontend-feature-architecture |
t(), useTranslation, translation keys, Zod messages, API errors | frontend-i18n |
| Any component at all | react-standard |
Step 3: Read the Code
Read the files the user wants audited. For a feature folder, read:
components/fileshooks/filesservices/filestypes/andschemas/if present
For a single component, read it fully.
Step 4: Design Audit (if design reference provided)
If the user provided a Figma link, screenshot, or mockup:
- Layout match — Does the component structure match the design? Check section order, card grouping, spacing.
- Color compliance — Are all colors from
theme.palettetokens? Flag any hardcoded hex values or non-theme colors. - Typography — Are text styles using MUI variant tokens (
h5,body1,caption, etc.)? - Component fidelity — Does the rendered output closely match the design? Note any missing UI elements.
Reference the frontend-theme skill for the exact palette tokens when reporting violations.
Step 5: Implementation Audit
Check each relevant category. For each finding, note:
- File and approximate line if possible
- What's wrong
- What it should be — and which skill to follow
Architecture
Read frontend-feature-architecture. Check:
- No route files inside
features/— route files (createFileRoute) belong only insrc/routes/ - Files are in the correct subfolder (
components/,hooks/,services/,types/,schemas/,constants/,utils/) - Component names match their role (e.g.,
FeatureList.tsx,FeatureForm.tsx,FeatureDetail.tsx) index.tsexports are in place- No cross-feature imports (features importing from other features)
- Nothing in
core/imports fromfeatures/
Coding Standards
Read react-standard. Check:
- Named exports (not default exports, except route components)
- All user-visible strings use
useTranslation()— no hardcoded strings (full detail covered in Translation & i18n section) - TypeScript: no
any, proper interface/type definitions - Import aliases used (
@/shared,@/features, etc.)
Theme & UI
Read frontend-theme. Check:
- Colors use
theme.palettetokens, not hardcoded hex SectionCardandInfoRowused for detail/info layouts- Dark mode not broken (no hardcoded colors that don't invert)
- MUI Grid uses
sizeprop — flag as Error for any of these (Grid2 is deprecated and removed in MUI v9):Grid2import (import Grid2 from '@mui/material/Grid2'orimport { Grid2 }) — replace withimport { Grid } from '@mui/material'xs/sm/md/lg/xlprops directly on<Grid>— replace withsize={{ xs: ..., md: ... }}itemprop on<Grid>— remove it, usesizeprop instead- Fix:
<Grid size={{ xs: 12, md: 6 }}>. See:react-standardskill.
Forms
Read frontend-tanstack-form. Check:
- Uses
useAppForm, not rawuseForm - Field components are
App*variants (AppTextField,AppSelect, etc.) - Submit uses
<form.SubmitButton>, not a raw MUI<Button type="submit"> - Form DOM scope is
<form.AppForm>wrapping a<form>element - Zod schema is defined and passed as
validators
Tables
Read frontend-table-mrt. Check:
- Uses
DataTablewrapper from@/shared/components/DataTable, not rawMaterialReactTable - Column definitions use
MRT_ColumnDeftype - Server-side pagination wired through
manualPagination - Row actions use the expected menu pattern
Data Fetching
Read frontend-tanstack-query. Check:
- Query keys defined as factory objects in the feature's constants file — not inline arrays
useQuery/useMutationcalled from a custom hook, not directly in a component- Mutations invalidate the right query keys after success
staleTimeis not overridden arbitrarily
Routing
Read frontend-tanstack-router. Check:
- Route files use
createFileRoute— all live insrc/routes/, never inside feature folders - Search schemas imported from
features/[feature]/schemas/[feature].schema.ts— never defined inline in route files - Search params validated via
validateSearch: zodValidator(featureSearchSchema)— schema usesfallback(z.number(), 1).default(1)pattern from@tanstack/zod-adapter - Inside route component functions:
Route.useSearch(),Route.useNavigate(),Route.useParams()— never bareuseSearch({ from }),useNavigate(), oruseParams({ from }) - Every
beforeLoadon a layout route returns{ breadcrumb: '...' }— create, edit, detail, and list pages all need a breadcrumb key - Auth/permission guards use
guardRoute(context.user, ['permission-key'])orguardAdmin(context.user)insidebeforeLoad loaderusescontext.queryClient.ensureQueryDatato prefetch on detail/edit pagesrouteTree.gen.tsis not manually edited- Navigation uses
Route.useNavigate()or<Link>, neverwindow.location - Router config includes
scrollRestoration: trueanduser: undefinedin context
Translation & i18n
Read frontend-i18n. Check:
- Every user-visible string (labels, placeholders, buttons, headings, snackbar messages) passes through
t()— no hardcoded English or Lao strings anywhere in components useTranslation()is called at the top of any component that renders text; thetfunction is not imported as a raw utility and called outside a component- Zod validation schemas use the factory function pattern:
export const getFeatureSchema = (t: TFunction) => z.object({...})— static schemas with hardcoded string messages are a violation - Factory schemas are instantiated inside the component with
const schema = getFeatureSchema(t)— not at module scope - Every
useMutationonErrorcallback usestranslateError(error)fromuseAPIErrorTranslator— not a raw string orerror.message - Option/select lists store translation keys as values and call
t(opt.label)at render time — not hardcoded labels inline - Translation key naming: camelCase, feature-level keys nest under feature name (
ministries.createSuccess), shared labels undercommon.*orfields.*, errors undererrors.{category}.{key} - New business error codes are registered in
useAPIErrorTranslator.tsAND added to bothen/translation.jsonandlo/translation.json - If a new
validation.*key is needed that doesn't match an existing shared key, it's added to both translation files — not just one
Detail Pages
Read frontend-detail-page. Check:
- Hero section uses
primary.mainbackground with item name, code/ID, and status chips - Content grid uses
SectionCardcards withInfoRowfields - Loading state uses skeleton
- Error and not-found states handled
- Back navigation present
- Action buttons (edit, delete) in expected positions
Step 6: Produce the Audit Report
Output a structured report. Use this format:
Audit Report: [Feature or File Name]
Summary
One or two sentences on the overall state. Is this mostly compliant? Are there systemic issues?
Design Review (skip if no design was provided)
- Layout: pass / issues found
- Colors: pass / issues found
- Typography: pass / issues found
- Notes on any gaps
Findings
Use severity levels:
- Critical — Violates a Core Invariant; must fix before merging
- Warning — Non-compliant with skill pattern; should fix
- Info — Minor inconsistency or suggestion
Group findings by category. For each:
[Category] · [Severity]
path/to/file.tsx— Description of the issue.
Fix: What to do instead. See:skill-nameskill.
Example:
[Theme & UI] · Warning
FeatureDetail.tsx— Uses<Grid xs={12} md={6}>instead of thesizeprop.
Fix: Replace with<Grid size={{ xs: 12, md: 6 }}>. See:react-standardskill.
Suggestions
Any improvements that aren't violations — patterns the developer could adopt to make this code more consistent or maintainable. Reference the relevant skill.
Compliance Score (optional)
A rough pass/fail count per category if helpful.
Tone and Approach
- Be specific: "line 42 in UserForm.tsx uses a raw
<Button type="submit">— replace with<form.SubmitButton>" is more useful than "the form submit is wrong." - Be constructive: pair every critical finding with a concrete fix.
- If something is done correctly, say so briefly — developers need to know what to keep, not just what to change.
- If you can't determine compliance without reading a bundled resource (e.g., the full form composition reference), say so and read it.
- If the scope is large (whole project), focus on one feature at a time and offer to continue.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

