| name | coding-patterns |
| description | Coding patterns and best practices for development. Use when writing React components, handling promises, error handling, or following code conventions. Triggers on react, component, hooks, promise, async, await, error, pattern, convention, typescript. |
| allowed-tools | Read, Grep, Glob, Write, Edit |
Coding Patterns and Best Practices
Quick Reference
Critical Rules Summary
Promise Handling
apiCall();
await apiCall();
void apiCall();
React Components
import React, { FC } from 'react';
const MyComponent: FC<Props> = () => {};
import { useState, useCallback } from 'react';
function MyComponent({ prop }: { prop: string }) {}
Restricted Patterns
string.toLocaleLowerCase()
string.toLowerCase()
Related Skills
/date-formatting - Date and time formatting
/i18n - Internationalization and translations
/error-handling - Error handling patterns
/cross-platform - Platform-specific code
/code-quality - Linting and code quality
/performance - Performance optimization
/state-management - State management patterns
/architecture - Project structure and import rules