Agent skill
frontend-engineer
Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.
Install this agent skill to your Project
npx add-skill https://github.com/siviter-xyz/dot-agent/tree/main/skills/frontend-engineer
SKILL.md
Frontend Engineer
Comprehensive guide for modern React development, emphasizing Suspense-based data fetching, lazy loading, proper file organization, and performance optimization.
When to Use
- Creating new components or pages
- Building new features
- Fetching data with TanStack Query
- Setting up routing with TanStack Router
- Styling components
- Performance optimization
- Organizing frontend code
- TypeScript best practices
Quick Start
New Component Checklist
- Use
React.FC<Props>pattern with TypeScript - Lazy load if heavy component:
React.lazy(() => import()) - Wrap in
<SuspenseLoader>for loading states - Use
useSuspenseQueryfor data fetching - Import aliases:
@/,~types,~components,~features - Styles: Inline if <100 lines, separate file if >100 lines
- Use
useCallbackfor event handlers passed to children - Default export at bottom
- No early returns with loading spinners
- Use notification system for user feedback
New Feature Checklist
- Create
features/{feature-name}/directory - Create subdirectories:
api/,components/,hooks/,helpers/,types/ - Create API service file:
api/{feature}Api.ts - Set up TypeScript types in
types/ - Create route in
routes/{feature-name}/index.tsx - Lazy load feature components
- Use Suspense boundaries
- Export public API from feature
index.ts
Core Principles
- Lazy Load Everything Heavy: Routes, DataGrid, charts, editors
- Suspense for Loading: Use SuspenseLoader, not early returns
- useSuspenseQuery: Primary data fetching pattern for new code
- Features are Organized: api/, components/, hooks/, helpers/ subdirs
- Styles Based on Size: <100 inline, >100 separate
- Import Aliases: Use @/, ~types, ~components, ~features
- No Early Returns: Prevents layout shift
- TypeScript First: Strict mode, no
anytype
Implementation Workflow
When implementing frontend code:
- Check for existing workflow patterns (spec-first, TDD, etc.) and follow them
- Ensure code passes CI checks (types, tests, lint) before committing
- Group related changes with tests in atomic commits
References
For detailed guidance, see:
references/component-patterns.md- Modern React component patternsreferences/data-fetching.md- Suspense-based data fetchingreferences/file-organization.md- Feature-based organizationreferences/styling-guide.md- Styling patterns and best practicesreferences/routing-guide.md- TanStack Router patternsreferences/performance.md- Performance optimizationreferences/typescript-standards.md- TypeScript best practices
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
debugging
Root cause analysis and debugging protocols. Use when encountering errors, test failures, unexpected behavior, stack traces, or when code behaves differently than expected.
code-review
Code review practices emphasizing technical rigor, evidence-based claims, and verification. Use when receiving code review feedback, completing tasks requiring review, or before making completion claims.
cursor-best-practices
Best practices for working with Cursor. Use when learning how to effectively use Cursor features or optimizing your workflow.
create-skill
Guide for creating effective skills following best practices. Use when creating or updating skills that extend agent capabilities.
semantic-git
Manage Git commits using conventional commit format with atomic staging. Always generate plain git commands before running them and offer to let the user run them manually.
backend-engineer
Build robust backend systems with modern technologies (Node.js, Python, Go, Rust), frameworks (NestJS, FastAPI, Django), databases (PostgreSQL, MongoDB, Redis), APIs (REST, GraphQL, gRPC), authentication (OAuth 2.1, JWT), testing strategies, security best practices (OWASP Top 10), performance optimization, scalability patterns (microservices, caching, sharding), DevOps practices (Docker, Kubernetes, CI/CD), and monitoring. Use when designing APIs, implementing authentication, optimizing database queries, setting up CI/CD pipelines, handling security vulnerabilities, building microservices, or developing production-ready backend systems.
Didn't find tool you were looking for?