Agent skill
frontend-tech-stack
Provides standards for the frontend application technology stack. This skill should be used when setting up new frontend projects or upgrading existing ones with React 19, Vite, and Tailwind v4.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/frontend-tech-stack
SKILL.md
Frontend Tech Stack
This skill defines the standard technology stack for all frontend applications (erify_creators, erify_studios, etc.) in the project.
Core Core Technologies
| Category | Technology | Version | Notes |
|---|---|---|---|
| Framework | React | 19.x | Use functional components and hooks. |
| Build Tool | Vite | 7.x | Fast HMR, uses @vitejs/plugin-react. |
| Styling | Tailwind CSS | 4.x | Use the @tailwindcss/vite plugin. |
| Routing | TanStack Router | 1.x | File-based routing, type-safe navigation. |
| State/Query | TanStack Query | 5.x | For async server state management. |
| I18n | Paraglide JS | 2.x | Type-safe internationalization. |
Project Structure
Frontend apps should follow this structure:
src/
├── routes/ # TanStack Router file-based routes
│ ├── __root.tsx # Root layout
│ ├── index.tsx # Homepage
│ └── feature.tsx # Feature route
├── features/ # Feature-based modules (see below)
├── components/ # Shared components used across features
├── hooks/ # Shared hooks used across features
├── lib/ # Utilities and API clients
├── stores/ # Global state stores
├── types/ # Shared types
├── main.tsx # Entry point
└── index.css # Global styles (Tailwind imports)
Feature-Based Architecture
For scalability and maintainability, organize most code within the features/ folder. Each feature should be self-contained with its own components, hooks, API calls, and types.
Feature Structure:
src/features/awesome-feature/
├── api/ # API calls specific to this feature
│ ├── get-items.ts
│ └── create-item.ts
├── components/ # Components used only in this feature
│ ├── ItemList.tsx
│ └── ItemForm.tsx
├── hooks/ # Hooks specific to this feature
│ └── useItemFilters.ts
├── stores/ # State stores for this feature (if needed)
│ └── item-store.ts
├── types/ # TypeScript types for this feature
│ └── item.types.ts
└── utils/ # Utility functions for this feature
└── format-item.ts
Key Principles:
-
Colocation: Keep related code together. If a component is only used in one feature, it belongs in that feature's
components/folder, not the global one. -
No Cross-Feature Imports: Features should not import from each other. Instead, compose features at the application level (in routes or app-level components).
-
Shared Code: Only code used by multiple features should live in the global folders (
src/components/,src/hooks/, etc.).
Preventing Cross-Feature Imports:
Add this ESLint rule to enforce feature isolation:
// .eslintrc.cjs
'import/no-restricted-paths': [
'error',
{
zones: [
// Prevent features from importing from each other
{
target: './src/features/auth',
from: './src/features',
except: ['./auth'],
},
{
target: './src/features/dashboard',
from: './src/features',
except: ['./dashboard'],
},
// Add more features as needed
],
},
],
Configuration
Vite Config ("vite.config.ts")
Ensures Tailwind v4 and TanStack Router integration:
import tailwindcss from '@tailwindcss/vite';
import { tanstackRouter } from '@tanstack/router-plugin/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
tanstackRouter(),
react(),
tailwindcss(),
],
});
Tailwind Config (v4)
Tailwind v4 uses CSS-first configuration. Your index.css should look like:
@import "tailwindcss";
@theme {
--font-sans: "Inter", sans-serif;
/* Define custom tokens here */
}
Checklist
- Project is initialized with Vite + React + TypeScript.
- Uses Tailwind CSS v4 plugin.
- Uses TanStack Router for navigation.
- Depends on workspace packages (
@eridu/ui,@eridu/api-types) where appropriate.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?