Logo: Frontend Setup

Frontend Setup

Communautéit
somnus0x
frontend-setup

Claude Code fir React/Next.js-Repos astellen: Projetkontext, Konventiounen a Schutzmoossnamen, fir datt et net méi roden muss a scho mam éischte Prompt korrekt baut. Benotzt dëse Skill, wann Dir Claude Code an enger Frontend-Codebase ariichte wëllt.

Add to TypingMind

Iwwersiicht

Editeursomnus0x
Repositoryagt-skill-pack
Skill-Nummfrontend-setup
Stären
74
Forks
17
Matgeliwwert Dateien
2
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    somnus0x huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Frontend Setup an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/somnus0x/agt-skill-pack/tree/main/skills/frontend-setup
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/somnus0x/agt-skill-pack.git /tmp/agt-skill-pack
mkdir -p .claude/skills
cp -r /tmp/agt-skill-pack/skills/frontend-setup .claude/skills/frontend-setup
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Frontend Setup an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Frontend Setup automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Frontend Setup net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Frontend Setup — Claude Code × React/Next.js

You just installed Claude Code. Your frontend repo is React or Next.js. This skill gives Claude Code the context it needs to stop guessing and start building correctly from the first prompt.

Why

Claude Code writes decent React out of the box. But "decent" means: wrong import paths, outdated patterns, components that don't match your structure, styles that fight your setup. You spend the first hour correcting things that should've been right from the start.

This skill front-loads the project context so Claude Code knows your stack before you ask it to build anything.

When to use

Run once when setting up Claude Code on a frontend repo. Re-run when you change major dependencies (migration to App Router, new styling system, state management swap).

Say: "setup frontend", "configure for react", "frontend onboarding", or just paste this skill into your session.

Step 1 — Detect your stack

Before writing any CLAUDE.md rules, tell Claude Code to scan your project:

Read my package.json, tsconfig, and project structure.
Tell me:
1. Framework (Next.js version? App Router or Pages?)
2. Styling (Tailwind? CSS Modules? styled-components? version?)
3. State management (Redux? Zustand? React Query? Context only?)
4. Testing (Vitest? Jest? Playwright? none?)
5. Component pattern (barrel exports? co-located files? flat?)
6. Linting/formatting (ESLint config? Prettier?)

Don't suggest changes. Just report what exists.

This gives you the facts before you write rules. Don't assume — detect.

Step 2 — Generate your CLAUDE.md rules

Based on the scan, add these sections to your project's CLAUDE.md. Only include sections relevant to your stack.

Component conventions

markdown
## Component Rules

- Components live in `src/components/` grouped by feature, not by type
- One component per file. File name = component name (PascalCase)
- Co-locate styles, tests, and types with the component:

components/ MarketCard/ MarketCard.tsx MarketCard.test.tsx types.ts

- No barrel exports (index.ts re-exports) unless the folder has 5+ files
- Props interface lives in the same file, named `{ComponentName}Props`
- Default export for page components, named export for everything else

Adapt to your actual structure. If your repo uses flat files — say flat files. If it uses barrel exports everywhere — say that. The point is to describe what IS, not what should be.

Import rules

markdown
## Import Rules

- Absolute imports from `@/` (mapped to `src/` in tsconfig)
- Import order: react → external libs → internal modules → relative files → styles
- No circular imports. If A imports B and B imports A — extract shared types to a third file
- Prefer named imports: `import { Button } from '@/components/ui/Button'`

Styling

Pick your block based on what you use:

Tailwind:

markdown
## Styling (Tailwind)

- Tailwind v4 with CSS-first config
- Use `cn()` utility for conditional classes (already in `lib/utils.ts`)
- No inline style objects. If Tailwind can't do it, add a CSS variable
- Color tokens: use semantic names (`text-primary`, `bg-surface`) not raw values
- Responsive: mobile-first. `sm:` `md:` `lg:` — no custom breakpoints

CSS Modules:

markdown
## Styling (CSS Modules)

- One `.module.css` per component, co-located
- Class names: camelCase in JS, kebab-case in CSS
- No global styles except in `globals.css`
- CSS variables for colors and spacing — defined in `:root`

Data fetching (Next.js App Router)

markdown
## Data Fetching

- Server Components by default. Add 'use client' only when needed (state, effects, browser APIs)
- Fetch in Server Components or Route Handlers — not in client components
- Use React Server Actions for mutations
- Loading states: `loading.tsx` files, not manual isLoading booleans
- Error boundaries: `error.tsx` files at route level

Data fetching (React SPA / Pages Router)

markdown
## Data Fetching

- React Query (TanStack Query) for all server state
- Custom hooks in `hooks/` folder: `useMarkets()`, `useUser()`
- No raw fetch/axios in components — always wrap in a hook
- Loading/error states handled by React Query, not manual state

State management

markdown
## State

- Server state: React Query (or Server Components if Next.js App Router)
- Client state: Zustand for global, useState for local
- No prop drilling past 2 levels — extract to context or Zustand
- Form state: react-hook-form, not manual onChange handlers

TypeScript

markdown
## TypeScript

- Strict mode. No `any` unless you add a comment explaining why
- API response types in `types/api.ts`
- Component prop types co-located with component
- Use `satisfies` over `as` for type narrowing
- Enums → union types: `type Status = 'active' | 'pending' | 'closed'`

Testing

markdown
## Testing

- Unit tests: Vitest + React Testing Library
- Test file lives next to component: `Button.test.tsx`
- Test behavior, not implementation. Click the button, check the result
- No snapshot tests unless explicitly asked
- E2E: Playwright for critical flows only

Step 3 — Add guardrails

These rules prevent Claude Code from doing things that break your project. Add to CLAUDE.md:

markdown
## Don't

- Don't install new dependencies without asking first
- Don't create new top-level folders
- Don't refactor existing components unless I specifically ask
- Don't add error boundaries or loading states unless I ask for them
- Don't convert between CSS approaches (don't migrate Tailwind to CSS Modules)
- Don't add comments to code you didn't write
- Don't create utility functions for one-time operations
markdown
## Before writing code

1. Check if a similar component already exists — don't duplicate
2. Follow the existing pattern in the nearest similar file
3. Run the dev server / type checker to verify your changes compile

Step 4 — Verify

After setting up CLAUDE.md, test with a small task:

Create a simple card component that displays a title and description.
Follow existing project conventions.

Check:

  • Did it put the file in the right place?
  • Did it use the right styling approach?
  • Did it follow your import pattern?
  • Did it match existing component structure?

If it got any of these wrong, your CLAUDE.md is missing that rule. Add it.

The principle

Claude Code with no context writes generic React. Claude Code with your CLAUDE.md writes your React. The gap between "works" and "fits" is 15 minutes of setup.

Add to your CLAUDE.md

markdown
### Frontend setup
Before building any new component, check:
1. Does a similar component already exist? Search first
2. What pattern does the nearest existing component follow? Match it
3. Where should this file live based on project structure?
Follow the component, import, and styling rules in this file exactly.

Output discipline

When this skill is invoked:

  1. Run the stack detection scan (Step 1)
  2. Generate CLAUDE.md sections relevant to the detected stack
  3. Include the guardrails section
  4. Nothing else — no explanations of what React is, no best practices lectures

The output should be copy-pasteable into CLAUDE.md directly.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Frontend Setup?

Claude Code fir React/Next.js-Repos astellen: Projetkontext, Konventiounen a Schutzmoossnamen, fir datt et net méi roden muss a scho mam éischte Prompt korrekt baut. Benotzt dëse Skill, wann Dir Claude Code an enger Frontend-Codebase ariichte wëllt.

Firwat Frontend Setup op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Frontend Setup besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Frontend Setup an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/somnus0x/agt-skill-pack/tree/main/skills/frontend-setup an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Frontend Setup benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Frontend Setup benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Frontend Setup domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Frontend Setup gratis?

Jo. somnus0x huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇