# Code With Best Practices

> This skill should be used when planning, writing, or reviewing code in TypeScript, JavaScript, Python, Go, Rust, SQL, or Bash, or when working with React, Node.js, Vitest, Playwright, Terraform, AWS CDK, pandas, NumPy, polars, marimo, or Jupyter notebooks. It applies to any implementation work in these stacks even when the user never says "best practices", and when the user says "add retries", "make this resilient", "handle upstream failures", "add timeouts", or "add a circuit breaker". It should not be used for API contract or database schema design (use spec) or UI visual design (use design).

- Skill: `brandonburrus/code-with-best-practices` (Agent Skill, multi-file: 20 files)
- Install (CLI): `npx skillmds@latest add brandonburrus/code-with-best-practices`
- Raw SKILL.md: https://api.skillmd.com/api/skills/brandonburrus/code-with-best-practices/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: brandonburrus (https://skillmd.com/u/brandonburrus)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/brandonburrus/code-with-best-practices

---


## Purpose

Consolidated entry point for language and framework best practices. Detect the stack in scope, then load only the reference files the task needs; the practices live in `references/` precisely so that unrelated stacks never consume context. Loading every reference defeats the design.

## Project discovery (always do first)

1. Detect frameworks and tooling from manifests and configs: `package.json` dependencies, `vitest.config.*`, `playwright.config.*`, `cdk.json`, `*.tf` files, `go.mod`, `Cargo.toml`, `pyproject.toml`.
2. Detect the language from the extensions of the files actually being touched.
3. Load references per the routing table below.

## Routing table

| Context | Load |
|---|---|
| React component or app work | [React](references/framework-react.md) + [TypeScript](references/language-typescript.md) or [JavaScript](references/language-javascript.md) by file type |
| Node.js service, CLI, or module work | [Node](references/framework-node.md) + [TypeScript](references/language-typescript.md) or [JavaScript](references/language-javascript.md) |
| Vitest unit or integration tests | [Vitest](references/framework-vitest.md) + [TypeScript](references/language-typescript.md) or [JavaScript](references/language-javascript.md) |
| Playwright E2E tests | [Playwright](references/framework-playwright.md) + [TypeScript](references/language-typescript.md) or [JavaScript](references/language-javascript.md) |
| AWS CDK infrastructure | [CDK](references/framework-cdk.md) + [TypeScript](references/language-typescript.md) |
| Terraform infrastructure | [Terraform](references/framework-terraform.md) |
| TypeScript, no framework match | [TypeScript](references/language-typescript.md) |
| JavaScript, no framework match | [JavaScript](references/language-javascript.md) |
| Python | [Python](references/language-python.md) |
| Go | [Go](references/language-go.md) |
| Rust | [Rust](references/language-rust.md) |
| SQL queries or migrations | [SQL](references/language-sql.md) |
| Bash or shell scripts | [Bash](references/language-bash.md) |
| pandas data work | [pandas](references/library-pandas.md) + [Python](references/language-python.md) |
| NumPy numerical code | [NumPy](references/library-numpy.md) + [Python](references/language-python.md) |
| polars data work | [polars](references/library-polars.md) + [Python](references/language-python.md) |
| marimo notebooks | [marimo](references/tool-marimo.md) + [Python](references/language-python.md) |
| Resilience and fault-tolerance work (retries, timeouts, idempotency, circuit breakers, fallbacks, queue consumers, health checks) | [Resilience](references/resilience.md) + the language reference for the files touched |
| Jupyter notebooks | [Jupyter](references/tool-jupyter.md) + [Python](references/language-python.md) |

## Loading rules

1. When a framework applies, load its framework reference first, then exactly one language reference for the files being edited.
2. For mixed-language changes, load one language reference per touched language.
3. Never load references "just in case"; an unloaded reference costs nothing, an unused loaded one crowds out the task.

## Precedence and boundaries

- On conflict, the project's own documented conventions win, then the global CLAUDE.md rules, then these references. A reference here never justifies diff noise in a codebase that does it differently.
- The SQL reference covers writing queries and migrations; designing tables, keys, and indexes belongs to the spec skill (schema reference).
- Endpoint and schema contracts belong to the spec skill (api reference); these references inform the implementation behind the contract.
- This skill informs how code is written, not the workflow around it: test-first discipline is follow-tdd, behavior-preserving cleanup is refactor, debugging is fix.

