AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Frontend Dev Guidelines

skill-kunanonj-ai-skills-hub-frontend-dev-guidelines · by KunanonJ

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.

— No reviews yet
0 installs
18 views
0.0% view→install

Install

$ agentstack add skill-kunanonj-ai-skills-hub-frontend-dev-guidelines

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ● Network access Used
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-kunanonj-ai-skills-hub-frontend-dev-guidelines)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Frontend Dev Guidelines? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 with explicit props interface
  • [ ] Lazy loaded if non-trivial
  • [ ] Wrapped in ``
  • [ ] Uses useSuspenseQuery for data
  • [ ] No early returns
  • [ ] Handlers wrapped in useCallback
  • [ ] Styles inline if import('./HeavyComponent'));

Always wrapped in ``.

---

## 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
* Breadcrumb metadata via loaders

```ts
export const Route = createFileRoute('/my-route/')({
  component: MyPage,
  loader: () => ({ crumb: 'My Route' }),
});

8. Styling Standards (MUI v7)

Inline vs Separate

  • 100 lines: {Component}.styles.ts

Grid Syntax (v7 Only)

 // ✅
          // ❌

Theme access must always be type-safe.


9. Loading & Error Handling

Absolute Rule

❌ Never return early loaders ✅ Always rely on Suspense boundaries

User Feedback

  • useMuiSnackbar only
  • No third-party toast libraries

10. Performance Defaults

  • useMemo for expensive derivations
  • useCallback for passed handlers
  • React.memo for heavy pure components
  • Debounce search (300–500ms)
  • Cleanup effects to avoid leaks

Performance regressions are bugs.


11. TypeScript Standards

  • Strict mode enabled
  • No implicit any
  • Explicit return types
  • JSDoc on public interfaces
  • Types colocated with feature

12. Canonical File Structure

src/
  features/
    my-feature/
      api/
      components/
      hooks/
      helpers/
      types/
      index.ts

  components/
    SuspenseLoader/
    CustomAppBar/

  routes/
    my-route/
      index.tsx

13. Canonical Component Template

import React, { useState, useCallback } from 'react';
import { Box, Paper } from '@mui/material';
import { useSuspenseQuery } from '@tanstack/react-query';
import { featureApi } from '../api/featureApi';
import type { FeatureData } from '~types/feature';

interface MyComponentProps {
  id: number;
  onAction?: () => void;
}

export const MyComponent: React.FC = ({ id, onAction }) => {
  const [state, setState] = useState('');

  const { data } = useSuspenseQuery({
    queryKey: ['feature', id],
    queryFn: () => featureApi.getFeature(id),
  });

  const handleAction = useCallback(() => {
    setState('updated');
    onAction?.();
  }, [onAction]);

  return (
    
      
        {/* Content */}
      
    
  );
};

export default MyComponent;

14. Anti-Patterns (Immediate Rejection)

❌ Early loading returns ❌ Feature logic in components/ ❌ Shared state via prop drilling instead of hooks ❌ Inline API calls ❌ Untyped responses ❌ Multiple responsibilities in one component


15. Integration With Other Skills

  • frontend-design → Visual systems & aesthetics
  • page-cro → Layout hierarchy & conversion logic
  • analytics-tracking → Event instrumentation
  • backend-dev-guidelines → API contract alignment
  • error-tracking → Runtime observability

16. Operator Validation Checklist

Before finalizing code:

  • [ ] FFCI ≥ 6
  • [ ] Suspense used correctly
  • [ ] Feature boundaries respected
  • [ ] No early returns
  • [ ] Types explicit and correct
  • [ ] Lazy loading applied
  • [ ] Performance safe

17. Skill Status

Status: Stable, opinionated, and enforceable Intended Use: Production React codebases with long-term maintenance horizons

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.