frontend-code-review
Skill1 starsChanged 9 months agoApache-2.0View on GitHub
Review React/TypeScript frontend code against code quality, performance, and business logic rules. Provides structured findings with file paths, line numbers, and suggested fixes.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- factor241/ketos-bottheir own version, first seen Sep 3, 2026
- danielteles/awesome-agent-skillstheir own version, first seen Sep 2, 2026
- peakdong68/my-skillstheir own version, first seen Aug 29, 2026
- hjdspace/SpaceCodetheir own version, first seen Jul 21, 2026
- langliu/skillstheir own version, first seen May 31, 2026
- sangrokjung/claude-forgetheir own version, first seen May 3, 2026
Used with
Projects with it also use cache-components, pr-creator and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
mm-mazharSkillcache-components
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR).
Also in 4 projects that use this
GoogleSkillpr-creator
Also in 4 projects that use this
Google CloudSkillfix
Plan a remediation strategy after a test failure.
Also in 3 projects that use this
JetBrainsSkillwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Also in 4 projects that use this
VercelSkillfind-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Also in 4 projects that use this
StrayDragonSkillui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- sangrokjung/claude-forge★ 847same name
- chendongqi/OPB-Skills★ 125same name
- bamzc/claude-skills-frontend★ 75same name
- DauQuangThanh/hanoi-rainbow★ 17same name
- alphaparkinc/openclaw-skills★ 9same name
- Alpha-Park/openclaw-skills★ 8same name
- danielteles/awesome-agent-skills★ 3same name
- best-fan/agent-skills★ 2same name
- hjdspace/SpaceCode★ 2same name
- dbDev-code/w-skills★ 1same name
4 more not listed
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 repository73 other files it gives its agents.
- accessibility-wcagSkill
- api-designSkill
- api-testingSkill
- asset-optimizationSkill
- audio-systemsSkill
- aws-essentialsSkill
- ci-cd-pipelinesSkill
- codebase-analysisSkill
- code-reviewerSkill
- container-securitySkill
- cost-optimizationSkill
- database-designSkill
- data-visualizationSkill
- doc-generationSkill
- docker-kubernetesSkill
- docxSkill
- email-notificationsSkill
- env-configSkill
- flutter-mobileSkill
- framer-motionSkill
- frontend-designSkill
- fullstack-developerSkill
- game-enginesSkill
- gameplay-designSkill
- game-programming-languagesSkill
- game-serversSkill
- git-workflowSkill
- godot-4Skill
- golang-proSkill
- go-linter-configurationSkill
- graphics-renderingSkill
- i18n-localizationSkill
- incident-responseSkill
- level-designSkill
- llm-integrationSkill
- local-securitySkill
- memory-managementSkill
- monetization-systemsSkill
- monitoring-observabilitySkill
- multiplayer-netcodeSkill
- nextjs-16Skill
- notebooklm-researchSkill
- npm-packageSkill
- oauth-authSkill
- particle-systemsSkill
- performance-optimizationSkill
- playwright-testingSkill
- postgres-advancedSkill
- programming-architectureSkill
- project-migrationSkill
- publishing-platformsSkill
- python-best-practicesSkill
- react-nativeSkill
- redis-patternsSkill
- refactoring-patternsSkill
- remotion-best-practicesSkill
- rust-best-practicesSkill
- scraping-automationSkill
- security-reviewSkill
- seo-metaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Requirement: Use cn() utility for all conditional CSS, not ternaries or string concatenation.
- Very specific: line 58
Requirement: Prefer Tailwind utilities over .module.css files unless Tailwind cannot achieve the effect.
- Very specific: line 88
Requirement: Place incoming className prop AFTER component's own classes.
- Very specific: line 121
Requirement: Use useNodes/useEdges for UI rendering.
- Distinctive: line 387
Use this skill: Before committing frontend changes, during PR reviews, or when diagnosing rendering performance issues.
“Common” is measured: kept by at least 6 in 10 of the 9 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 Code Review
Review Process
This skill reviews .tsx, .ts, and .js files against three categories:
- Code Quality - Consistent patterns, maintainability
- Performance - React rendering optimization
- Business Logic - Domain-specific rules
Two review modes:
- Pending-change review - Scan staged/modified files before commit
- File-targeted review - Review specific files the user names
Code Quality Rules
Rule 1: Conditional Classnames (URGENT)
Requirement: Use cn() utility for all conditional CSS, not ternaries or string concatenation.
BAD:
// Manual ternary
<div className={isActive ? 'text-primary-600' : 'text-gray-500'}>
// String concatenation
<div className={'bg-white ' + (isError ? 'border-red-500' : '')}>
// Template literal
<div className={`text-base ${highlighted && 'font-bold'}`}>GOOD:
import { cn } from '@/utils/classnames';
<div className={cn(
'text-base',
isActive && 'text-primary-600',
!isActive && 'text-gray-500'
)}>
<div className={cn(
'bg-white',
isError && 'border-red-500'
)}>Why urgent: Inconsistent patterns make global style changes difficult.
Rule 2: Tailwind-First Styling (URGENT)
Requirement: Prefer Tailwind utilities over .module.css files unless Tailwind cannot achieve the effect.
BAD:
// styles.module.css
.button {
padding: 0.75rem 1.5rem;
background-color: #3b82f6;
border-radius: 0.5rem;
}
// Component.tsx
import styles from './styles.module.css';
<button className={styles.button}>Click</button>GOOD:
<button className="px-6 py-3 bg-blue-500 rounded-lg hover:bg-blue-600">
Click
</button>When CSS modules are acceptable:
- Complex animations requiring
@keyframes - Browser-specific hacks
- Third-party library style overrides
Rule 3: ClassName Ordering for Overrides
Requirement: Place incoming className prop AFTER component's own classes.
BAD:
const Button = ({ className }: { className?: string }) => {
return (
<div className={cn(className, 'bg-primary-600 text-white px-4 py-2')}>
{/* Consumer can't override bg-primary-600 */}
</div>
);
};
// Consumer tries to change background
<Button className="bg-red-500" /> {/* Won't work */}GOOD:
const Button = ({ className }: { className?: string }) => {
return (
<div className={cn('bg-primary-600 text-white px-4 py-2', className)}>
{/* className comes LAST, can override */}
</div>
);
};
<Button className="bg-red-500" /> {/* Works */}Performance Rules
Rule 1: React Flow Data Access (URGENT)
Requirement: Use useNodes/useEdges for UI rendering. Use useStoreApi inside callbacks that mutate state.
BAD:
import useNodes from '@/app/components/workflow/store/workflow/use-nodes';
const NodeComponent = () => {
const nodes = useNodes(); // Wrong hook
// ...
};GOOD:
import { useNodes, useStoreApi } from 'reactflow';
const NodeComponent = () => {
const nodes = useNodes(); // Correct React Flow hook
const store = useStoreApi();
const handleUpdate = () => {
const { getNodes, setNodes } = store.getState();
// Mutate via store API
};
return <div>{nodes.length} nodes</div>;
};Why urgent: Using wrong hooks causes blank screens when no workflowStore provider exists.
Rule 2: Complex Prop Memoization (URGENT)
Requirement: Wrap objects, arrays, and functions passed as props in useMemo or useCallback.
BAD:
function ParentComponent() {
return (
<HeavyChild
config={{
apiKey: 'abc',
endpoint: '/api/data'
}}
filters={['active', 'recent']}
onUpdate={() => console.log('update')}
/>
);
// Every render creates NEW objects/arrays/functions
// Child re-renders even if nothing changed
}GOOD:
function ParentComponent() {
const config = useMemo(() => ({
apiKey: 'abc',
endpoint: '/api/data'
}), []);
const filters = useMemo(() => ['active', 'recent'], []);
const handleUpdate = useCallback(() => {
console.log('update');
}, []);
return (
<HeavyChild
config={config}
filters={filters}
onUpdate={handleUpdate}
/>
);
// Stable references, child only re-renders when props actually change
}Why urgent: Causes unnecessary re-renders, degrades performance with complex components.
Business Logic Rules
Rule 1: No workflowStore in Node Components (URGENT)
Applies to: Files matching web/app/components/workflow/nodes/[nodeName]/node.tsx
Requirement: Node components cannot import workflowStore because they're used in contexts without the provider.
BAD:
// web/app/components/workflow/nodes/TextNode/node.tsx
import useNodes from '@/app/components/workflow/store/workflow/use-nodes';
export const TextNode = () => {
const nodes = useNodes(); // Breaks when no provider
// ...
};GOOD:
// web/app/components/workflow/nodes/TextNode/node.tsx
import { useNodes } from 'reactflow';
export const TextNode = () => {
const nodes = useNodes(); // Works in all contexts
// ...
};Why urgent: Causes blank screens when creating RAG Pipes from templates (no workflowStore provider in that flow).
Review Output Format
Template A: Issues Found
# Code review
Found <N> urgent issues that need to be fixed:
## 1. Using manual ternary instead of cn() utility
FilePath: src\components\Button.tsx line 12
<div className={isActive ? 'text-primary-600' : 'text-gray-500'}>
### Suggested fix
Replace with cn() utility:
import { cn } from '@/utils/classnames';
<div className={cn(isActive ? 'text-primary-600' : 'text-gray-500')}>
---
## 2. Object prop not memoized
FilePath: src\pages\Dashboard.tsx line 45
<HeavyComponent config={{ apiKey: key, url: endpoint }} />
### Suggested fix
Wrap in useMemo:
const config = useMemo(() => ({ apiKey: key, url: endpoint }), [key, endpoint]);
<HeavyComponent config={config} />
---
Found <M> suggestions for improvement:
## 1. Consider using Tailwind instead of CSS module
FilePath: src\components\Card.tsx line 5
import styles from './Card.module.css';
### Suggested fix
Replace CSS module with Tailwind utilities if possible.
---If >= 10 issues: Show first 10, summarize as "10+ urgent issues".
If any issue requires code changes: End with "Would you like me to apply the suggested fixes?"
Template B: No Issues
## Code review
No issues found.Example Review Workflow
Step 1: Scan File
// src/components/UserCard.tsx
import { useNodes } from 'reactflow';
import styles from './UserCard.module.css';
export const UserCard = ({ user, className }) => {
const nodes = useNodes();
return (
<div className={className + ' ' + styles.card}>
<img src={user.avatar} className={user.isOnline ? 'border-green' : 'border-gray'} />
<ExpensiveChild data={{ id: user.id, name: user.name }} />
</div>
);
};Step 2: Identify Violations
- Line 2: Using CSS module (Code Quality, suggestion)
- Line 7: Manual string concatenation instead of
cn()(Code Quality, URGENT) - Line 8: Manual ternary instead of
cn()(Code Quality, URGENT) - Line 9: Object prop not memoized (Performance, URGENT)
Step 3: Generate Report
# Code review
Found 3 urgent issues that need to be fixed:
## 1. Manual string concatenation for classnames
FilePath: src\components\UserCard.tsx line 7
<div className={className + ' ' + styles.card}>
### Suggested fix
Replace with cn() utility:
import { cn } from '@/utils/classnames';
<div className={cn(styles.card, className)}>
---
## 2. Manual ternary for conditional classname
FilePath: src\components\UserCard.tsx line 8
<img className={user.isOnline ? 'border-green' : 'border-gray'} />
### Suggested fix
import { cn } from '@/utils/classnames';
<img className={cn(user.isOnline ? 'border-green' : 'border-gray')} />
---
## 3. Object prop not memoized
FilePath: src\components\UserCard.tsx line 9
<ExpensiveChild data={{ id: user.id, name: user.name }} />
### Suggested fix
const data = useMemo(() => ({ id: user.id, name: user.name }), [user.id, user.name]);
<ExpensiveChild data={data} />
---
Found 1 suggestion for improvement:
## 1. Consider Tailwind instead of CSS module
FilePath: src\components\UserCard.tsx line 2
import styles from './UserCard.module.css';
### Suggested fix
Evaluate if CSS module is necessary or if Tailwind utilities can replace it.
---
Would you like me to apply the suggested fixes?Quick Reference
Urgency Levels:
URGENT: Code Quality violations, Performance issues, Business Logic bugs
SUGGESTION: Best practices, minor improvementsCommon Patterns to Flag:
BAD: className={a ? 'x' : 'y'}
GOOD: className={cn(a ? 'x' : 'y')}
BAD: <Child config={{...}} />
GOOD: const config = useMemo(() => ({...}), [deps]);
BAD: import useNodes from '@/store/workflow/use-nodes'
GOOD: import { useNodes } from 'reactflow'Use this skill: Before committing frontend changes, during PR reviews, or when diagnosing rendering performance issues.
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.

