Codealirezarezvani-skills
senior-frontend
Frontend development skill for React, Next.js, TypeScript, and Tailwind CSS applications. Use when building React components, optimizing Next.js performance, analyzing bundle sizes, scaffolding frontend projects, implementing accessibility, or reviewing frontend code quality.
3k est. installs25k stars
Estimated installs are a discovery signal based on public repository popularity and source completeness, not recorded Dokki installation events.
Repository
alirezarezvani/claude-skills
Pinned commit
f2bac0a8f29b
License
MIT
Execution
Instructions only
Complete source instructions
SKILL.md
Senior Frontend
Frontend development patterns, performance optimization, and automation tools for React/Next.js applications.
Table of Contents
- Project Scaffolding
- Component Generation
- Bundle Analysis
- React Patterns
- Next.js Optimization
- Accessibility and Testing
Project Scaffolding
Generate a new Next.js or React project with TypeScript, Tailwind CSS, and best practice configurations.
Workflow: Create New Frontend Project
-
Run the scaffolder with your project name and template:
-
Add optional features (auth, api, forms, testing, storybook):
-
Navigate to the project and install dependencies:
-
Start the development server:
Scaffolder Options
Generated Structure (Next.js)
Component Generation
Generate React components with TypeScript, tests, and Storybook stories.
Workflow: Create a New Component
-
Generate a client component:
-
Generate a server component:
-
Generate with test and story files:
-
Generate a custom hook:
Generator Options
Generated Component Example
Bundle Analysis
Analyze package.json and project structure for bundle optimization opportunities.
Workflow: Optimize Bundle Size
-
Run the analyzer on your project:
-
Review the health score and issues:
-
Apply the recommended fixes by replacing heavy dependencies.
-
Re-run with verbose mode to check import patterns:
Bundle Score Interpretation
Heavy Dependencies Detected
The analyzer identifies these common heavy packages:
React Patterns
Reference: references/react_patterns.md
Compound Components
Share state between related components:
Custom Hooks
Extract reusable logic:
Render Props
Share rendering logic:
Next.js Optimization
Reference: references/nextjs_optimization_guide.md
Server vs Client Components
Use Server Components by default. Add 'use client' only when you need:
- Event handlers (onClick, onChange)
- State (useState, useReducer)
- Effects (useEffect)
- Browser APIs
Image Optimization
Data Fetching Patterns
Accessibility and Testing
Reference: references/frontend_best_practices.md
Accessibility Checklist
- Semantic HTML: Use proper elements (
<button>,<nav>,<main>) - Keyboard Navigation: All interactive elements focusable
- ARIA Labels: Provide labels for icons and complex widgets
- Color Contrast: Minimum 4.5:1 for normal text
- Focus Indicators: Visible focus states
Testing Strategy
Quick Reference
Common Next.js Config
Tailwind CSS Utilities
TypeScript Patterns
Resources
- React Patterns:
references/react_patterns.md - Next.js Optimization:
references/nextjs_optimization_guide.md - Best Practices:
references/frontend_best_practices.md - Forcing-question library (Matt Pocock grill):
references/forcing_questions.md - Composition map (which specialist to fork into):
references/composition_map.md
Assumptions and Verifiable Success Criteria (Karpathy discipline)
Before this skill scaffolds a component, recommends a framework, or audits a bundle, the following four assumptions MUST be surfaced.
- Primary user device + network — mobile-4G, desktop-fiber, low-end-Android, or corporate-network. Drives every perf decision.
- LCP target in milliseconds — a single number, not "fast." Drives bundle budget and rendering choice.
- SEO-dependent vs. auth-walled — drives rendering (SSR/SSG/RSC vs. SPA).
- WCAG target + named a11y owner — AA, AAA, or best-effort. Drives a11y investment and CI gates.
Verifiable success criteria (Karpathy #4) — every recommendation must include:
- Core Web Vitals targets (LCP, INP, CLS) at p75 on the primary device
- A per-route JS bundle budget in KB-gzip
- A Lighthouse a11y floor + perf floor
If any of those three is not stated, the recommendation is incomplete — return to Q2 of the forcing-question library.
The scripts/frontend_decision_engine.py tool encodes these checks: it refuses to recommend a profile without the four assumption inputs and prints the verifiable thresholds for the matched profile.
Customization profiles
Four built-in profiles in profiles/ calibrate every recommendation:
Pick a profile via:
The tool returns the best-fit profile, the runner-up tradeoff (if within 15%), the stack picks, the anti-patterns to avoid on that profile, and the required CI gates.
To add a custom profile (e.g., your org's internal-tool defaults): copy profiles/vite-spa.json to profiles/<your-org>.json and adjust constraints + success_thresholds.
Composition map
This skill does NOT reimplement scope owned by the POWERFUL-tier specialists. It forks into them. See references/composition_map.md for the full routing table. Key forks:
The cs-frontend-engineer agent orchestrates these forks via context: fork. Invoke it from another agent with Agent({subagent_type: "cs-frontend-engineer", prompt: "..."}) or via /cs:frontend-review <your problem>.
Forcing-question library (Matt Pocock grill)
Before locking any framework or rendering decision, walk the seven forcing questions in references/forcing_questions.md. Discipline:
- One question per turn. No bundling.
- Always recommend the answer with cited canon.
- Track answers in
/tmp/frontend-grill-<date>.md. - If a kill criterion trips, stop. Don't scaffold around an unresolved gap.
- After Q7, run
frontend_decision_engine.pywith the seven answers.
Summary:
- Primary device + network?
- LCP target in ms (and INP, CLS)?
- RSC / SPA / SSR / SSG — pick and defend?
- JS bundle budget per route?
- SEO-dependent or auth-walled?
- Design-system source of truth?
- WCAG target + named a11y owner?
Invocation from other agents and skills
Three surfaces:
- Slash command:
/cs:frontend-review <prompt>— full grill + decision engine + composition routing. - Agent subagent:
Agent({subagent_type: "cs-frontend-engineer", prompt: "..."})— forks context, returns ≤ 200-word digest. - Direct tool call:
python scripts/frontend_decision_engine.py ...— deterministic profile match when inputs are known.
See agents/engineering/cs-frontend-engineer.md for the full invocation contract.
Same repository
Related Skills
agent-launcher-orchestrator
Use when a user wants to build, launch, grade, or schedule a Claude Managed Agent (CMA) in their own Anthropic account — "build me an agent", "launch this as a managed agent", "run this on a schedule", "grade my agent against a rubric", "set up a nightly worker". Reads the per-session goal (./my-agent/goal.json), routes deterministically to one of five phase sub-skills (interview → stage-launch → grade-iterate → run-without-you → wrap-up) via goal_router.py, and compiles the goal+phase into an execution shape (single-pass workflow / bounded grade→iterate loop / recurring cron deployment loop) via loop_compiler.py. Forks context so heavy intake (build sheets, payloads, eval cases) stays out of the parent thread. All launches are emitted as BYOK curl the user runs with their own key; no tool makes API calls. Inspired by anthropics/launch-your-agent (Apache-2.0). Distinct from engineering/agent-harness (generic domain loop) and engineering/write-a-skill (authors Claude Code skills, not CMAs).
View detailsagent-protocol
Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, and response formats. Use when C-suite agents need to query each other, coordinate cross-functional analysis, or run board meetings with multiple agent roles.
View detailsarquiteto-de-empresa
Company Architect: builds a business from scratch as an OKF (Open Knowledge Format) bundle — a tree of version-controllable .md files with frontmatter type, links forming a graph, and reserved index.md/log.md, readable by humans and agents. Guides the founder through a 12-phase interview (foundation, strategy, market, financial, sales, marketing, product, operations, tech, people, legal, governance), one phase at a time, few questions per block, and generates the concepts as conformant markdown. Trigger when the user wants to create, structure, or document an entire company in folders and .md files; when they mention build my company from scratch, company as code, company knowledge base for AI to read, company wiki for agents, OKF, or knowledge bundle. In English.
View detailsarquiteto-de-empresa
Company Architect: builds a business from scratch as an OKF (Open Knowledge Format) bundle — a tree of version-controllable .md files with frontmatter type, links forming a graph, and reserved index.md/log.md, readable by humans and agents. Guides the founder through a 12-phase interview (foundation, strategy, market, financial, sales, marketing, product, operations, tech, people, legal, governance), one phase at a time, few questions per block, and generates the concepts as conformant markdown. Trigger when the user wants to create, structure, or document an entire company in folders and .md files; when they mention build my company from scratch, company as code, company knowledge base for AI to read, company wiki for agents, OKF, or knowledge bundle. In English.
View detailsboard-deck-builder
Assembles comprehensive board and investor update decks by pulling perspectives from all C-suite roles. Use when preparing board meetings, investor updates, quarterly business reviews, or fundraising narratives. Covers structure, narrative framework, bad news delivery, and common mistakes.
View detailsboard-meeting
Multi-agent board meeting protocol for strategic decisions. Runs a structured 6-phase deliberation: context loading, independent C-suite contributions (isolated, no cross-pollination), critic analysis, synthesis, founder review, and decision extraction. Use when the user invokes /cs:boardroom, calls a board meeting, or wants structured multi-perspective executive deliberation on a strategic question.
View details