coding-standards

Enforces coding standards and best practices for TypeScript, JavaScript, React, and Node.js development.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Femad-6/my-skills --skill coding-standards-femad-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/Femad-6/my-skills/tree/main/.github/skills/coding-standards
Command: npx skills add https://github.com/Femad-6/my-skills --skill coding-standards-femad-6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent code style, missing error handling, and anti-patterns slow down teams and create maintenance debt. This Skill provides a single reference of universal coding standards so every review, refactor, or new module follows the same conventions. ## Core Features & Use Cases - Language Standards: Naming, immutability, error handling, async/await, and type-safety rules for TypeScript and JavaScript. - React & API Guidance: Component structure, custom hooks, state management, REST conventions, and Zod-based input validation. - Quality Checks: Code smell detection (long functions, deep nesting, magic numbers), testing standards, and performance patterns like memoization and lazy loading. - Use Case: When reviewing a pull request, ask the AI to check the code against these standards to catch mutations, missing error handling, and untyped functions before merge. ## Quick Start Review this TypeScript file against the coding standards and flag any violations of naming, immutability, or error handling rules.

Frequently Asked Questions about coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce coding standards in a TypeScript project?

Apply the standards during code reviews, refactoring, and new module creation by checking naming, immutability, error handling, and type safety rules. The Skill provides concrete good and bad examples for each rule so violations are easy to spot.

What are React best practices for component structure?

Use functional components with typed props interfaces, default parameter values, and clear variant patterns. Extract reusable logic into custom hooks like useDebounce, and prefer functional state updates to avoid stale state in async scenarios.

How should I validate API request bodies in Node.js?

Use Zod schemas to define expected shapes with constraints like string lengths and datetime formats. Parse the request body inside a try-catch and return a 400 response with validation details when ZodError is thrown.

Why should I avoid mutating objects and arrays directly?

Direct mutation breaks React's change detection and causes unpredictable bugs in shared state. Use the spread operator to create updated copies, such as {...user, name: 'New Name'} or [...items, newItem], keeping updates immutable.

What code smells indicate a function needs refactoring?

Watch for functions over 50 lines, nesting deeper than a few levels, and unexplained magic numbers. Split long functions into smaller units, use early returns to flatten nesting, and replace magic numbers with named constants.