원클릭으로
coding-standards
Universal coding standards - naming, formatting, error handling, immutability, SOLID principles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Universal coding standards - naming, formatting, error handling, immutability, SOLID principles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
OpenAI Codex CLI + Claude Code (Hizir) birlikte kullanim rehberi. Is dagitim pattern'leri, GitHub Actions workflow ornekleri, review dongusu ve iki AI yazilim asistaninin guclu yanlarini birlestiren orchestration stratejileri.
Create handoff document for transferring work to another session
Otonom deney dongusu. Kod degisikligi yap, olc, karsilastir, kabul et veya geri al. Metrik bazli karar verme ile performans, boyut veya kalite optimizasyonu. Tek basina veya agent ile kullan.
Planning agent that creates implementation plans and handoffs from conversation context
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
Pre-push API key and credential scanner - blocks git push if secrets found
| name | coding-standards |
| description | Universal coding standards - naming, formatting, error handling, immutability, SOLID principles |
| Tip | Format | Ornek |
|---|---|---|
| Variable | camelCase | userName, itemCount |
| Function | camelCase, verb-first | getUserById, calculateTotal |
| Class/Type | PascalCase | UserService, OrderItem |
| Constant | UPPER_SNAKE | MAX_RETRIES, API_URL |
| File | kebab-case | user-service.ts, order-item.ts |
| Boolean | is/has/should prefix | isActive, hasPermission |
// YANLIS: Mutate
user.name = newName;
items.push(newItem);
// DOGRU: Yeni obje
const updated = { ...user, name: newName };
const newItems = [...items, newItem];
// Custom error class
class AppError extends Error {
constructor(public code: string, message: string, public statusCode = 500) {
super(message);
}
}
// Try-catch with specific errors
try {
const result = await riskyOperation();
return result;
} catch (error) {
if (error instanceof ValidationError) {
throw new AppError('VALIDATION', error.message, 400);
}
throw new AppError('INTERNAL', 'Unexpected error', 500);
}
// YANLIS: Deep nesting
function process(user) {
if (user) {
if (user.isActive) {
if (user.hasPermission) {
return doWork(user);
}
}
}
}
// DOGRU: Early return
function process(user) {
if (!user) return null;
if (!user.isActive) return null;
if (!user.hasPermission) return null;
return doWork(user);
}
| Prensip | Kural |
|---|---|
| S - Single Responsibility | Her sinif/fonksiyon tek is |
| O - Open/Closed | Extension'a acik, modification'a kapali |
| L - Liskov Substitution | Alt tip, ust tipin yerine gecebilmeli |
| I - Interface Segregation | Kucuk, specific interface'ler |
| D - Dependency Inversion | Abstraction'a baglan, concrete'e degil |
Exception fırlatmak yerine explicit error dondur. Ozellikle API katmaninda, service'lerde ve veri islemede kullan.
// Result type tanimi
type Result<T, E = Error> =
| { ok: true; value: T }
| { ok: false; error: E };
// Kullanim
function parseConfig(raw: string): Result<Config, ValidationError> {
try {
const parsed = JSON.parse(raw);
if (!isValidConfig(parsed)) {
return { ok: false, error: new ValidationError('Invalid config shape') };
}
return { ok: true, value: parsed as Config };
} catch {
return { ok: false, error: new ValidationError('Invalid JSON') };
}
}
// Tuketim
const result = parseConfig(input);
if (!result.ok) {
logger.warn('Config parse failed', { error: result.error.message });
return fallbackConfig;
}
const config = result.value;
Ne zaman kullan: Service layer, parser, validator, external API cagrisi Ne zaman kullanma: Basit utility, internal fonksiyon (try/catch yeterli)
// YANLIS: Ne yaptigini anlatiyor (gereksiz)
// Kullanici adini buyuk harfe cevir
const name = user.name.toUpperCase();
// DOGRU: Neden yapildigini anlatiyor
// Legacy API buyuk harf bekliyor, v3'te kaldirilacak
const name = user.name.toUpperCase();
| Durum | Tercih | Neden |
|---|---|---|
| Exported fonksiyon | function declaration | Hoisted, debug stack trace'de gorunur |
| React component | function declaration | Tutarlilik, DevTools'da isim gorunur |
| Callback, inline | Arrow => | Kisa, this binding yok |
| Method | Arrow (class field) | this binding garantili |
// DOGRU: Exported fonksiyon
export function calculateTotal(items: Item[]): number {
return items.reduce((sum, item) => sum + item.price, 0);
}
// DOGRU: Callback
const filtered = items.filter(item => item.active);
| Anti-Pattern | Cozum |
|---|---|
| Magic number | Named constant kullan |
| God class/function | Parcala, tek sorumluluk |
| console.log debug | Logger kullan, commit etme |
| Hardcoded values | Config/env variable |
| Any type | Specific type tanimla |