MCPInstall

senior-frontend

Use when the user needs production-grade React/Next.js/TypeScript development with rigorous component architecture, state management, performance optimization, and 85% test coverage. Triggers: React component development, Next.js page creation, state management design, frontend performance audit, component library setup.

Installs
83
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/pixel-process-ug/superkit-agents --skill senior-frontend
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads senior-frontend automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Senior Frontend Engineer

Overview

Deliver production-grade frontend code following a structured three-phase workflow: context discovery, development, and handoff. This skill enforces strict quality standards including atomic design component architecture, comprehensive state management patterns, SSR/SSG/ISR optimization, and mandatory >85% test coverage with Vitest, React Testing Library, and Playwright.

Announce at start: "I'm using the senior-frontend skill for production-grade React/TypeScript development."


Phase 1: Context Discovery

Goal: Understand the existing codebase before writing any code.

Actions

  1. Analyze existing codebase structure and conventions
  2. Identify the tech stack version (React 18/19, Next.js 14/15, TypeScript version)
  3. Review existing component library and design system
  4. Check state management approach already in use
  5. Understand build tooling and CI pipeline
  6. Map existing test infrastructure and coverage

STOP — Do NOT proceed to Phase 2 until:

  • Tech stack versions are identified
  • Existing patterns and conventions are documented
  • Test infrastructure is mapped
  • State management approach is identified

Phase 2: Development

Goal: Implement with strict TypeScript, atomic design, and TDD.

Actions

  1. Design component architecture following atomic design
  2. Implement with TypeScript strict mode
  3. Write tests alongside implementation (TDD when appropriate)
  4. Optimize for performance (bundle size, rendering, loading)
  5. Ensure accessibility compliance

Component Architecture Decision Table (Atomic Design)

LevelDescriptionBusiness LogicExample
AtomsSmallest building blocksNoneButton, Input, Icon, Badge
MoleculesComposed of atomsMinimalFormField, SearchBar, Card
OrganismsComplex with business logicYesDataTable, NavigationBar, CommentThread
TemplatesPage structure without dataLayout onlyDashboardLayout, AuthLayout
PagesTemplates connected to dataData fetchingUsersPage, SettingsPage

Atom Example

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
  size?: 'sm' | 'md' | 'lg';
  isLoading?: boolean;
}

export function Button({ variant = 'primary', size = 'md', isLoading, children, ...props }: ButtonProps) {
  return (
    <button className={cn(buttonVariants({ variant, size }))} disabled={isLoading || props.disabled} {...props}>
      {isLoading ? <Spinner size={size} /> : children}
    </button>
  );
}

State Management Decision Table

State TypeSolutionWhen to Use
Server stateReact Query / TanStack QueryAPI data, caching, sync
Form stateReact Hook Form + ZodForm validation, submission
Global UI stateZustandTheme, sidebar open, modals
Local UI stateuseState / useReducerComponent-specific state
URL statenuqs / useSearchParamsFilters, pagination, tabs
Complex localuseReducerMultiple related state transitions
Shared contextReact ContextTheme, locale, auth (infrequent updates)

SSR / SSG / ISR Decision Table (Next.js App Router)

PatternUse WhenCache Strategy
Static (SSG)Content rarely changesBuild time
ISRContent changes periodicallyRevalidate interval
SSRContent changes per requestNo cache
ClientUser-specific, interactiveBrowser

Server vs Client Component Decision

NeedComponent Type
Direct data fetchingServer (default)
Event handlers (onClick, onChange)Client ('use client')
useState / useReducerClient
useEffect / useLayoutEffectClient
Browser APIs (window, localStorage)Client
Third-party libs using client featuresClient
No interactivity neededServer (default)

STOP — Do NOT proceed to Phase 3 until:

  • Components follow atomic design hierarchy
  • TypeScript strict mode is enabled, no any types
  • Tests are written for all components
  • Accessibility is verified (axe-core)

Phase 3: Handoff

Goal: Verify quality gates and prepare for review.

Actions

  1. Verify test coverage meets >85% threshold
  2. Run full lint and type check
  3. Document complex components with JSDoc/TSDoc
  4. Create Storybook stories for UI components
  5. Performance audit (Lighthouse, bundle analysis)

Performance Checklist

  • Bundle size < 200KB gzipped (initial load)
  • Largest Contentful Paint < 2.5s
  • First Input Delay < 100ms
  • Cumulative Layout Shift < 0.1
  • Images: next/image with proper sizing and formats
  • Fonts: next/font with display swap
  • No layout thrashing (batch DOM reads/writes)
  • Virtualization for lists > 100 items

Coverage Thresholds

{
  "coverageThreshold": {
    "global": {
      "branches": 85,
      "functions": 85,
      "lines": 85,
      "statements": 85
    }
  }
}

STOP — Handoff complete when:

  • Test coverage >85% verified
  • Lint and type check pass with zero errors
  • Performance audit completed
  • Complex components documented

Testing Requirements

Unit Tests (Vitest + React Testing Library)

describe('Button', () => {
  it('renders children', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByRole('button', { name: 'Click me' })).toBeInTheDocument();
  });

  it('shows loading state', () => {
    render(<Button isLoading>Click me</Button>);
    expect(screen.getByRole('button')).toBeDisabled();
  });

  it('calls onClick when clicked', async () => {
    const onClick = vi.fn();
    render(<Button onClick={onClick}>Click me</Button>);
    await userEvent.click(screen.getByRole('button'));
    expect(onClick).toHaveBeenCalledOnce();
  });
});

Integration Tests

  • Component compositions (form submission flow)
  • Data fetching with MSW (Mock Service Worker)
  • Routing and navigation
  • Error boundaries and fallbacks

E2E Tests (Playwright)

test('user can complete checkout', async ({ page }) => {
  await page.goto('/products');
  await page.getByRole('button', { name: 'Add to cart' }).first().click();
  await page.getByRole('link', { name: 'Cart' }).click();
  await expect(page.getByText('1 item')).toBeVisible();
  await page.getByRole('button', { name: 'Checkout' }).click();
});

React Query Patterns

function useUsers(filters: UserFilters) {
  return useQuery({
    queryKey: ['users', filters],
    queryFn: () => fetchUsers(filters),
    staleTime: 5 * 60 * 1000,
    placeholderData: keepPreviousData,
  });
}

function useUpdateUser() {
  const queryClient = useQueryClient();
  return useMutation({
    mutationFn: updateUser,
    onMutate: async (newUser) => {
      await queryClient.cancelQueries({ queryKey: ['users'] });
      const previous = queryClient.getQueryData(['users']);
      queryClient.setQueryData(['users'], (old) =>
        old.map(u => u.id === newUser.id ? { ...u, ...newUser } : u)
      );
      return { previous };
    },
    onError: (err, newUser, context) => {
      queryClient.setQueryData(['users'], context.previous);
    },
    onSettled: () => {
      queryClient.invalidateQueries({ queryKey: ['users'] });
    },
  });
}

Memoization Decision Table

TechniqueUse WhenDo NOT Use When
useMemoExpensive computation, referential equality for depsSimple calculations, primitive values
useCallbackFunctions passed to memoized childrenFunctions not passed as props
React.memoComponent re-renders often with same propsProps change on every render
NoneDefault — do not memoizeAlways profile first

Anti-Patterns / Common Mistakes

Anti-PatternWhy It Is WrongCorrect Approach
useEffect for data fetchingRace conditions, no caching, no dedupReact Query or Server Components
Prop drilling more than 2 levelsTight coupling, maintenance burdenComposition, context, or Zustand
Business logic in componentsUntestable, unreusableExtract to hooks or utility functions
Barrel exportsBreaks tree-shaking, slower buildsDirect imports
Testing implementation detailsBrittle tests that break on refactorTest behavior: user actions and outcomes
any type anywhereDefeats TypeScript's purposeunknown + type guards
Inline styles for non-dynamic valuesInconsistent, hard to maintainCSS modules, Tailwind, or styled-components
Memoizing everythingAdds complexity, often slowerProfile first, memoize second

Documentation Lookup (Context7)

Use mcp__context7__resolve-library-id then mcp__context7__query-docs for up-to-date docs. Returned docs override memorized knowledge.

  • react — when uncertain about hooks API, component lifecycle, or React 19+ features
  • next.js — for App Router, Server Components, or Next.js-specific APIs
  • typescript — for advanced type patterns or compiler options
  • tailwindcss — for utility classes, configuration, or plugin API
  • vitest — for test runner API, matchers, or mock utilities

Integration Points

SkillRelationship
testing-strategyStrategy defines frontend test frameworks
test-driven-developmentComponents are built with TDD cycle
react-best-practicesDetailed React patterns complement this skill
performance-optimizationFrontend performance follows optimization methodology
code-reviewReview verifies component architecture and test coverage
clean-codeCode quality principles apply to component code
webapp-testingPlaywright E2E tests use this skill's page structure
acceptance-testingUI acceptance criteria drive component tests

Key Principles

  • TypeScript strict mode, no any (use unknown + type guards)
  • Prefer composition over inheritance
  • Colocate tests, styles, and stories with components
  • Server Components by default; Client Components only when required
  • Error boundaries at route and feature boundaries
  • Accessibility is not optional (test with axe-core)

Skill Type

FLEXIBLE — Adapt component architecture and state management to the existing project conventions. The three-phase workflow is strongly recommended. Test coverage must target >85%. TypeScript strict mode is non-negotiable.

FAQ

What does the senior-frontend skill do?

Use when the user needs production-grade React/Next.js/TypeScript development with rigorous component architecture, state management, performance optimization, and 85% test coverage. Triggers: React component development, Next.js page creation, state management design, frontend performance audit, component library setup.

How do I install senior-frontend?

Run npx skills add https://github.com/pixel-process-ug/superkit-agents --skill senior-frontend in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/senior-frontend/ (personal) or .claude/skills/senior-frontend/ (project).

Which AI agents can use senior-frontend?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is senior-frontend safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains senior-frontend?

It is published by pixel-process-ug in pixel-process-ug/superkit-agents. It has 83 recorded installs.

More from pixel-process-ug/superkit-agents

View all →

ui-ux-pro-max

pixel-process-ug/superkit-agents

Use when the user needs full UI/UX design intelligence — styles, palettes, fonts, UX guidelines, chart selection, and accessible, performant implementation across any supported stack. Triggers: user says "design", "UI", "UX", "color palette", "typography", "accessibility", "responsive design", "chart type", "style guide", building any user-facing interface.

Frontend & Design1.2K installs

frontend-ui-design

pixel-process-ug/superkit-agents

Use when designing UI components, creating component architectures, implementing responsive layouts, setting up design systems, or selecting state management solutions for frontend applications

Frontend & Design117 installs

reverse-engineering-specs

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

107 installs

canvas-design

pixel-process-ug/superkit-agents

Use when the user needs HTML Canvas, SVG graphics, data visualization, generative art, or interactive visual elements with D3.js or similar libraries. Triggers: user says "canvas", "SVG", "chart", "data visualization", "D3", "generative art", "animation", "interactive graphics", drawing on screen.

Media & Creative90 installs

autonomous-loop

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

88 installs

laravel-boost

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

Backend & APIs87 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs