coding-standards

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

5|Updated Jul 8, 2019
One-click install
npx skills add https://github.com/rinchsan/dotfiles --skill coding-standards-rinchsan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-standards
Source: https://github.com/rinchsan/dotfiles/tree/main/.claude/skills/coding-standards
Command: npx skills add https://github.com/rinchsan/dotfiles --skill coding-standards-rinchsan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent code style, unclear naming, and missing formatting checks slow down code reviews and create technical debt across TypeScript, JavaScript, and React projects. ## Core Features & Use Cases - Naming and Structure Conventions: Provides concrete good/bad examples for variables, functions, components, file organization, and project structure. - React and TypeScript Patterns: Covers typed components, state management, memoization, lazy loading, and async/await best practices. - Prettier Enforcement: Mandates running prettier --check after every JS/TS/Vue change, with commands for workspaces and standard projects. - Use Case: When reviewing a pull request or starting a new module, activate this Skill to validate naming, detect code smells like deep nesting and magic numbers, and confirm Prettier passes before committing. ## Quick Start Review this TypeScript file against the coding standards and fix any naming, formatting, or code smell issues.

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 in a TypeScript project?

Apply naming conventions like verb-noun function names and descriptive variables, organize files by feature directories, and run prettier --check after every change. Use the provided good/bad code examples as review criteria.

What are React component best practices for TypeScript?

Define a typed props interface, use functional components with destructured props and default values, and memoize expensive computations with useMemo and callbacks with useCallback. Avoid untyped props and nested ternary rendering.

How do I run Prettier in a monorepo workspace?

Use npx -w <workspace-name> prettier --check . to target a specific workspace. First check package.json for a format:check script, then fall back to npx prettier --check . in the project root.

What code smells should I look for during code review?

Watch for functions over 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 like MAX_RETRIES.

When should I write comments in code?

Comment only to explain why, not what the code does, such as documenting a deliberate performance tradeoff. Use JSDoc with param, returns, and example tags for public APIs, and skip comments that restate obvious operations.