- Home
- Skills
- Affaan M
- Everything Claude Code
- Coding Standards
coding-standards_skill
- JavaScript
46.5k
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill affaan-m/everything-claude-code --skill coding-standards- SKILL.md11.4 KB
Overview
This skill captures universal coding standards and practical best practices for TypeScript, JavaScript, React, and Node.js development. It provides clear rules for naming, immutability, error handling, API design, testing, and project structure to improve readability and maintainability. Use it to enforce consistent conventions across teams and projects.
How this skill works
The skill inspects code and project setups against a set of battle-tested rules: naming conventions, immutability patterns, async/await usage, type safety, React component structure, API response formats, and testing patterns. It highlights anti-patterns (long functions, deep nesting, magic numbers), recommends fixes, and suggests configurations for linting, formatting, and type checking. It can be applied during project initialization, code review, refactors, or contributor onboarding.
When to use it
- Starting a new TypeScript/Node.js or React project
- During code reviews to enforce consistency and catch anti-patterns
- Refactoring modules to improve readability and reduce duplication
- When setting up linting, Prettier, or TypeScript config
- Onboarding new contributors to project conventions
Best practices
- Prioritize readability: clear names and self-documenting code over comments
- Favor immutability; avoid direct mutation of objects and arrays
- Use proper types and avoid any; validate inputs with schemas (e.g., Zod)
- Handle errors explicitly and return consistent API response shapes
- Keep functions small, prefer early returns, and extract shared logic to utilities
- Memoize expensive work, lazy-load heavy components, and select only needed DB columns
Example use cases
- Create a starter config enforcing naming, formatting, and type rules for a new repo
- Run a checklist during PR review: naming, immutability, error handling, tests, and API responses
- Refactor a legacy module: split long functions, remove deep nesting, and add type safety
- Design a REST API with consistent response envelope and validation using Zod
- Add React patterns: typed functional components, custom hooks, and lazy-loaded heavy components
FAQ
Apply standards pragmatically: be strict on readability, immutability, and type safety; be pragmatic on stylistic choices if the team agrees. Automate enforcement with linters and CI.
When is mutation acceptable?
Mutation is acceptable only when it is a deliberate performance optimization and clearly documented; prefer immutable patterns by default and isolate mutations with comments explaining why.