code-style

Enforce consistent coding conventions for JavaScript, TypeScript strict-mode, React 19, and Tailwind CSS.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/jjmendezrodriguez/jm-claude-plugin --skill code-style-jjmendezrodriguez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-style
Source: https://github.com/jjmendezrodriguez/jm-claude-plugin/tree/main/skills/code-style
Command: npx skills add https://github.com/jjmendezrodriguez/jm-claude-plugin --skill code-style-jjmendezrodriguez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents style drift and inconsistent patterns across a codebase by enforcing a shared standard for naming, TypeScript strictness, React structure, and Tailwind class organization.

Core Features & Use Cases

  • Readable-by-default conventions: Descriptive English naming, linear flow (Validate → Process → Return), and shallow nesting limits to keep code reviewable at scale.
  • TypeScript strict-mode guardrails: No any, safe error handling with discriminated unions, explicit return types for public APIs, and preference for type and exhaustive narrowing.
  • React + Tailwind structure rules: Keep components focused on UI, move logic into custom hooks, co-locate related files, and use cn() to keep conditional Tailwind classes readable.
  • Documentation and review checklist: JSDoc requirements for exported functions and a pre-PR checklist to reduce regressions and missed conventions.

Quick Start

Use the code-style skill to review or refactor the file you are working on so it matches the project’s naming, strict TypeScript, React separation-of-concerns, and Tailwind cn() patterns.

Frequently Asked Questions about code-style

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

FAQPage Schema
What's the best way to enforce consistent coding conventions across React and TypeScript strict-mode projects?

To enforce consistent coding conventions, apply a structured style guide requiring linear flow, shallow nesting, discriminated unions over optional fields, and JSDoc on exported APIs. This prevents style drift and keeps React and TypeScript code readable at scale.

How do I organize conditional Tailwind CSS classes to improve readability during code reviews?

To organize conditional Tailwind CSS classes, use the cn() utility for combining class names. This keeps conditional Tailwind classes readable, simplifies PR code reviews, and prevents long disorganized strings in JSX components.

Does this code review approach work for refactoring React 19 components and separating business logic?

Yes, this code review approach works for refactoring React 19 components by keeping components focused on UI and moving logic into custom hooks. This separation of concerns maintains readability during greenfield development and refactors.

Why should I use discriminated unions instead of optional fields in TypeScript strict mode?

You should use discriminated unions instead of optional fields in TypeScript strict mode to ensure safe error handling and exhaustive narrowing. This strategy prevents runtime errors by explicitly defining valid state shapes rather than relying on loosely typed optional properties.

What are the limitations of applying strict naming conventions and JSDoc requirements to an existing JavaScript codebase?

The limitation of applying strict naming conventions and JSDoc requirements to an existing JavaScript codebase is the heavy refactor overhead. You must add explicit return types for public APIs and JSDoc on all exported functions, which can slow down rapid PR reviews on legacy code.