agentleFS
shoaibmalickshoaibmalick/development-claude-skills/skills/frontend-dev/SKILL.md

frontend-dev

Skill0 starsChanged 11 months agoMITView on GitHub

Frontend development workflows for React with TypeScript, Tailwind CSS, Context API, and Vitest. Use this skill when creating React components, setting up project structure, implementing state management, styling with Tailwind, or writing tests.

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use android-native-dev, ios-application-dev and 3 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.
  • MiniMax-AISkill

    android-native-dev

    Android native application development and UI design guide. Covers Material Design 3, Kotlin/Compose development, project configuration, accessibility, and build troubleshooting. Read this before Android native application development.

    Also in 3 projects that use this

  • MiniMax-AISkill

    ios-application-dev

    iOS application development guide covering UIKit, SnapKit, and SwiftUI. Includes touch targets, safe areas, navigation patterns, Dynamic Type, Dark Mode, accessibility, collection views, common UI components, and SwiftUI design guidelines. For detailed references on specific topics, see the reference files. Use when: developing iOS apps, implementing UI, reviewing iOS code, working with UIKit/SnapKit/SwiftUI layouts, building iPhone interfaces, Swift mobile development, Apple HIG compliance, iOS accessibility implementation.

    Also in 3 projects that use this

  • yangmourSkill

    fullstack-dev

    Also in 5 projects that use this

  • HK-hubSkill

    gif-sticker-maker

    Convert photos (people, pets, objects, logos) into 4 animated GIF stickers with captions. Use when: user wants to create cartoon stickers, GIF expressions, emoji packs, animated avatars, or convert photos to Funko Pop / Pop Mart blind box style animations. Triggers: sticker, GIF, cartoon, emoji, expression pack, avatar animation.

    Also in 3 projects that use this

  • HK-hubSkill

    shader-dev

    Comprehensive GLSL shader techniques for creating stunning visual effects — ray marching, SDF modeling, fluid simulation, particle systems, procedural generation, lighting, post-processing, and more.

    Also in 3 projects that use this

The file

Files
SKILL.md

Frontend Dev

A comprehensive skill for React + TypeScript frontend development with modern tooling.

Tech Stack

CategoryTechnology
FrameworkReact 18+ with TypeScript
StylingTailwind CSS
State ManagementContext API
TestingVitest + React Testing Library
Build ToolVite

Project Structure

src/
  components/           # Reusable UI components
    ui/                 # Base UI components (Button, Input, Card)
    features/           # Feature-specific components
  context/              # Context providers and hooks
  hooks/                # Custom React hooks
  pages/                # Page components
  types/                # TypeScript interfaces and types
  utils/                # Utility functions
  __tests__/            # Test files

Component Creation

Functional Component Template

import { FC } from 'react';

interface ComponentNameProps {
  title: string;
  onClick?: () => void;
  children?: React.ReactNode;
}

export const ComponentName: FC<ComponentNameProps> = ({
  title,
  onClick,
  children
}) => {
  return (
    <div className="p-4 rounded-lg bg-white shadow-md">
      <h2 className="text-xl font-semibold text-gray-800">{title}</h2>
      {children}
      {onClick && (
        <button
          onClick={onClick}
          className="mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
        >
          Click Me
        </button>
      )}
    </div>
  );
};

Context API Pattern

// context/ThemeContext.tsx
import { createContext, useContext, useState, FC, ReactNode } from 'react';

interface ThemeContextType {
  theme: 'light' | 'dark';
  toggleTheme: () => void;
}

const ThemeContext = createContext<ThemeContextType | undefined>(undefined);

export const ThemeProvider: FC<{ children: ReactNode }> = ({ children }) => {
  const [theme, setTheme] = useState<'light' | 'dark'>('light');
  const toggleTheme = () => setTheme(prev => prev === 'light' ? 'dark' : 'light');

  return (
    <ThemeContext.Provider value={{ theme, toggleTheme }}>
      {children}
    </ThemeContext.Provider>
  );
};

export const useTheme = (): ThemeContextType => {
  const context = useContext(ThemeContext);
  if (!context) throw new Error('useTheme must be used within ThemeProvider');
  return context;
};

Tailwind CSS Common Classes

PurposeClasses
Flexbox Centerflex items-center justify-center
Grid 3 Columnsgrid grid-cols-3 gap-4
Card Stylep-4 rounded-lg bg-white shadow-md
Button Primarypx-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700
Input Fieldw-full px-3 py-2 border border-gray-300 rounded focus:ring-2

Custom Hooks

useFetch Hook

import { useState, useEffect } from 'react';

export function useFetch<T>(url: string) {
  const [data, setData] = useState<T | null>(null);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);

  useEffect(() => {
    fetch(url)
      .then(res => res.json())
      .then(setData)
      .catch(err => setError(err.message))
      .finally(() => setLoading(false));
  }, [url]);

  return { data, loading, error };
}

Testing with Vitest

import { describe, it, expect, vi } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import { Button } from '../components/ui/Button';

describe('Button', () => {
  it('renders with correct text', () => {
    render(<Button>Click Me</Button>);
    expect(screen.getByText('Click Me')).toBeInTheDocument();
  });

  it('calls onClick when clicked', () => {
    const handleClick = vi.fn();
    render(<Button onClick={handleClick}>Click Me</Button>);
    fireEvent.click(screen.getByText('Click Me'));
    expect(handleClick).toHaveBeenCalledTimes(1);
  });
});

Common Commands

npm run dev              # Start dev server
npm run build            # Build for production
npm run test             # Run tests
npm run test:watch       # Run tests in watch mode
npm run lint             # Run ESLint

References

For detailed guides, see:

  • references/react-patterns.md - Advanced React patterns
  • references/tailwind-guide.md - Tailwind cheatsheet
  • references/testing-guide.md - Testing best practices

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.