frontend-fundamentals

Auto-invoke when reviewing React, Vue, or frontend component code. Enforces component architecture, state management patterns, and UI best practices.

25 stars

Best use case

frontend-fundamentals is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Auto-invoke when reviewing React, Vue, or frontend component code. Enforces component architecture, state management patterns, and UI best practices.

Teams using frontend-fundamentals should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/frontend-fundamentals/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/aiskillstore/marketplace/danielpodolsky/frontend-fundamentals/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/frontend-fundamentals/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How frontend-fundamentals Compares

Feature / Agentfrontend-fundamentalsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Auto-invoke when reviewing React, Vue, or frontend component code. Enforces component architecture, state management patterns, and UI best practices.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Frontend Fundamentals Review

> "A component should do ONE thing well. If you're describing it with 'and', split it."

## When to Apply

Activate this skill when reviewing:
- React/Vue/Svelte components
- UI rendering logic
- State management code
- CSS/styling decisions
- Client-side routing

---

## Review Checklist

### Component Architecture

- [ ] **Single Responsibility**: Does each component do ONE job?
- [ ] **Size Check**: Is the component under 200 lines?
- [ ] **Props Count**: Are there fewer than 7 props?
- [ ] **Naming**: Can you describe the component without saying "and"?

### State Management

- [ ] **Colocation**: Is state as close as possible to where it's used?
- [ ] **Lifting**: Is state shared properly between siblings via parent?
- [ ] **Context vs Props**: Is prop drilling avoided (max 3 levels)?
- [ ] **Server State**: Is server data managed separately (React Query/SWR)?

### Performance

- [ ] **Memoization**: Are expensive computations wrapped in useMemo?
- [ ] **Callbacks**: Are event handlers wrapped in useCallback where needed?
- [ ] **Re-renders**: Will this cause unnecessary re-renders?
- [ ] **Lazy Loading**: Are heavy components code-split?

### Accessibility

- [ ] **Semantic HTML**: Are proper elements used (button vs div)?
- [ ] **ARIA**: Are interactive elements accessible?
- [ ] **Keyboard**: Can users navigate without a mouse?

---

## Common Mistakes (Anti-Patterns)

### 1. God Components
```
❌ UserDashboard.tsx (1000 lines)
   - fetches data, manages state, renders UI, handles routing

✅ Split into:
   - UserDashboardPage.tsx (container)
   - UserStats.tsx (presentation)
   - UserActivity.tsx (presentation)
   - useUserData.ts (hook)
```

### 2. Logic in Render
```
❌ return <div>{users.filter(u => u.active).map(u => ...)}</div>

✅ const activeUsers = useMemo(() => users.filter(u => u.active), [users]);
   return <div>{activeUsers.map(u => ...)}</div>
```

### 3. Prop Drilling
```
❌ <App user={user}>
     <Layout user={user}>
       <Main user={user}>
         <Widget user={user} />

✅ const user = useUser(); // in Widget.tsx
```

### 4. Boolean Prop Soup
```
❌ <Button primary secondary large small disabled loading />

✅ <Button variant="primary" size="large" state="loading" />
```

---

## Socratic Questions

Ask the junior these questions instead of giving answers:

1. **Architecture**: "What is the ONE job of this component?"
2. **Splitting**: "If I asked you to use just the header part elsewhere, could you?"
3. **State**: "Who needs this data? Should it live here or higher up?"
4. **Performance**: "What happens when the parent re-renders?"
5. **Complexity**: "Could a new developer understand this in 5 minutes?"

---

## Standards Reference

See detailed patterns in:
- `/standards/frontend/component-architecture.md`

---

## Red Flags to Call Out

| Flag | Question to Ask |
|------|-----------------|
| File > 200 lines | "Can we split this into smaller pieces?" |
| > 5 useState calls | "Should some of this state be lifted or combined?" |
| useEffect with [] deps but uses external values | "Are we missing dependencies?" |
| Direct DOM manipulation | "Is there a React way to do this?" |
| Inline styles everywhere | "Should we use a consistent styling approach?" |

Related Skills

premium-frontend-ui

25
from ComeOnOliver/skillshub

A comprehensive guide for GitHub Copilot to craft immersive, high-performance web experiences with advanced motion, typography, and architectural craftsmanship.

marketing-fundamentals

25
from ComeOnOliver/skillshub

Core marketing concepts, psychology, and frameworks for effective marketing. Use for foundational knowledge on funnels, customer journey, positioning, value propositions, and marketing psychology.

routeros-fundamentals

25
from ComeOnOliver/skillshub

RouterOS v7 domain knowledge for AI agents. Use when: working with MikroTik RouterOS, writing RouterOS CLI/script commands, calling RouterOS REST API, debugging why a Linux command fails on RouterOS, or when the user mentions MikroTik, RouterOS, CHR, or /ip /system /interface paths. Scope: RouterOS 7.x (long-term and newer) only — v6 is NOT covered and accuracy for v6 problems will be low.

geo-fundamentals

25
from ComeOnOliver/skillshub

Generative Engine Optimization for AI search engines (ChatGPT, Claude, Perplexity).

frontend-ui-dark-ts

25
from ComeOnOliver/skillshub

Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.

frontend-security-coder

25
from ComeOnOliver/skillshub

Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns. Use PROACTIVELY for frontend security implementations or client-side security code reviews.

frontend-mobile-security-xss-scan

25
from ComeOnOliver/skillshub

You are a frontend security specialist focusing on Cross-Site Scripting (XSS) vulnerability detection and prevention. Analyze React, Vue, Angular, and vanilla JavaScript code to identify injection poi

frontend-mobile-development-component-scaffold

25
from ComeOnOliver/skillshub

You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s

frontend-developer

25
from ComeOnOliver/skillshub

Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.

cc-skill-frontend-patterns

25
from ComeOnOliver/skillshub

Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

frontend-code-review

25
from ComeOnOliver/skillshub

Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.

frontend-responsive

25
from ComeOnOliver/skillshub

Implement mobile-first responsive designs with fluid layouts, breakpoints, relative units, and touch-friendly interfaces that work across all device sizes. Use this skill when writing or modifying React components (.tsx, .jsx files), when implementing CSS or Tailwind responsive utilities (sm:, md:, lg:, xl: breakpoints), when working on layout components, navigation menus, grid systems, when optimizing for mobile devices, tablets, or desktop screens, when implementing media queries, when ensuring touch-friendly UI elements, or when testing cross-device compatibility.