coding-standards
What it does
This skill sets out general coding standards for TypeScript, JavaScript, React and Node.js projects, such as clear naming, simple solutions and avoiding repeated code. It is for developers who want consistent, readable code.
When to use it
- βWhen you write new TypeScript or JavaScript code and want it to be clear and consistent.
- βWhen you review code for readability, naming and unnecessary complexity.
- βWhen you want to keep a React or Node.js project tidy as it grows.
Skill link
https://github.com/WorldFlowAI/everything-claude-code/blob/main/skills/coding-standards/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βReview this TypeScript module for naming, complexity and repeated code, and suggest clearer versions.β
5 new skills a week. 1 minute to read.
How it works
The agent checks the code against simple rules, such as descriptive names, avoiding over-engineering and extracting shared logic, then suggests readable improvements.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Coding Standards & Best Practices
Universal coding standards applicable across all projects.
Code Quality Principles
1. Readability First
- Code is read more than written
- Clear variable and function names
- Self-documenting code preferred over comments
- Consistent formatting
2. KISS (Keep It Simple, Stupid)
- Simplest solution that works
- Avoid over-engineering
- No premature optimization
- Easy to understand > clever code
3. DRY (Don't Repeat Yourself)
- Extract common logic into functions
- Create reusable components
- Share utilities across modules
- Avoid copy-paste programming
4. YAGNI (You Aren't Gonna Need It)
- Don't build features before they're needed
- Avoid speculative generality
- Add complexity only when required
- Start simple, refactor when needed
TypeScript/JavaScript Standards
Variable Naming
// β
GOOD: Descriptive names
const marketSearchQuery = 'election'
const isUserAuthenticated = true
const totalRevenue = 1000
// β BAD: Unclear names
const q = 'election'
const flag = true
const x = 1000
Function Naming
// β
GOOD: Verb-noun pattern
async function fetchMarketData(marketId: string) { }
function calculateSimilarity(a: number[], b: number[]) { }
function isValidEmail(email: string): boolean { }
// β BAD: Unclear or noun-only
async function market(id: string) { }
function similarity(a, b) { }
function email(e) { }
Immutability Pattern (CRITICAL)
// β
ALWAYS use spread operator
const updatedUser = {
...user,
name: 'New Name'
}
const updatedArray = [...items, newItem]
// β NEVER mutate directly
user.name = 'New Name' // BAD
items.push(newItem) // BAD
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/Await Best Practices
// β
GOOD: Parallel execution when possible
const [users, markets, stats] = await Promise.all([
fetchUsers(),
fetchMarkets(),
fetchStats()
])
// β BAD: Sequential when unnecessary
const users = await fetchUsers()
const markets = await fetchMarkets()
const stats = await fetchStats()
Type Safety
// β
GOOD: Proper types
interface Market {
id: string
name: string
status: 'active' | 'resolved' | 'closed'
created_at: Date
}
function getMarket(id: string): Promise<Market> {
// Implementation
}
// β BAD: Using 'any'
function getMarket(id: any): Promise<any> {
// Implementation
}
React Best Practices
Component Structure
// β
GOOD: Functional component with types
interface ButtonProps {
children: React.ReactNode
onClick: () => void
disabled?: boolean
variant?: 'primary' | 'secondary'
}
export function Button({
children,
onClick,
disabled = false,
variant = 'primary'
}: ButtonProps) {
return (
<button
onClick={onClick}
disabled={disabled}
className={`btn btn-${variant}`}
>
{children}
</button>
)
}
// β BAD: No types, unclear structure
export function Button(props) {
return <button onClick={props.onClick}>{props.children}</button>
}
Custom Hooks
// β
GOOD: Reusable custom hook
export function useDebounce<T>(value: T, delay: number): T {
const [debouncedValue, setDebouncedValue] = useState<T>(value)
useEffect(() => {
const handler = setTimeout(() => {
setDebouncedValue(value)
}, delay)
return () => clearTimeout(handler)
}, [value, delay])
return debouncedValue
}
// Usage
const debouncedQuery = useDebounce(searchQuery, 500)
State Management
// β
GOOD: Proper state updates
const [count, setCount] = useState(0)
// Functional update for state based on previous state
setCount(prev => prev + 1)
// β BAD: Direct state reference
setCount(count + 1) // Can be stale in async scenarios
Conditional Rendering
// β
GOOD: Clear conditional rendering
{isLoading && <Spinner />}
{error && <ErrorMessage error={error} />}
{data && <DataDisplay data={data} />}
//
FAQ
Does it run a formatter or linter?
It describes the principles to follow, such as consistent formatting. The agent applies them when reviewing or writing code.
Does it cover Python or Go?
No. It focuses on TypeScript, JavaScript, React and Node.js.
Does it favor clever code?
No. It favors simple, readable code and avoids speculative features.
Details
Original description by the author
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
Popularity
- GitHub stars
- 5.8k
- Ranking position
- #14661
- License
- β
- Updated
- 1/23/2026
Comments
- β¦
More skills from this repository
continuous-learning
5.8kLets your agent review finished Claude Code sessions and save useful patterns, such as error fixes and workarounds, as skills for later use.
frontend-patterns
5.8kGives your agent proven React and Next.js patterns for components, state, performance and clean UI code, with clear examples to follow.
tdd-workflow
5.8kTeaches your agent to write tests first for new features, bug fixes and refactors, aiming for 80 percent or more coverage across unit, integration and end-to-end tests.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.