frontend-builder
Skill0 starsChanged 6 months agoMITView on GitHub
Build frontend applications with Vite+, React, TypeScript, and TanStack Router. Use this skill for new frontends, SPAs, dashboards, games, tools, screen implementation, UI changes, Vite to Vite+ migration, vp dev/build/test/lint/fmt/check workflows, TanStack Router route design, loaders, search params, navigation, and error handling.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- emtcmca/guildproof-skillstheir own version, first seen Sep 19, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- emtcmca/guildproof-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- go-cli-builderSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 5 are distinctive, and 25 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
25
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use Vite+'s vp CLI with React and TypeScript as the standard frontend stack.
- Very specific: line 14
When migrating an existing Vite project to Vite+, use vp migrate.
- Very specific: line 15
Use pnpm as the package manager.
- Very specific: line 16
Use playwright-cli when browser verification is useful.
- Very specific: line 17
After every code change, run vp check --fix.
- Very specific: line 18
Prefer Vite+ lifecycle commands whenever possible: vp dev, vp build, vp test, vp lint, vp fmt, and vp check.
- Very specific: line 20
When using Vite+, do not create separate config files for Oxlint, Oxfmt, Vitest, or tsdown.
- Very specific: line 22
Always write dev server stdout/stderr to web.log in the project root.
- Very specific: line 26
Create the project with vp.
- Very specific: line 38
If the project has no existing CSS convention, keep styling in src/index.css and component CSS.
- Very specific: line 85
After migration, review changes to vite.config.ts, package scripts, and the lockfile.
- Very specific: line 115
Create src/router.tsx and define a path-based route tree with createRootRouteWithContext, createRoute, and createRouter.
- Very specific: line 184
Use RouterProvider in src/main.tsx.
- Very specific: line 202
Prefer route loader functions for route data instead of component-level useEffect.
- Very specific: line 204
When using TanStack Query, combine queryOptions with queryClient.ensureQueryData.
- Distinctive: line 205
Wait for critical data in the loader, and split non-critical data into deferred loading or component-side fetching.
- Very specific: line 211
Always validate search params with validateSearch and treat them as typed URL state.
- Distinctive: line 214
Put only shared, restorable, or bookmarkable state in the URL.
- Very specific: line 219
Use Link for normal page navigation.
- Very specific: line 221
Use useNavigate for programmatic navigation after form submits or command actions.
- Distinctive: line 222
When using relative paths, make the source route explicit.
- Distinctive: line 223
Consider route masks only when modal URLs or preserved background pages are required.
- Very specific: line 228
Keep critical route definitions, loaders, validateSearch, and error boundaries in the main route file.
- Very specific: line 230
Use defaultPreload: "intent" for primary navigation.
- Distinctive: line 231
Use manual preloading only for screens that are highly likely to be opened next.
- Very specific: line 237
Use lucide-react for icon buttons when an icon is needed.
- Very specific: line 243
Start the dev server from the project root and write logs to root-level web.log.
- Very specific: line 249
After startup, inspect web.log for the served URL, compile errors, and runtime errors.
- Very specific: line 258
Run vp build and fix type errors and build errors.
- Very specific: line 260
Start the dev server and confirm Vite+ startup logs are written to web.log.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Builder
Use Vite+'s vp CLI with React and TypeScript as the standard frontend stack. Use TanStack Router for routing.
Core Rules
- For new projects, create a React + TypeScript project with Vite+ (
vp). - When migrating an existing Vite project to Vite+, use
vp migrate. - Use
pnpmas the package manager. - Use
playwright-cliwhen browser verification is useful. - After every code change, run
vp check --fix. - Prefer Vite+ lifecycle commands whenever possible:
vp dev,vp build,vp test,vp lint,vp fmt, andvp check. - Respect existing Vite+ configuration in
vite.config.ts, including lint/fmt/test/run/pack/staged blocks. - When using Vite+, do not create separate config files for Oxlint, Oxfmt, Vitest, or tsdown. Consolidate tool configuration in
vite.config.ts. - Make the first viewport show the actual usable app. Do not start with an explanatory landing page unless the user explicitly asks for one.
- Always write dev server stdout/stderr to
web.login the project root.
New Project
- Create the project with
vp.
vp create vite -- --template react-ts- Install dependencies.
pnpm install @tanstack/react-router @tanstack/router-devtools lucide-react- If the project has no existing CSS convention, keep styling in
src/index.cssand component CSS. Do not add extra UI frameworks unless they materially help the task.
Vite+ Configuration
In Vite+, consolidate all tool configuration in vite.config.ts.
import { defineConfig } from "vite-plus";
export default defineConfig({
server: {},
build: {},
preview: {},
test: {},
lint: {},
fmt: {},
run: {},
pack: {},
staged: {},
});Enable lint.options.typeAware and lint.options.typeCheck because type-aware linting is desired.
export default defineConfig({
lint: {
ignorePatterns: ["dist/**"],
options: {
typeAware: true,
typeCheck: true,
},
},
fmt: {
singleQuote: true,
},
});Existing Vite Migration
For an existing Vite project, inspect the current state first, then migrate to Vite+.
vp migrateAfter migration, review changes to vite.config.ts, package scripts, and the lockfile. If the project already has tests, linting, formatting, or build workflows, run vp check or the individual vp build, vp test, and vp lint commands.
Vite+ Commands
vp dev: Start the Vite dev server with HMR.vp build: Run the production build through Rolldown. This runs the Vite build, not a custom package.json build script.vp preview: Serve the production build locally.vp test: Run Vitest once. Unlike standalone Vitest, this is not watch mode.vp test watch: Run tests in watch mode.vp test run --coverage: Run tests with coverage.vp lint: Run Oxlint.vp fmt: Run Oxfmt.vp check: Run format, lint, and typecheck in one pass.vp check --fix: Auto-fix formatting and lint issues.vp run build: Run the package.jsonbuildscript.vp run build -r: Run the script across all workspace packages in dependency order.vp pack: Build a library through the tsdown integration.
TanStack Router Priority Rules
Implement these rules by priority.
- Critical: register the router type, use the
fromparameter for type narrowing, type the root context, and usequeryOptionsfor loader type inference. - Critical: organize the route tree around hierarchy, layouts, index routes, and pathless layouts.
- High: configure router defaults, loaders, loaderDeps, TanStack Query integration, search param validation, and not-found/error handling.
- Medium: use
Link, active states,useNavigate, relative paths, code splitting, and preloading when they fit the task. - Low: use root context,
beforeLoad, and dependency injection when shared dependencies such as auth, API clients, or feature flags are needed.
Router Implementation
Create src/router.tsx and define a path-based route tree with createRootRouteWithContext, createRoute, and createRouter.
import {
Link,
Outlet,
createRootRouteWithContext,
createRoute,
createRouter,
} from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
type RouterContext = {
queryClient?: unknown;
};
function RootLayout() {
return (
<>
<nav>
<Link to="/" activeOptions={{ exact: true }}>
Home
</Link>
<Link to="/settings">Settings</Link>
</nav>
<Outlet />
<TanStackRouterDevtools />
</>
);
}
const rootRoute = createRootRouteWithContext<RouterContext>()({
component: RootLayout,
notFoundComponent: NotFoundPage,
errorComponent: ErrorPage,
});
const indexRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/",
component: HomePage,
});
const settingsRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/settings",
validateSearch: (search) => ({
tab: typeof search.tab === "string" ? search.tab : "profile",
}),
component: SettingsPage,
});
const routeTree = rootRoute.addChildren([indexRoute, settingsRoute]);
export const router = createRouter({
routeTree,
defaultPreload: "intent",
defaultPreloadStaleTime: 30_000,
scrollRestoration: true,
context: {},
});
declare module "@tanstack/react-router" {
interface Register {
router: typeof router;
}
}Use RouterProvider in src/main.tsx.
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { RouterProvider } from "@tanstack/react-router";
import { router } from "./router";
import "./index.css";
createRoot(document.getElementById("root")!).render(
<StrictMode>
<RouterProvider router={router} />
</StrictMode>,
);Data Loading
- Prefer route
loaderfunctions for route data instead of component-leveluseEffect. - Define
loaderDepswhen search params or route params affect the loader cache. - When using TanStack Query, combine
queryOptionswithqueryClient.ensureQueryData. - Wait for critical data in the loader, and split non-critical data into deferred loading or component-side fetching.
- Handle loader errors with
errorComponentand not-found states withnotFoundComponent. - Route loaders for parent and child routes run in parallel, so avoid unnecessary sequential dependencies.
Search Params
- Always validate search params with
validateSearchand treat them as typed URL state. - Provide defaults so the page does not break when the URL omits a search param.
- Design parent routes so child routes can inherit parent search param types when useful.
- Put only shared, restorable, or bookmarkable state in the URL.
- Configure a custom serializer only when complex search param values require one.
Navigation
- Use
Linkfor normal page navigation. - Configure active states for current-location UI.
- Use
useNavigatefor programmatic navigation after form submits or command actions. - When using relative paths, make the source route explicit.
- Consider route masks only when modal URLs or preserved background pages are required.
Code Splitting And Preloading
- Split large routes, settings pages, admin screens, game screens, and other non-critical initial routes into lazy routes.
- Keep critical route definitions, loaders,
validateSearch, and error boundaries in the main route file. - Enable auto code splitting when the environment supports it.
- Use
defaultPreload: "intent"for primary navigation. - Use manual preloading only for screens that are highly likely to be opened next.
UI Implementation
- Split page components by route. Even for small apps, avoid putting everything in
src/App.tsx; createsrc/pages/andsrc/components/. - Implement primary, empty, error, and loading states when they are relevant.
- Use
lucide-reactfor icon buttons when an icon is needed. - Prevent text from overflowing buttons or cards by using stable dimensions, wrapping, and responsive constraints.
- For apps that need visual content, such as games or image-heavy experiences, use real assets, searched images, generated images, Canvas, Three.js, or another appropriate visual approach. Do not rely on empty decoration.
Logs And Dev Server
Start the dev server from the project root and write logs to root-level web.log.
vp dev --host 0.0.0.0 > web.log 2>&1After startup, inspect web.log for the served URL, compile errors, and runtime errors. Fix issues and restart when needed.
Common Errors
vp builddoes not run the expected script:vp buildis for the Vite build. Usevp run buildto run the package.json script.- Imports are broken after
vp migrate: runvp install, thenvp checkto find remaining issues.
Verification
- Run
vp buildand fix type errors and build errors. - Depending on the change, run
vp test,vp lint,vp fmt, andvp check. - Start the dev server and confirm Vite+ startup logs are written to
web.log. - Directly visit each TanStack Router path and verify initial render, search params, not-found behavior, and navigation.
- In the final response, briefly report changed files, the dev server URL, verification performed, and anything not verified.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

