coding-standards

Defines cross-project coding conventions for TypeScript and JavaScript codebases.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/NalinDalal/skillset --skill coding-standards-nalindalal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/NalinDalal/skillset/tree/main/skills/engineering/coding-standards
Command: npx skills add https://github.com/NalinDalal/skillset --skill coding-standards-nalindalal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams waste time on style debates and inconsistent code when no shared conventions exist. This Skill provides a ready-made set of TypeScript/JavaScript coding standards covering naming, structure, type safety, error handling, and async patterns, so conventions are established once and applied consistently. ## Core Features & Use Cases - Naming & Structure Rules: Enforces camelCase files and functions, PascalCase types and React components, UPPER_SNAKE_CASE constants, plus function length and parameter limits. - Type Safety & Error Handling: Bans any and unsafe type assertions, promotes discriminated unions, custom error classes, and explicit error propagation with concrete code examples. - Use Case: When setting up a new TypeScript project or onboarding a developer, load this Skill so every generated function follows early-return guard clauses, immutable array operations, and parallel Promise.all async patterns instead of ad-hoc styles. ## Quick Start Ask the agent to review this TypeScript module against our coding standards and fix any violations.

Frequently Asked Questions about coding-standards

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

FAQPage Schema
How do I enforce naming conventions in a TypeScript project?▼

Use camelCase for files, directories, functions, and variables; PascalCase for types, interfaces, enums, and React components; UPPER_SNAKE_CASE for constants; and kebab-case for CSS classes. Document these rules in a shared conventions guide so reviewers can cite them.

What are the best practices for TypeScript error handling?▼

Create custom error classes for domain errors, never swallow exceptions silently, and only use try/catch when you can actually recover. Throw specific errors like NotFoundError with resource and id context instead of returning null.

Should I use interfaces or type aliases in TypeScript?▼

Prefer interfaces over type aliases for object shapes, and use discriminated unions for variant types like Result<T> with success and error branches. Avoid `any` and type assertions; use `unknown` with type guards instead.

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

Use Promise.all whenever async operations are independent, such as loading a user, orders, and notifications for a dashboard. Sequential awaits add latencies together, while parallel execution finishes in the time of the slowest call.

What are common code smells and how do I fix them?▼

Common smells include functions over 30 lines, nesting deeper than 3 levels, magic numbers, duplicated logic, and god classes. Fix them by extracting smaller functions, using early returns, naming constants, and splitting classes by responsibility.