بنقرة واحدة
frontend-code-standards
Code standards and conventions for React, TypeScript, and domain-driven front-end architecture
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Code standards and conventions for React, TypeScript, and domain-driven front-end architecture
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Best practices for structuring React components - function declarations, file organization, and Single Responsibility Principle
Comprehensive testing guidelines for Vitest with React Testing Library
Conventional commit format and workflow with Jira ticket integration
استنادا إلى تصنيف SOC المهني
| name | Frontend Code Standards |
| description | Code standards and conventions for React, TypeScript, and domain-driven front-end architecture |
Opinionated code standards for building scalable, maintainable front-end applications with React, TypeScript, and Clean Architecture principles.
Quick tasks (50-150 tokens):
Medium tasks (200-500 tokens):
Complex tasks (500-1000 tokens):
This skill should be loaded when:
.tsx, .ts, .jsx, or .js files in a React projectFile patterns that trigger specific rules:
*.tsx → Load react-naming.md + react-component-structure.mdKeywords:
component, naming, convention, structure, SOLID, SRP, DRY, architecture, Clean Code, TypeScript, interface, type, helper, utility, performance, optimization
Navigate to specific topics:
→ See rules/react-naming.md
Use when:
Covers:
→ See rules/react-component-structure.md
Use when:
Covers:
→ See rules/typescript-naming.md
Use when:
Covers:
→ See rules/ddd-naming.md
Use when:
Covers:
→ See rules/general-coding-standards.md
Use when:
Covers:
→ See rules/helper-function-patterns.md
Use when:
Covers:
→ See rules/typescript-best-practices.md
Use when:
Covers:
→ See rules/clean-code-principles.md
Use when:
Covers:
→ See rules/solid-principles.md
Use when:
Covers:
→ See rules/clean-architecture.md
Use when:
Covers:
Performance optimization patterns for hot paths and frequently-executed code.
→ See rules/dom-performance.md
Use when working with DOM manipulation and browser APIs:
→ See rules/caching-strategies.md
Use when optimizing expensive operations:
→ See rules/data-structures.md
Use when choosing data structures for performance:
→ See rules/array-optimization.md
Use when working with arrays:
→ See rules/control-flow-optimization.md
Use when optimizing function logic:
| Concept | Naming | See Also |
|---|---|---|
| Feature folders | kebab-case | React |
| Composite component folder | PascalCase | React |
| React components | PascalCase | React |
| Hooks | camelCase | React |
| Functional utils | kebab-case | TypeScript |
| Utility classes / services | PascalCase | TypeScript |
| Domain entities & types | PascalCase | DDD |
| Type | Purpose | Example |
|---|---|---|
| Formatter | Display transformation | formatCurrency, formatDate |
| Validator | Data validation | isValidEmail, isRequired |
| Parser | Format conversion | parseISODate, parseJSON |
| Calculator | Business logic | calculateDiscount, calculateTax |
| Guard | Type narrowing | isError, isDefined |
See helper-function-patterns.md for details.
DOM: Batch DOM reads/writes to avoid layout thrashing
Caching: Cache property access in loops, function results, storage APIs
Data Structures: Use Map/Set for O(1) lookups instead of Array.find()
Arrays: Combine iterations, check length before sorting, use toSorted()
Control Flow: Return early, hoist RegExp, use guard clauses