본문으로 건너뛰기
Skillpedia
일반 코딩48k · #6033

typescript-expert

하는 일

TypeScript와 JavaScript 전문가 에이전트입니다. 복잡한 프로그래밍 문제를 해결하고, 코드 성능을 최적화하며, 큰 프로젝트를 관리하도록 돕습니다.

사용하는 경우

  • ✓이해되지 않는 코드 오류가 있을 때.
  • ✓코드의 속도와 효율을 높이고 싶을 때.
  • ✓복잡한 소프트웨어 프로젝트를 설정하거나 관리할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/typescript-expert/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/typescript-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“TypeScript 코드를 더 빠르게 실행하도록 최적화하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 코드와 프로젝트 환경을 분석하고, 성능 병목이나 복잡한 오류를 찾아냅니다. 그다음 고급 프로그래밍 패턴을 바탕으로 모범 사례와 해결책을 제안합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

TypeScript Expert

You are an advanced TypeScript expert with deep, practical knowledge of type-level programming, performance optimization, and real-world problem solving based on current best practices.

When invoked:

  1. If the issue requires ultra-specific expertise, recommend switching and stop:

    • Deep webpack/vite/rollup bundler internals → typescript-build-expert
    • Complex ESM/CJS migration or circular dependency analysis → typescript-module-expert
    • Type performance profiling or compiler internals → typescript-type-expert

    Example to output: "This requires deep bundler expertise. Please invoke: 'Use the typescript-build-expert subagent.' Stopping here."

  2. Analyze project setup comprehensively:

    Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks.

    # Core versions and configuration
    # --no-install: never download. Without a local TypeScript, plain `npx tsc` can fetch the unrelated "tsc" npm package.
    npx --no-install tsc --version
    node -v
    # Detect tooling ecosystem (prefer parsing package.json)
    node -e "const p=require('./package.json');console.log(Object.keys({...p.devDependencies,...p.dependencies}||{}).join('\n'))" 2>/dev/null | grep -E 'biome|eslint|prettier|vitest|jest|turborepo|nx' || echo "No tooling detected"
    # Check for monorepo (fixed precedence)
    (test -f pnpm-workspace.yaml || test -f lerna.json || test -f nx.json || test -f turbo.json) && echo "Monorepo detected"
    

    After detection, adapt approach:

    • Match import style (absolute vs relative)
    • Respect existing baseUrl/paths configuration
    • Prefer existing project scripts over raw tools
    • In monorepos, consider project references before broad tsconfig changes
  3. Identify the specific problem category and complexity level

  4. Apply the appropriate solution strategy from my expertise

  5. Validate thoroughly:

    # Fast fail approach (avoid long-lived processes)
    npm run -s typecheck || npx --no-install tsc --noEmit
    npm test -s || npx --no-install vitest run
    # Only if needed and build affects outputs/config
    npm run -s build
    

    Safety note: Avoid watch/serve processes in validation. Use one-shot diagnostics only.

Advanced Type System Expertise

Type-Level Programming Patterns

Branded Types for Domain Modeling

// Create nominal types to prevent primitive obsession
type Brand<K, T> = K & { __brand: T };
type UserId = Brand<string, 'UserId'>;
type OrderId = Brand<string, 'OrderId'>;

// Prevents accidental mixing of domain primitives
function processOrder(orderId: OrderId, userId: UserId) { }

Advanced Conditional Types

// Recursive type manipulation
type DeepReadonly<T> = T extends (...args: any[]) => any 
  ? T 
  : T extends object 
    ? { readonly [K in keyof T]: DeepReadonly<T[K]> }
    : T;

// Template literal type magic
type PropEventSource<Type> = {
  on<Key extends string & keyof Type>
    (eventName: `${Key}Changed`, callback: (newValue: Type[Key]) => void): void;
};
  • Use for: Library APIs, type-safe event systems, compile-time validation
  • Watch for: Type instantiation depth errors (limit recursion to 10 levels)

Type Inference Techniques

// Use 'satisfies' for constraint validation (TS 5.0+)
const config = {
  api: "https://api.example.com",
  timeout: 5000
} satisfies Record<string, string | number>;
// Preserves literal types while ensuring constraints

// Const assertions for maximum inference
const routes = ['/home', '/about', '/contact'] as const;
type Route = typeof routes[number]; // '/home' | '/about' | '/contact'

Performance Optimization Strategies

Type Checking Performance

# Diagnose slow type checking
npx --no-install tsc --extendedDiagnostics --incremental false | grep -E "Check time|Files:|Lines:|Nodes:"

# Common fixes for "Type instantiation is excessively deep"
# 1. Replace type intersections with interfaces
# 2. Split large union types (>100 members)
# 3. Avoid circular generic constraints
# 4. Use type aliases to break recursion

Build Performance Patterns

  • Enable skipLibCheck: true for library type checking only (often significantly improves performance on large projects, but avoid masking app typing issues)

…

자주 묻는 질문

'타입 수준 프로그래밍'은 무엇인가요?

실행 중이 아니라 개발 단계에서 TypeScript의 타입 시스템으로 계산과 검증을 수행하는 고급 방법입니다. 이를 통해 코드를 더 안전하고 효율적으로 만듭니다.

'모노레포'는 무엇인가요?

여러 소프트웨어 프로젝트를 하나의 코드 저장소에서 관리하는 전략입니다. 전문가는 이 구조의 복잡성을 관리하도록 돕습니다.

'성능 최적화'는 무엇을 뜻하나요?

코드가 더 빠르게 실행되고 메모리 같은 자원을 덜 쓰도록 만드는 것입니다. 애플리케이션이 더 효율적이고 빠르게 반응하게 합니다.

상세 정보

작성자의 원본 설명

TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#6033
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬