Skip to content
Agentmart
Submit a tool

frontend

Frontend development patterns — component design, accessibility, performance optimisation, and state management best practices for modern web UIs.

Skill by Satcomx00-x00

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/satcomx00-x00-frontend

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Frontend development patterns — component design, accessibility, performance optimisation, and state management best practices for modern web UIs.

Use cases: design, frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/frontend

What's inside

Skill name
frontend
Description
Frontend development patterns — component design, accessibility, performance optimisation, and state management best practices for modern web UIs.
License
MIT
Metadata
author: Satcomx00-x00 · version: 1.0.0
Instructions
154 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# frontend

Frontend development patterns — component design, accessibility, performance optimisation, and state management best practices for modern web UIs.

## Instructions

Apply these frontend practices when building user interfaces:

## Guidelines

### Type Safety

- **Type-safe props**: every component must have an explicit props type or interface — no implicit `any`, no untyped `children`
- **Validated forms**: use React Hook Form + Zod resolver (or equivalent) for form validation — never trust `event.target.value` directly without parsing
- **API response types**: generate or define types for every API response; never spread untyped API data into state
- **Event handler types**: use precise event types (`React.ChangeEvent<HTMLInputElement>`) instead of `any`

### Error Handling

- Every data-fetching hook must expose `isLoading`, `error`, and `data` states — handle all three in the UI
- Wrap async UI sections in an `ErrorBoundary` component
- Display user-friendly error messages — never render raw `error.message` from API responses directly

### Performance Baseline

- No synchronous expensive computations in the render path — defer with `useMemo`/`useCallback` only after profiling confirms the bottleneck
- Images must have explicit `width` and `height` to prevent layout shifts (CLS)
- Bundle size budget: warn if a single route chunk exceeds 250 kB gzipped

### Accessibility Baseline

- All interactive elements must be operable by keyboard alone
- Colour contrast must meet WCAG 2.1 AA (≥ 4.5:1 for body text)
- Automated accessibility checks (`axe-core` or `eslint-plugin-jsx-a11y`) must pass in CI

---

### Component Design Principles

**Single Responsibility**: each component does one thing. Split large components into smaller, composable pieces.

**Presentational vs. Container components:**
- **Presentational** – pure UI; receives data via props; no side effects
- **Container/Smart** – fetches data, manages state, passes down to presentational components

**Naming conventions:**
- Component files: `PascalCase.tsx` (e.g., `UserCard.tsx`)
- Hooks: `useNoun.ts` (e.g., `useAuthSession.ts`)
- Utilities: `camelCase.ts` (e.g., `formatCurrency.ts`)

### Accessibility (a11y)

Every UI must meet **WCAG 2.1 AA** as a minimum:

- Use semantic HTML: `<button>`, `<nav>`, `<main>`, `<article>`, `<header>`, `<footer>` — not `<div>` for everything
- All interactive elements must be keyboard-focusable and operable
- Images must have meaningful `alt` text (or `alt=""` for decorative images)
- Colour contrast ratio: ≥ 4.5:1 for normal text, ≥ 3:1 for large text
- Form fields must have associated `<label>` elements
- Use `aria-*` attributes only when semantic HTML isn't sufficient
- Test with a screen reader (VoiceOver, NVDA) and keyboard-only navigation

```tsx
// Bad
<div onClick={handleSubmit}>Submit</div>

// Good
<button type="submit" onClick={handleSubmit}>Submit</button>
```

### Performance

**Core Web Vitals targets:**
- LCP (Largest Contentful Paint) < 2.5s
- INP (Interaction to Next Paint) < 200ms
- CLS (Cumulative Layout Shift) < 0.1

**Techniques:**
- Code-split by route: `const Page = lazy(() => import('./Page'))`
- Lazy-load images below the fold: `<img loading="lazy" />`
- Preload critical assets: `<link rel="preload" />`
- Use `useMemo` / `useCallback` only for proven bottlenecks (measure first)
- Virtualise long lists (react-virtual, TanStack Virtual)
- Serve modern formats (WebP, AVIF) for images
- Use a CDN for static assets

### State Management

Choose the right tool for the complexity level:

| Scope | Tool |
|-------|------|
| Local UI state | `useState`, `useReducer` |
| Shared component tree state | React Context (with care) |
| Server state (async) | TanStack Query, SWR |
| Complex global state | Zustand, Jotai, Redux Toolkit |
| Form state | React Hook Form, Formik |

**Rules:**
- Lift state up only as high as needed
- Server state and client state are different — manage them separately
- Avoid putting server-fetched data into global client state manually; use a data-fetching library

### CSS / Styling

- Use design tokens (CSS custom properties) for colours, spacing, typography
- Prefer utility-first CSS (Tailwind) or CSS Modules to avoid class name collisions
- Mobile-first responsive design: base styles for mobile, `md:` / `lg:` for larger breakpoints
- No magic numbers — use spacing scale (4px base, multiples of 4)

### Error Handling in UI

- Every async operation should have loading, success, and error states
- Show meaningful error messages (not "An error occurred")
- Use Error Boundaries to catch render errors
- Never expose stack traces or internal details to end users

## Examples

From Satcomx00-x00/skills-db, MIT.

More from Satcomx00-x00/skills-db

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Apr 20, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Satcomx00-x00

Cite this page

frontend skill. Agent Mart. https://agentmart.dev/skills/satcomx00-x00-frontend (last updated 2026-10-24)