coding-standards

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

Updated May 23, 2026
One-click install
npx skills add https://github.com/Oatse/CWE-Automation --skill coding-standards-oatse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/Oatse/CWE-Automation/tree/main/.agents/skills/coding-standards-best-practices
Command: npx skills add https://github.com/Oatse/CWE-Automation --skill coding-standards-oatse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent code style, weak type safety, and poor error handling slow down development and make codebases hard to maintain. This Skill provides a single reference of universal coding standards so teams write readable, maintainable TypeScript, JavaScript, React, and Node.js code from the start. ## Core Features & Use Cases - Language Standards: Naming conventions, immutability patterns, async/await guidance, error handling, and type safety rules for TypeScript and JavaScript. - React & API Best Practices: Component structure, custom hooks, state management, REST API conventions, response formats, and Zod-based input validation. - Quality Guardrails: Code smell detection (long functions, deep nesting, magic numbers), testing standards with the AAA pattern, and performance techniques like memoization and lazy loading. - Use Case: When reviewing a pull request, apply these standards to flag direct state mutations, missing error handling, and untyped function signatures before merge. ## Quick Start Review this TypeScript module against the coding standards and list every violation with a corrected version.

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 consistent naming conventions, immutability with spread operators, proper type definitions instead of any, and comprehensive error handling. Use this Skill during code reviews and refactoring to check code against these rules systematically.

What are React best practices for component structure?

Use functional components with typed props interfaces, extract reusable logic into custom hooks, and update state with functional updates like setCount(prev => prev + 1). Prefer clear conditional rendering with && over nested ternaries.

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

Use Zod schema validation to parse and validate incoming request bodies before processing. Return a consistent error response with status 400 and validation details when parsing fails, keeping API responses in a uniform success/data/error structure.

When should I use Promise.all instead of sequential awaits?

Use Promise.all when async operations are independent of each other, such as fetching users, markets, and stats simultaneously. Sequential awaits are only needed when one call depends on another's result.

What code smells indicate a function needs refactoring?

Watch for functions longer than 50 lines, nesting deeper than a few levels, and unexplained magic numbers. Fix these by splitting logic into smaller functions, using early returns, and replacing literals with named constants.