coding-standards

Enforces baseline TypeScript, React, and API coding conventions for naming, immutability, and code review.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/freedom909/real-estate-saas --skill coding-standards-freedom909
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/freedom909/real-estate-saas/tree/main/.trae/skills/coding-standards
Command: npx skills add https://github.com/freedom909/real-estate-saas --skill coding-standards-freedom909

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams struggle with inconsistent naming, mutation bugs, weak error handling, and unmaintainable code across projects. This Skill provides a shared baseline of coding conventions so reviews, refactors, and new modules follow the same quality rules. ## Core Features & Use Cases - Naming & Readability Rules: Enforces descriptive variable names, verb-noun function naming, and self-documenting code over comments. - Immutability & Type Safety: Mandates spread-operator updates, proper TypeScript interfaces, and bans direct mutation and any types. - Code Smell Detection: Flags long functions, deep nesting, and magic numbers with concrete before/after examples. - Use Case: When reviewing a pull request that mutates state directly and uses unclear variable names, activate this Skill to get concrete refactoring guidance aligned with team conventions. ## Quick Start Review this TypeScript module against the coding standards and list every violation with a suggested fix.

Frequently Asked Questions about coding-standards

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

FAQPage Schema
How do I enforce consistent coding standards across a TypeScript project?▼

Apply baseline conventions for descriptive naming, immutability via spread operators, and comprehensive error handling. Combine these rules with linting and type-checking configuration so violations surface automatically during review and CI.

What are the best practices for naming functions and variables in TypeScript?▼

Use descriptive names that reveal intent, such as marketSearchQuery instead of q. Functions follow a verb-noun pattern like fetchMarketData or isValidEmail, while booleans use is/has prefixes.

When should I use this skill instead of framework-specific guidelines?▼

Use it for cross-cutting concerns like naming, immutability, readability, and code smell review. For React composition, hooks architecture, or backend API layering, defer to the narrower frontend-patterns or backend-patterns skills.

Why is direct state mutation considered bad in React and TypeScript?▼

Direct mutation breaks change detection, causes stale state in async updates, and makes debugging harder. Always create new objects with the spread operator and use functional state updates like setCount(prev => prev + 1).

What code smells should reviewers look for in pull requests?▼

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