Skip to content
Skillpedia
Websites & UI (frontend)48k · #3051

frontend-dev-guidelines

Helps your agent follow strict architecture and performance rules when creating code. It's useful for ensuring code is well-structured and fast.

What it does

This guide helps programmers build websites and web applications using React. It sets clear rules on how to organize code, fetch data, and ensure everything runs smoothly and is easy to maintain.

When to use it

  • ✓When creating new parts of a website (components or pages).
  • ✓When adding new features.
  • ✓When fetching or changing information in the system.

Example of what to ask your AI

“How should I organize the code for a new login feature?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/frontend-dev-guidelines/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/frontend-dev-guidelines/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The guide uses a 'Suspense-first' approach for data fetching, meaning the interface waits for data to load gracefully. It also requires code to be organized into 'features' and mandates the use of TypeScript to prevent errors.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill frontend-dev-guidelines

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/frontend-dev-guidelines/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Frontend Development Guidelines

(React · TypeScript · Suspense-First · Production-Grade)

You are a senior frontend engineer operating under strict architectural and performance standards.

Your goal is to build scalable, predictable, and maintainable React applications using:

  • Suspense-first data fetching
  • Feature-based code organization
  • Strict TypeScript discipline
  • Performance-safe defaults

This skill defines how frontend code must be written, not merely how it can be written.


1. Frontend Feasibility & Complexity Index (FFCI)

Before implementing a component, page, or feature, assess feasibility.

FFCI Dimensions (1–5)

Dimension Question
Architectural Fit Does this align with feature-based structure and Suspense model?
Complexity Load How complex is state, data, and interaction logic?
Performance Risk Does it introduce rendering, bundle, or CLS risk?
Reusability Can this be reused without modification?
Maintenance Cost How hard will this be to reason about in 6 months?

Score Formula

FFCI = (Architectural Fit + Reusability + Performance) − (Complexity + Maintenance Cost)

Range: -5 → +15

Interpretation

FFCI Meaning Action
10–15 Excellent Proceed
6–9 Acceptable Proceed with care
3–5 Risky Simplify or split
≤ 2 Poor Redesign

2. Core Architectural Doctrine (Non-Negotiable)

1. Suspense Is the Default

  • useSuspenseQuery is the primary data-fetching hook
  • No isLoading conditionals
  • No early-return spinners

2. Lazy Load Anything Heavy

  • Routes
  • Feature entry components
  • Data grids, charts, editors
  • Large dialogs or modals

3. Feature-Based Organization

  • Domain logic lives in features/
  • Reusable primitives live in components/
  • Cross-feature coupling is forbidden

4. TypeScript Is Strict

  • No any
  • Explicit return types
  • import type always
  • Types are first-class design artifacts

When to Use

Use frontend-dev-guidelines when:

  • Creating components or pages
  • Adding new features
  • Fetching or mutating data
  • Setting up routing
  • Styling with MUI
  • Addressing performance issues
  • Reviewing or refactoring frontend code

3. Quick Start Checklists

New Component Checklist

  • React.FC<Props> with explicit props interface
  • Lazy loaded if non-trivial
  • Wrapped in <SuspenseLoader>
  • Uses useSuspenseQuery for data
  • No early returns
  • Handlers wrapped in useCallback
  • Styles inline if <100 lines
  • Default export at bottom
  • Uses useMuiSnackbar for feedback

New Feature Checklist

  • Create features/{feature-name}/
  • Subdirs: api/, components/, hooks/, helpers/, types/
  • API layer isolated in api/
  • Public exports via index.ts
  • Feature entry lazy loaded
  • Suspense boundary at feature level
  • Route defined under routes/

4. Import Aliases (Required)

Alias Path
@/ src/
~types src/types
~components src/components
~features src/features

Aliases must be used consistently. Relative imports beyond one level are discouraged.


5. Component Standards

Required Structure Order

  1. Types / Props
  2. Hooks
  3. Derived values (useMemo)
  4. Handlers (useCallback)
  5. Render
  6. Default export

Lazy Loading Pattern

const HeavyComponent = React.lazy(() => import('./HeavyComponent'));

Always wrapped in <SuspenseLoader>.


6. Data Fetching Doctrine

Primary Pattern

  • useSuspenseQuery
  • Cache-first
  • Typed responses

Forbidden Patterns

❌ isLoading ❌ manual spinners ❌ fetch logic inside components ❌ API calls without feature API layer

API Layer Rules

  • One API file per feature
  • No inline axios calls
  • No /api/ prefix in routes

7. Routing Standards (TanStack Router)

  • Folder-based routing only
  • Lazy load route components

…

FAQ

What is 'Suspense-first'?

It's a way to make the interface wait for data to load without showing flashing 'loading' messages. The entire screen waits in an organized manner.

Why organize into 'features'?

It helps keep the code organized by separating the logic for each part of the website. This makes it easier to find and modify specific parts without affecting others.

What is TypeScript?

It's a tool that adds checks to JavaScript, helping to find errors before the code runs, making development safer and more predictable.

Details

Original description by the author

You are a senior frontend engineer operating under strict architectural and performance standards. Use when creating components or pages, adding new features, or fetching or mutating data.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3051
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills