All skills
siberiacancode avatar

/juniors-best-practice

@913a865

Juniors-focused React and TypeScript best practices. Use this skill when writing or reviewing code to enforce clear, consistent, and maintainable patterns across common scopes like React, TypeScript, styling, devtools, assets, and Git.

Use this Skill: https://skilld.dev/gh/siberiacancode/agent-skills/juniors-best-practice

This session only. Nothing lands on disk.

AGENTS.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Juniors Best Practice

Version 1.0.0
siberiacancode
February 2026

Note:
This document is optimized for agents and LLMs working on junior-friendly React and TypeScript codebases. It emphasizes clarity, consistency, and practical guidance.


Abstract

Juniors-focused best practices for React and TypeScript projects, organized by practical scopes (JS, React, styling, devtools, and more). Each guide includes concise guidance and examples that help early-career developers write clear, consistent, and maintainable code.


Table of Contents

  1. Beginner Foundations

  2. TypeScript

  3. React

  4. Styling

  5. Devtools

  6. Assets

  7. Git

  8. REST


1. Beginner Foundations

1.1 Early return

Use early returns to reduce nesting and keep control flow easy to read.

1.2 Avoid double negation

Prefer positive names to avoid confusing !isNotX conditions.

1.3 Avoid unnecessary destructuring

Avoid destructuring when it hurts clarity or creates renaming noise.

1.4 const vs let

Default to const and use let only for real mutation.

1.5 Nullish vs OR (?? vs ||)

Prefer ?? when falsy values like 0 or false are valid.

1.6 Avoid unnecessary return in arrow functions

Keep arrow functions concise by removing redundant return.

1.7 Uppercase constants

Use UPPER_CASE only for stable, application-level constants.

2. TypeScript

2.1 TypeScript path alias naming

Use aliases that avoid collisions with external packages.

2.2 Flat translation keys

Prefer flat translation keys to avoid deep nesting, reduce duplication, and simplify lookup in locale files.

3. React

3.1 React string props

Use string literals directly when no expression is needed.

3.2 Children prop

Use children for flexible composition and typing clarity.

3.3 Scalable components

Extend native element props to keep components flexible.

3.4 Props typing

Keep prop types nearby and readable.

4. Styling

4.1 Classnames helper

Use a helper like clsx for conditional class names.

4.2 CSS selectors for component states

Prefer CSS selectors for hover/disabled/focus styling.

5. Devtools

5.1 Formatter and linter

Use formatters and linters to keep code consistent.

5.2 Sorting imports

Keep imports ordered and grouped for readability.

5.3 Single package manager

Use one package manager and a single lock file.

6. Assets

6.1 SVG assets

Use SVGs as components for scalable, themeable icons.

7. Git

7.1 Commit conventions

Use a consistent commit message format across the team.

8. REST

8.1 REST scalability via abstractions

Separate transport logic from endpoint definitions so API clients stay reusable and scalable.

8.2 REST naming from OpenAPI

Keep model and operation naming aligned with OpenAPI (operationId and schema names) to avoid duplicate contracts.

Source: SKILL.md on GitHub

1 warning16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a comprehensive set of best practices for junior React and TypeScript developers. It includes guidelines on coding style, state management, and tooling, referencing both well-known community packages and libraries maintained by the author. No security risks or malicious behaviors were identified.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    25/25 files flagged

Signed by skilld at 913a865. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 6 months ago
metadata
{
  "author": "siberiacancode",
  "version": "1.0.0"
}

README badge

README badge for siberiacancode/agent-skills/juniors-best-practice