본문으로 건너뛰기
cccskills
무료GitHub에 공개

ls-typescript-code-quality

Guide TypeScript code quality work. Use when touching TypeScript, TSX, tsconfig, typed ESLint or Biome config, Node TypeScript scripts, or TypeScript-heavy framework code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md6.5 KB
  • references/typescript-quality-standards.md5.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

TypeScript Code Quality

Use this skill when reviewing or changing TypeScript projects, TSX UI code, TypeScript configuration, typed linting, Node TypeScript scripts, or frameworks whose behavior depends on TypeScript tooling.

Start With The Pinned Toolchain

Before recommending upgrades or changing compiler/linter settings, inspect the project's actual toolchain:

  • package.json: package manager, scripts, type, engines, framework packages, TypeScript, ESLint, typescript-eslint, Biome, build tools, and test runners.
  • Lockfile: confirm the installed versions rather than assuming the manifest was resolved recently.
  • TypeScript configs: tsconfig.json, project references, framework-specific configs, and separate lint/test/build configs.
  • Framework version: Next.js, Vite, Angular, SvelteKit, Remix, NestJS, or other toolchains may pin TypeScript, Node, module resolution, JSX, or build behavior.
  • Existing commands: prefer the repo's scripts (typecheck, lint, test, build) over ad hoc runner invocations.

Do not upgrade TypeScript, Node, framework packages, or lint presets just because a newer version exists. Treat framework and lockfile compatibility as the first constraint.

When a TypeScript project needs a Node runtime baseline, target the latest available production LTS line that the project's framework and deployment platform support. Prefer Active LTS over Maintenance LTS, and do not choose a Current release line for production unless the project explicitly requires it.

Type Safety Rules

  • Keep strict enabled for new code unless the project has a documented staged migration plan.
  • Consider noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, and noFallthroughCasesInSwitch when the project can absorb the added friction.
  • Avoid any, double assertions, broad object types, and Function. If an escape hatch is necessary, keep it local and add a short reason.
  • Prefer discriminated unions, unknown plus narrowing, branded IDs where useful, and explicit return types on exported APIs.
  • Validate external boundaries at runtime: CLI args, env vars, JSON, HTTP payloads, database rows, localStorage, queue messages, and plugin input.
  • Keep generated types, schema validators, and API clients in sync. Do not edit generated files by hand unless the repo explicitly does so.

Async, Errors, And Boundaries

  • Await promises intentionally; do not leave floating promises unless a lint rule and local pattern mark them safe.
  • Preserve causal error context with cause or wrapped messages when crossing module boundaries.
  • Model recoverable failures as typed results only when that pattern already exists; otherwise use exceptions with actionable messages.
  • Add cancellation, timeout, and cleanup behavior for long-running IO.
  • Keep framework server/client boundaries clear. Do not import server-only modules into browser bundles or browser globals into Node-only code.

Linting And Formatting

  • Prefer typed linting when the project already uses ESLint with typescript-eslint and performance is acceptable.
  • For typescript-eslint v8 and newer, prefer parserOptions.projectService: true unless the repo already has a stable project or tsconfig.eslint.json setup.
  • With Biome, preserve the existing formatter/linter contract. If Biome is the only linter, keep tsc --noEmit or the framework type checker as the type safety gate.
  • Keep formatting changes separate from semantic changes when the diff would be noisy.
  • Do not replace a working ESLint/Biome setup without a project-specific reason.

Module And Import Hygiene

  • Match the repo's module system: CommonJS, ESM, nodenext, bundler, or framework-specific defaults.
  • Do not change module, moduleResolution, jsx, paths, or package exports without checking runtime and bundler behavior.
  • Prefer import type for type-only imports, especially when native Node type stripping, verbatimModuleSyntax, or isolated emit is in play.
  • Keep path aliases consistent across TypeScript, bundler, test runner, and runtime. If one tool cannot resolve an alias, fix the shared config rather than scattering relative imports.
  • Avoid deep imports from package internals unless the package documents them.

Size And Maintainability Review

Use heuristics to decide where to focus, not as hard rules:

  • Files over about 300 lines deserve a scan for mixed responsibilities.
  • Functions over about 50 lines deserve a scan for hidden phases, nested control flow, and implicit state.
  • Types that require repeated assertions or helper overloads may need a simpler domain model.
  • React/TSX components that mix fetching, state orchestration, rendering, and formatting are good candidates for extraction.
  • Shared utility modules should have focused names and low dependency fan-in.

Validation

Prefer repo-native scripts, in this order when available:

npm run typecheck
npm run lint
npm test
npm run build

Adapt for the package manager (pnpm, yarn, bun) and monorepo task runner already in use. If a repository script is missing, use a direct tool invocation only after confirming that the specific tool is declared in the project manifest, resolved by the lockfile, and installed locally. Use the repository package manager's documented local-only mode that fails when the executable is missing.

Do not use acquisition-capable fallbacks such as npx, default npm exec, pnpm dlx, yarn dlx, or bunx to fill a missing validation tool. If the executable is absent or local-only behavior is uncertain, stop and surface an explicit dependency decision. Add or change the dependency only through the repository package manager and lockfile after the required approval and dependency-security review.

For framework projects, also run the framework build or checker that the repo uses in CI. Record any skipped checks and why.

Reference

Strict Mode Refresh Note

For strict-mode work, inspect the current tsconfig inheritance tree before changing compiler options. Treat strict as the umbrella setting, and evaluate stricter flags such as noUncheckedIndexedAccess and exactOptionalPropertyTypes only when the project can absorb the migration.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Guide accessibility reviews for UI, documents, and workflows. Use for WCAG-oriented audits, keyboard review, semantics, contrast, and remediation planning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CruxExperts/LocalSetup62026년 10월 21일 업데이트

Use when choosing a LocalSetup Agent-* lane for exploration, research, bounded implementation, or review. Consult the static capability matrix; do not probe account or network availability.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CruxExperts/LocalSetup62026년 10월 21일 업데이트

Guide agent email inbox workflows with prompt-injection defenses. Use for inbound email processing, webhooks, routing, and safety review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CruxExperts/LocalSetup62026년 10월 21일 업데이트

Navigate and understand codebases using agentlens hierarchical documentation. Use when exploring new projects, finding modules, locating symbols in large files, finding TODOs/warnings, or understanding code structure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CruxExperts/LocalSetup62026년 10월 21일 업데이트

Use for Agent Q signed encrypted file-drop or mail ship and ingest, private registry v2 setup, queue status, and transport maintenance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CruxExperts/LocalSetup62026년 10월 21일 업데이트

Inventory wrapper for the alirezarezvani Claude skills bundle. Use when triaging its broad skill catalog and large script surface before any targeted import.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CruxExperts/LocalSetup62026년 10월 21일 업데이트

CruxExperts의 스킬 모두 보기

이 스킬의 문제 신고