/engineering-advanced-skills:senior-frontendfrom engineering-advanced-skills
Scaffolds Next.js 16 or React+Vite 8 projects, generates components with tests and Storybook stories, and analyzes bundle size to flag heavy dependencies.
Ships in engineering-advanced-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Frontend development patterns, performance optimization, and automation tools for React/Next.js applications. Scaffold projects, generate components and hooks, analyze bundle sizes, and apply React/Next.js patterns with accessibility and testing built in.
package.json + import scanning that scores bundle health and flags heavy dependencies with lighter alternatives.Before scaffolding or generating, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
--template; produces a different project structure).--features; decides what gets generated).frontend_scaffolder vs component_generator).Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
# Scaffold a Next.js 16 app with auth (writes proxy.ts) and the API client feature
python3 engineering/senior-frontend/scripts/frontend_scaffolder.py my-app \
--dir /tmp/web --template nextjs --features auth,api
# Add a client component with a test and a Storybook story
python3 engineering/senior-frontend/scripts/component_generator.py ProductCard \
--type client --with-test --with-story --framework next --dir /tmp/web/my-app/components
# Bundle check on the bundled samples: sound passes, flawed fails the gate (exit 1)
python3 engineering/senior-frontend/scripts/bundle_analyzer.py \
engineering/senior-frontend/assets/sample-project-sound --verbose --min-score 80
python3 engineering/senior-frontend/scripts/bundle_analyzer.py \
engineering/senior-frontend/assets/sample-project-flawed --verbose --min-score 80 --format json
| Tool | Purpose | Key flags |
|---|---|---|
frontend_scaffolder.py | Scaffold Next.js 16 (App Router) or React + Vite 8 with React 19, TypeScript and Tailwind CSS v4 | --template, --features auth,api,forms,testing,storybook, --dir, --dry-run, --list-templates, --list-features (no name needed) |
component_generator.py | Component or hook with optional Vitest test and Storybook 10 story | --type client|server|hook, --with-test, --with-story, --framework next|vite, --no-index, --flat, --force, --dry-run |
bundle_analyzer.py | Flag heavy or misplaced dependencies from package.json and imports, with a health score; detects Next vs Vite and runs next.config checks only on Next | --verbose (import scan), --min-score N (gate) |
--format text|json; --json still works on the scaffolder and the analyzer.0 ok; 1 bundle score below --min-score (only with that flag); 2 bad input: target folder exists, a project name that is not a lowercase npm package name or escapes --dir, a component file that already exists (without --force), unknown feature or type, missing project or package.json, missing template files.use, so useCart --type hook writes useCart.ts, not useUseCart.ts.@next/bundle-analyzer or vite-bundle-visualizer on a production build.auth feature writes proxy.ts, which replaced middleware.ts in Next 16.next lint is gone, so both templates use ESLint flat config: ESLint 9 for Next (its plugins stop at 9), ESLint 10 for Vite. TypeScript is held at 6.0 because typescript-eslint does not support 7 yet; manifest.json (_pins) records why.npm install.frontend_scaffolder.py --dry-run --format json first to see the file list, then scaffold. Read the Notes it prints: they list what the scaffold cannot do for you (for auth, the login/register route handlers and user store on Next, and a real server behind the Vite guard).component_generator.py call per component; keep pages and layouts as Server Components and generate --type client only for interactive leaves.npm run build and the framework bundle analyzer; use bundle_analyzer.py --verbose --min-score 80 to spot heavy dependencies worth replacing and to gate CI on the static score.To change what the scaffolder writes, edit the files under assets/templates/scaffold/ (and manifest.json for paths, features and dependencies) rather than the script.
Load the reference that matches the task — keep this file lean and pull detail on demand:
Mistake: Marking whole pages 'use client' in the App Router.
Why it happens: It makes hooks and event handlers work immediately.
Instead: Keep pages and layouts as Server Components and push 'use client' down to the smallest interactive leaf; that keeps data fetching on the server and JavaScript out of the bundle.
Mistake: Reporting the static analyzer's score as the bundle size. Why it happens: It is quick and gives a number. Instead: Measure a production build with the framework's analyzer; tree-shaking and dynamic imports change the picture.
Mistake: Adding labels and keyboard support after the UI is done. Why it happens: It is invisible in a mouse-driven demo. Instead: Build with semantic elements from the start and check keyboard and screen-reader paths per component; retrofitting means rewriting.
Mistake: Treating the scaffolded auth feature as complete authentication, especially RequireAuth in a Vite app.
Why it happens: The forms render, the guard hides pages and the project builds, so it looks finished.
Instead: The guard and the proxy.ts cookie check only steer navigation. Credentials must be checked, and the session verified on every API request, on a server you write (verifySessionToken() in Next's lib/auth.ts).
| File | Purpose |
|---|---|
scripts/frontend_scaffolder.py | Next.js / React + Vite project scaffolder |
scripts/component_generator.py | Component, hook, test and story generator |
scripts/bundle_analyzer.py | Static dependency and import analysis with optional score gate |
assets/templates/scaffold/manifest.json | Project structures, features, dependencies, and the map from content keys to template files |
assets/templates/scaffold/files/, config/ | Bodies of every generated source and config file (index.html.tmpl takes the project name) |
assets/templates/component/*.tmpl | Component, hook, test, story and index templates ({name} placeholder) |
assets/sample-project-sound/ | Lean Next.js sample — analyzer scores 100, exits 0 with --min-score 80 |
assets/sample-project-flawed/ | Heavy dependencies, misplaced dev packages and bad imports — scores 46, exits 1 with --min-score 80 |
references/bundle_rules.json | Heavy-package, optimisation-tip, dev-only and import-pattern rule tables |
references/*.md | Code patterns, best practices, Next.js optimisation, React patterns, tooling |
What this skill covers:
package.json dependency inspection and import pattern scanningWhat this skill does NOT cover:
This skill owns the code layer: project skeletons, component files and dependency hygiene.
assets/sample-project-flawed/package.json (opens in a new tab)assets/sample-project-flawed/src/App.tsx (opens in a new tab)assets/sample-project-sound/app/page.tsx (opens in a new tab)assets/sample-project-sound/next.config.js (opens in a new tab)assets/sample-project-sound/package.json (opens in a new tab)assets/templates/component/client.tsx.tmpl (opens in a new tab)assets/templates/component/hook.ts.tmpl (opens in a new tab)assets/templates/component/index.ts.tmpl (opens in a new tab)assets/templates/component/index_hook.ts.tmpl (opens in a new tab)assets/templates/component/server.tsx.tmpl (opens in a new tab)assets/templates/component/story.tsx.tmpl (opens in a new tab)assets/templates/component/test.tsx.tmpl (opens in a new tab)assets/templates/scaffold/config/eslint.config.mjs.tmpl (opens in a new tab)assets/templates/scaffold/config/gitignore.tmpl (opens in a new tab)assets/templates/scaffold/config/next.config.js.tmpl (opens in a new tab)assets/templates/scaffold/config/postcss.config.js.tmpl (opens in a new tab)assets/templates/scaffold/config/prettierrc.tmpl (opens in a new tab)assets/templates/scaffold/config/tailwind.config.ts.tmpl (opens in a new tab)assets/templates/scaffold/config/tsconfig.json.tmpl (opens in a new tab)assets/templates/scaffold/config/vite/eslint.config.js.tmpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
100 skills in this plugin
/a11y-auditStatic WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.
/agent-designerDesigns multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
/agent-harnessTest and evaluation harness for AI agents — scenario suites, deterministic replay, regression diffing, cost and latency budgets. Use when agent quality is vibe-checked, before shipping a prompt or model change, or when evals drift.
npx claudepluginhub borghei/claude-skills --plugin engineering-advanced-skillsOther plugins' skills for the same job