Frontend Setup logo

Frontend Setup

Community
somnus0x
frontend-setup

Bootstrap Claude Code for React/Next.js repos: project context, conventions, and guardrails so it stops guessing and builds correctly from the first prompt. Use when setting up Claude Code in a frontend codebase.

Overview

Publishersomnus0x
Repositoryagt-skill-pack
Skill namefrontend-setup
Stars
74
Forks
17
Bundled files
2
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by somnus0x on GitHub. Read the source before you install it.

Installation

Install the Frontend Setup AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/somnus0x/agt-skill-pack/tree/main/skills/frontend-setup
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frontend Setup in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frontend Setup on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frontend Setup is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Frontend Setup AI skill do?

Bootstrap Claude Code for React/Next.js repos: project context, conventions, and guardrails so it stops guessing and builds correctly from the first prompt. Use when setting up Claude Code in a frontend codebase.

Why use Frontend Setup on TypingMind?

Because you install it once and use it with any model. Frontend Setup is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frontend Setup in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/somnus0x/agt-skill-pack/tree/main/skills/frontend-setup. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Frontend Setup?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frontend Setup?

As many as you like. As long as a model supports skills, you can use Frontend Setup with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frontend Setup AI skill free?

Yes. It is published on GitHub by somnus0x under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇