---
context: fork
name: lang-reference
description: |
  프로그래밍 언어 패턴 참조 허브 — C++, C#, Elixir, Flutter/Dart, Go, Java, JavaScript, Kotlin, PHP, Python, R, Ruby, Rust, Scala, Swift, TypeScript 16개 언어의 모던 패턴·프레임워크 베스트 프랙티스·테스트 이디엄·안티패턴을 통합 제공.
  Auto-activates when: 위 언어의 소스 파일을 다루거나, 해당 언어의 프레임워크 이름(FastAPI, Spring Boot, Phoenix, Laravel, Rails, SwiftUI, Axum, Gin, Echo, Fiber, Ktor, Vapor, Next.js, Remix, Astro, Flutter, Django, Shiny, Cats Effect, ZIO, Akka, Spark, Ktor, Blazor, Quarkus, Compose 등)이 언급되거나, 빌드 도구(CMake, Cargo, Maven, Gradle, SBT, Composer, NuGet, uv, poetry, Bundler, Mix, pubspec, Bun, Deno)·타입 시스템·동시성 패턴 질문이 감지될 때.
  Triggers: c++, C++, cpp, .cpp, .hpp, .h, cmake, smart pointer, RAII, concepts, ranges, constexpr, move semantics, csharp, C#, .cs, .csproj, dotnet, .NET, asp.net, blazor, entity framework, LINQ, minimal api, pattern matching, nuget, elixir, Elixir, .ex, .exs, phoenix, liveview, ecto, genserver, otp, mix, supervisor, erlang, beam, flutter, Flutter, dart, Dart, .dart, riverpod, go_router, material 3, widget, pubspec, freezed, bloc, cross-platform, go, golang, Go, .go, goroutine, channel, interface, error handling, go modules, Echo, Fiber, Gin, table-driven test, java, Java, .java, generics, streams, records, sealed classes, Spring Boot, Quarkus, JUnit 5, Mockito, Maven, Gradle, javascript, JavaScript, .js, .mjs, .cjs, node.js, bun, deno, ESM, vitest, express, async/await, ES2024, kotlin, Kotlin, .kt, .kts, coroutines, ktor, compose multiplatform, sealed class, data class, spring boot kotlin, gradle kotlin, jetpack compose, php, PHP, .php, laravel, symfony, eloquent, composer, artisan, blade, doctrine, pest, phpstan, python, Python, .py, type hints, dataclass, asyncio, pydantic, FastAPI, Django, pytest, poetry, uv, venv, r language, R language, .R, .Rmd, tidyverse, ggplot2, dplyr, shiny, quarto, pipe operator, tibble, data.frame, CRAN, ruby, Ruby, .rb, rails, activerecord, hotwire, turbo, rspec, bundler, Gemfile, ractor, sidekiq, rust, Rust, .rs, ownership, borrow, lifetime, trait, enum, Result, Option, cargo, Axum, Actix, tokio, scala, Scala, .scala, .sc, akka, cats effect, zio, spark, sbt, given, opaque type, case class, play framework, swift, Swift, .swift, swiftui, combine, actor, xcode, ios, macos, vapor, swift package, typescript, TypeScript, .ts, .tsx, strict mode, utility types, discriminated union, branded types, tsconfig, type safety, type alias
lang: [en, ko]
platforms: [claude-code, gemini-cli, codex-cli, cursor]
level: 2
triggers:
  - "c++"
  - "cpp"
  - ".cpp"
  - ".hpp"
  - ".h"
  - "cmake"
  - "smart pointer"
  - "RAII"
  - "concepts"
  - "ranges"
  - "constexpr"
  - "move semantics"
  - "csharp"
  - "C#"
  - ".cs"
  - ".csproj"
  - "dotnet"
  - ".NET"
  - "asp.net"
  - "blazor"
  - "entity framework"
  - "LINQ"
  - "minimal api"
  - "pattern matching"
  - "nuget"
  - "elixir"
  - ".ex"
  - ".exs"
  - "phoenix"
  - "liveview"
  - "ecto"
  - "genserver"
  - "otp"
  - "mix"
  - "supervisor"
  - "erlang"
  - "beam"
  - "flutter"
  - "dart"
  - ".dart"
  - "riverpod"
  - "go_router"
  - "material 3"
  - "widget"
  - "pubspec"
  - "freezed"
  - "bloc"
  - "cross-platform"
  - "golang"
  - ".go"
  - "goroutine"
  - "channel"
  - "interface"
  - "error handling"
  - "go modules"
  - "Echo"
  - "Fiber"
  - "Gin"
  - "table-driven test"
  - "java"
  - ".java"
  - "generics"
  - "streams"
  - "records"
  - "sealed classes"
  - "Spring Boot"
  - "Quarkus"
  - "JUnit 5"
  - "Mockito"
  - "Maven"
  - "Gradle"
  - "javascript"
  - ".js"
  - ".mjs"
  - ".cjs"
  - "node.js"
  - "bun"
  - "deno"
  - "ESM"
  - "vitest"
  - "express"
  - "async/await"
  - "ES2024"
  - "kotlin"
  - ".kt"
  - ".kts"
  - "coroutines"
  - "ktor"
  - "compose multiplatform"
  - "sealed class"
  - "data class"
  - "spring boot kotlin"
  - "gradle kotlin"
  - "jetpack compose"
  - "php"
  - ".php"
  - "laravel"
  - "symfony"
  - "eloquent"
  - "composer"
  - "artisan"
  - "blade"
  - "doctrine"
  - "pest"
  - "phpstan"
  - "python"
  - ".py"
  - "type hints"
  - "dataclass"
  - "asyncio"
  - "pydantic"
  - "FastAPI"
  - "Django"
  - "pytest"
  - "poetry"
  - "uv"
  - "venv"
  - "r language"
  - ".R"
  - ".Rmd"
  - "tidyverse"
  - "ggplot2"
  - "dplyr"
  - "shiny"
  - "quarto"
  - "pipe operator"
  - "tibble"
  - "data.frame"
  - "CRAN"
  - "ruby"
  - ".rb"
  - "rails"
  - "activerecord"
  - "hotwire"
  - "turbo"
  - "rspec"
  - "bundler"
  - "Gemfile"
  - "ractor"
  - "sidekiq"
  - "rust"
  - ".rs"
  - "ownership"
  - "borrow"
  - "lifetime"
  - "trait"
  - "enum"
  - "Result"
  - "Option"
  - "cargo"
  - "Axum"
  - "Actix"
  - "tokio"
  - "scala"
  - ".scala"
  - ".sc"
  - "akka"
  - "cats effect"
  - "zio"
  - "spark"
  - "sbt"
  - "given"
  - "opaque type"
  - "case class"
  - "play framework"
  - "swift"
  - ".swift"
  - "swiftui"
  - "combine"
  - "actor"
  - "xcode"
  - "ios"
  - "macos"
  - "vapor"
  - "swift package"
  - "typescript"
  - ".ts"
  - ".tsx"
  - "strict mode"
  - "utility types"
  - "discriminated union"
  - "branded types"
  - "tsconfig"
  - "type safety"
  - "type alias"
agents:
  - "backend-developer"
  - "frontend-developer"
  - "performance-engineer"
  - "tdd-guide"
  - "architect"
  - "typescript-pro"
tokens: "~4K"
category: "language"
whenNotToUse: "Architecture decisions, infrastructure configuration, or non-language-specific tasks where language idiom patterns and framework conventions are not the subject."
level1_tokens: 200
level2_tokens: 1200
platforms: [claude-code, gemini-cli, codex-cli, cursor]
---

# Language Patterns Reference Hub

통합된 언어별 패턴 참조 허브. 본 스킬은 16개 언어의 모던 패턴·프레임워크·테스트·안티패턴을 하나의 auto-activation 엔트리포인트로 제공하고, 언어별 상세는 `references/{언어명}.md` 로 위임합니다.

## Contents
- [When This Skill Applies](#when-this-skill-applies)
- [Language Reference Index](#language-reference-index)
- [Routing Rule](#routing-rule)
- [Shared Anti-Patterns](#shared-anti-patterns)

## When This Skill Applies

- 아래 16개 언어 중 하나의 소스 파일(확장자 기반) 또는 프레임워크 이름이 감지될 때
- 해당 언어의 타입 시스템·동시성·에러 처리·빌드 도구 관련 질문
- 해당 언어의 테스트 이디엄(pytest / Vitest / JUnit / Kotest / RSpec / Pest / MUnit / Kotest / testthat / cargo test + proptest / Swift Testing / ExUnit / mocktail / GoogleTest)

## Language Reference Index

| 언어 | 키워드/확장자 | 상세 참조 |
|------|---------------|-----------|
| **C++** | `.cpp`, `.hpp`, cmake, RAII, concepts, ranges | [references/cpp.md](references/cpp.md) |
| **C#** | `.cs`, `.csproj`, .NET, ASP.NET, Blazor, LINQ | [references/csharp.md](references/csharp.md) |
| **Elixir** | `.ex`, `.exs`, Phoenix, LiveView, OTP, GenServer | [references/elixir.md](references/elixir.md) |
| **Flutter/Dart** | `.dart`, Flutter, Riverpod, go_router, Material 3 | [references/flutter.md](references/flutter.md) |
| **Go** | `.go`, goroutine, Echo, Fiber, Gin, errgroup | [references/go.md](references/go.md) |
| **Java** | `.java`, Spring Boot, Quarkus, records, JUnit 5 | [references/java.md](references/java.md) |
| **JavaScript** | `.js`, `.mjs`, Node.js 22, Bun, Deno 2, Vitest | [references/javascript.md](references/javascript.md) |
| **Kotlin** | `.kt`, `.kts`, Coroutines, Ktor, Compose Multiplatform | [references/kotlin.md](references/kotlin.md) |
| **PHP** | `.php`, Laravel 11, Symfony 7, Pest, PHPStan | [references/php.md](references/php.md) |
| **Python** | `.py`, FastAPI, Django, asyncio, pytest, uv | [references/python.md](references/python.md) |
| **R** | `.R`, `.Rmd`, tidyverse, ggplot2, Shiny, Quarto | [references/r.md](references/r.md) |
| **Ruby** | `.rb`, Rails 7.2, Hotwire/Turbo, RSpec, Sidekiq | [references/ruby.md](references/ruby.md) |
| **Rust** | `.rs`, Tokio, Axum, Actix, thiserror | [references/rust.md](references/rust.md) |
| **Scala** | `.scala`, `.sc`, Cats Effect, ZIO, Akka, Spark | [references/scala.md](references/scala.md) |
| **Swift** | `.swift`, SwiftUI, async/await, actors, Vapor | [references/swift.md](references/swift.md) |
| **TypeScript** | `.ts`, `.tsx`, Next.js, Astro, Remix, strict mode | [references/typescript.md](references/typescript.md) |

## Routing Rule

1. 사용자 입력 또는 현재 편집 파일에서 위 표의 키워드/확장자를 탐지합니다.
2. 매칭된 언어가 있다면 해당 `references/{언어}.md` 파일을 즉시 로드하여 상세 가이던스를 적용합니다.
3. 여러 언어가 동시 감지되는 경우(예: 폴리글랏 모노레포) 주 대상 파일의 언어를 우선하고, 필요 시 보조 언어 참조도 함께 로드합니다.

## Shared Anti-Patterns (공통)

모든 16개 언어에 걸쳐 반복되는 안티패턴 요약:

- **Null/undefined 누출**: `Option`/`Result`/`Either`/`Optional`/`null-safe` 패턴을 쓰지 않고 런타임 크래시 유발
- **동기 블로킹 in async**: Node.js, Python, Kotlin, Swift, Rust 등 async 런타임에서 blocking I/O 혼용
- **Mutable default/전역 상태**: 공유 가변 상태가 테스트·동시성을 오염
- **예외/에러의 과도한 rescue**: 모든 exception을 잡아먹는 방어적 rescue는 버그를 감춤 (Ruby `rescue Exception`, Python bare `except:`, JS 전역 try/catch 등)
- **타입 회피 (any/dynamic/mixed/Any/unchecked)**: 타입 시스템의 보장을 무효화
- **N+1 쿼리**: ActiveRecord, Eloquent, EF Core, Spring Data JPA, Django ORM 공통

## Rationalizations

공통 excuse → rebuttal:

| Excuse | Rebuttal |
|--------|----------|
| "이 언어는 내 본업이 아니라 빨리 끝내고 싶다" | 본업이 아닐수록 idiomatic 패턴을 따라야 리뷰어의 맥락 전환 비용이 적다. references/{lang}.md 를 먼저 열어라. |
| "타입/lint를 일단 끄고 돌려보자" | 타입/lint 비활성화는 CI에서 드러날 버그를 prod로 밀어낸다. 모든 언어 references는 strict 기본값을 전제로 작성됨. |
| "테스트는 나중에" | 각 언어 references 는 테스트 이디엄을 핵심 섹션으로 포함. pytest/Vitest/JUnit/cargo test/RSpec 없이 머지는 금지 패턴. |
| "프레임워크 베스트 프랙티스는 문서를 보면 된다" | 공식 문서는 최신 변경 반영이 느리다. 이 허브는 2026-Q1 기준 모던 이디엄(C++23, .NET 8, Rails 7.2, Phoenix 1.7, Swift 6, Rust edition 2024, TS strict+noUncheckedIndexedAccess)을 반영. |
