coding-standards
하는 일
이 스킬은 TypeScript, JavaScript, React, Node.js 프로젝트를 위한 일반적인 코딩 기준을 정리합니다. 명확한 이름 짓기, 단순한 해결책, 반복되는 코드 피하기 같은 내용입니다. 일관되고 읽기 쉬운 코드를 원하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓새 TypeScript나 JavaScript 코드를 작성하면서 명확하고 일관되게 만들고 싶을 때.
- ✓가독성, 이름 짓기, 불필요한 복잡성을 기준으로 코드를 검토할 때.
- ✓프로젝트가 커지면서 React나 Node.js 프로젝트를 깔끔하게 유지하고 싶을 때.
스킬 링크
https://github.com/WorldFlowAI/everything-claude-code/blob/main/skills/coding-standards/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 TypeScript 모듈을 이름 짓기, 복잡성, 반복되는 코드 측면에서 검토하고 더 명확한 버전을 제안해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 설명이 드러나는 이름, 과한 설계 피하기, 공통 로직 분리 같은 간단한 규칙에 비추어 코드를 확인하고, 읽기 쉬운 개선안을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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} />}
//
자주 묻는 질문
포매터나 린터를 실행하나요?
아니요. 일관된 서식 같은 원칙을 설명합니다. 에이전트는 코드를 검토하거나 작성할 때 이 원칙을 적용합니다.
Python이나 Go도 다루나요?
아니요. TypeScript, JavaScript, React, Node.js에 집중합니다.
영리한 코드를 선호하나요?
아니요. 단순하고 읽기 쉬운 코드를 선호하며, 추측에 근거한 기능은 피합니다.
상세 정보
작성자의 원본 설명
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
인기도
- GitHub 스타
- 5.8k
- 순위
- #14661
- 라이선스
- —
- 업데이트
- 2026. 1. 23.
댓글
- …
이 저장소의 다른 스킬
continuous-learning
5.8k에이전트가 끝난 Claude Code 세션을 검토하고, 오류 해결이나 우회 방법 같은 유용한 패턴을 나중에 쓸 스킬로 저장하도록 돕습니다.
frontend-patterns
5.8k에이전트에게 컴포넌트, 상태, 성능, 깔끔한 UI 코드를 위한 검증된 React와 Next.js 패턴을 명확한 예시와 함께 제공합니다.
tdd-workflow
5.8k에이전트가 새 기능, 버그 수정, 리팩터링에서 테스트를 먼저 작성하도록 가르치며, 단위, 통합, 엔드투엔드 테스트로 80% 이상 커버리지를 목표로 합니다.