frontend-dev-guidelines · davila7 — Claude Code skill for React/TypeScript
A skill that gives the agent one set of rules for React and TypeScript work: Suspense, lazy loading, features layout, MUI v7 and TanStack.
npx claude-code-templates@latest --skill development/frontend-dev-guidelinesWhat frontend-dev-guidelines does
The skill kicks in when the agent writes components, pages or hooks, sets up routing, or fetches data. Inside are checklists for a new component and a new feature, an import cheatsheet, and topic guides: component patterns, data fetching, file organization, styling, routing, loading and error states, performance, TypeScript. Each topic points to its own file under resources/.
Data fetching follows useSuspenseQuery with Suspense boundaries instead of isLoading checks. Early returns with a spinner are ruled out because they shift the layout. User notifications go through useMuiSnackbar; react-toastify is out. Styling uses the sx prop typed as SxProps<Theme>, and in MUI v7 the grid is written as <Grid size={{ xs: 12, md: 6 }}> — the older syntax with xs and md directly will not do.
Features live in features/{feature-name}/ with api/, components/, hooks/, helpers/ and types/ subfolders, while shared pieces belong in components/. The aliases @/, ~types, ~components and ~features are declared in vite.config.ts, so a project without them will need the examples adjusted. Heavy components such as tables and charts load through React.lazy and get wrapped in SuspenseLoader.
What it helps with
- lay out the folder structure for a new feature
- move data requests to
useSuspenseQuery - drop early spinner returns that shift the layout
- split styles onto
sxand pull them into a separate file - set up lazy loading for heavy components
Example prompts for the agent
- Create the
billingfeature using the skill's layout:api/,components/,hooks/,types/ - Rewrite this component with
useSuspenseQueryand remove theisLoadingcheck - Set up the
/billing/route withcreateFileRouteand lazy-load the page
How to install frontend-dev-guidelines
1claude-code-templates
npx claude-code-templates@latest --skill development/frontend-dev-guidelines2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill frontend-dev-guidelines -a claude-code3Manually: put the files in place
~/.claude/skills/frontend-dev-guidelines/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/frontend-dev-guidelines/
Manually: put the files in place
.agents/skills/frontend-dev-guidelines/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/frontend-dev-guidelines/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates frontend-dev-guidelines2Manually: put the files in place
.github/skills/frontend-dev-guidelines/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/frontend-dev-guidelinesManually: put the files in place
.devin/skills/frontend-dev-guidelines/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about frontend-dev-guidelines
How do I install frontend-dev-guidelines in Claude?
Use the author's templates: npx claude-code-templates@latest --skill development/frontend-dev-guidelines. The other route is npx skills add davila7/claude-code-templates --skill frontend-dev-guidelines -a claude-code. The file then sits at ~/.claude/skills/frontend-dev-guidelines/SKILL.md.
What does frontend-dev-guidelines do?
It hands the agent a rulebook for React and TypeScript: component patterns, data fetching with TanStack Query, the features/ layout, MUI v7 styling, TanStack Router routing, loading and error states, and performance work.
Which import aliases does the skill use?
@/ maps to src/, ~types to src/types, ~components to src/components, and ~features to src/features. They are declared in vite.config.ts, so projects without them need the examples edited.
Similar skills
Everything for Frontend and UI →frontend-dev-guidelines by other authors comes first.