
Coding Standards
- 1 installs
- Updated April 28, 2026
- agentkollektivet/magentic
coding-standards is a Claude Code skill documenting universal coding standards and best practices for TypeScript, JavaScript, React and Node.js.
About
coding-standards is a Claude Code skill that documents universal coding standards and best practices for TypeScript, JavaScript, React and Node.js. It covers naming conventions, immutability, error handling, async patterns, type safety, input validation, file organization, and common code smells. A developer uses it as a shared quality foundation and pre-completion checklist to keep code readable and maintainable.
- Universal coding standards for TypeScript, JavaScript, React and Node.js
- Covers naming, immutability, error handling, type safety and file organization
- Ends with a 9-item pre-completion quality checklist
Coding Standards by the numbers
- 1 all-time installs (skills.sh)
- Ranked #984 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
- Data as of Jul 7, 2026 (Skillselion catalog sync)
coding-standards capabilities & compatibility
- Capabilities
- code standards · code quality · code review · best practices
- Use cases
- code review · refactoring
- Pricing
- Free
What coding-standards says it does
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js. Covers naming, immutability, error handling, file organization, and code quality.
Always create new objects, never mutate:
Code quality is not negotiable. Clear, maintainable code enables rapid development and confident refactoring.
npx skills add https://github.com/agentkollektivet/magentic --skill coding-standardsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| Last updated | April 28, 2026 |
| Repository | agentkollektivet/magentic ↗ |
What it does
Apply universal TypeScript, JavaScript, React and Node.js coding standards and a quality checklist.
Who is it for?
Applying a consistent quality baseline for naming, immutability, error handling and type safety across TS/JS projects.
Skip if: Language-specific guidance outside TypeScript, JavaScript, React and Node.js, which it does not cover.
When should I use this skill?
Writing or reviewing TypeScript, JavaScript, React or Node.js code that should follow shared quality standards.
What you get
Code follows consistent standards and passes a pre-completion quality checklist before it is marked done.
By the numbers
- 4 core principles: readability, KISS, DRY, YAGNI
- 9-item quality checklist before marking work complete
Files
Coding Standards
Universal coding standards applicable across all projects. This is the shared foundation that all other skills build upon.
Core Principles
1. Readability First
Code is read more than written. Clear variable names, self-documenting code, consistent formatting.
2. KISS — Keep It Simple
Simplest solution that works. No premature optimization. Easy to understand beats clever.
3. DRY — Don't Repeat Yourself
Extract common logic into functions. Share utilities. Avoid copy-paste.
4. YAGNI — You Aren't Gonna Need It
Don't build features before they're needed. Start simple, refactor when required.
Naming Conventions
Variables
// GOOD: Descriptive names
const searchQuery = 'election'
const isAuthenticated = true
const totalRevenue = 1000
// BAD: Unclear names
const q = 'election'
const flag = true
const x = 1000Functions
// GOOD: Verb-noun pattern
async function fetchUserData(userId: string) { }
function calculateSimilarity(a: number[], b: number[]) { }
function isValidEmail(email: string): boolean { }
// BAD: Unclear or noun-only
async function user(id: string) { }
function similarity(a, b) { }Immutability (CRITICAL)
Always create new objects, never mutate:
// GOOD: Spread operator
const updatedUser = { ...user, name: 'New Name' }
const updatedArray = [...items, newItem]
const withoutItem = items.filter(i => i.id !== removeId)
// BAD: Direct mutation
user.name = 'New Name'
items.push(newItem)Error Handling
// GOOD: Comprehensive error handling
async function fetchData(url: string) {
try {
const response = await fetch(url)
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
}
return await response.json()
} catch (error) {
console.error('Fetch failed:', error)
throw new Error('Failed to fetch data')
}
}
// BAD: No error handling
async function fetchData(url) {
const response = await fetch(url)
return response.json()
}Async Best Practices
// GOOD: Parallel execution when independent
const [users, items, stats] = await Promise.all([
fetchUsers(),
fetchItems(),
fetchStats()
])
// BAD: Sequential when unnecessary
const users = await fetchUsers()
const items = await fetchItems()
const stats = await fetchStats()Type Safety
// GOOD: Proper types
interface User {
id: string
name: string
role: 'admin' | 'user'
createdAt: Date
}
function getUser(id: string): Promise<User> { }
// BAD: Using 'any'
function getUser(id: any): Promise<any> { }Input Validation
import { z } from 'zod'
const UserSchema = z.object({
email: z.string().email(),
name: z.string().min(1).max(100),
age: z.number().int().min(0).max(150)
})
const validated = UserSchema.parse(input)File Organization
Structure
- High cohesion, low coupling
- 200-400 lines typical, 800 max
- Organize by feature/domain, not by type
- Many small files over few large files
Naming
components/Button.tsx # PascalCase for components
hooks/useAuth.ts # camelCase with 'use' prefix
lib/formatDate.ts # camelCase for utilities
types/user.types.ts # camelCase with .types suffixCode Smells
Long Functions
// BAD: >50 lines
function processData() { /* 100 lines */ }
// GOOD: Split into focused functions
function processData() {
const validated = validateData()
const transformed = transformData(validated)
return saveData(transformed)
}Deep Nesting
// BAD: 5+ levels deep
if (user) {
if (user.isAdmin) {
if (item) {
// ...
}
}
}
// GOOD: Early returns
if (!user) return
if (!user.isAdmin) return
if (!item) return
// proceedMagic Numbers
// BAD
if (retryCount > 3) { }
setTimeout(cb, 500)
// GOOD
const MAX_RETRIES = 3
const DEBOUNCE_MS = 500
if (retryCount > MAX_RETRIES) { }
setTimeout(cb, DEBOUNCE_MS)Comments
// GOOD: Explain WHY, not WHAT
// Use exponential backoff to avoid overwhelming the API during outages
const delay = Math.min(1000 * Math.pow(2, retryCount), 30000)
// BAD: Stating the obvious
// Increment counter by 1
count++API Response Format
interface ApiResponse<T> {
success: boolean
data?: T
error?: string
meta?: {
total: number
page: number
limit: number
}
}Quality Checklist
Before marking work complete:
- [ ] Code is readable and well-named
- [ ] Functions are small (<50 lines)
- [ ] Files are focused (<800 lines)
- [ ] No deep nesting (>4 levels)
- [ ] Proper error handling
- [ ] No logging sensitive data
- [ ] No hardcoded values
- [ ] Immutable patterns used
- [ ] Types are specific (no
any)
Code quality is not negotiable. Clear, maintainable code enables rapid development and confident refactoring.