원클릭으로
ts-type-naming
Enforce TypeScript type naming conventions / TypeScript 类型命名规范约束 / interface type naming / type alias naming
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Enforce TypeScript type naming conventions / TypeScript 类型命名规范约束 / interface type naming / type alias naming
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate changelog-friendly Git commit messages that align with Conventional Commits, Angular-style commit writing, and repository-specific validators such as `scripts/verify-commit.js`. Use when Codex needs to inspect staged changes, choose a valid commit `type`, draft a `git commit` message, rewrite a failing commit header, or help with Git 提交信息 / commit message / git comment generation.
Enforce naming conventions for functions, constants, variables, and config parameters / 函数名常量变量命名规范约束 / camelCase function / UPPER_SNAKE_CASE constant / variable naming
Generate evidence-backed project code smell and technical debt reports, including 屎山代码判定, readability, maintainability, structure, duplication, abstraction boundary, React/TypeScript, accessibility, and engineering maturity checks. Use when asked to scan or audit a codebase, quantify code smells, judge whether a project is 屎山, or produce a debt report.
Review source code for readability, maintainability, code structure, code smells, React state/effect usage, TypeScript rigor, abstraction quality, and accessibility. Use when Codex needs to audit a file, component, hook, utility, PR, or code snippet and return concrete findings for code review.
Choose and apply UnJS ecosystem packages for JavaScript and TypeScript development. Use when building CLIs with citty and consola, layered configuration systems with c12 and untyped, lightweight or universal servers with h3 nitro ofetch crossws and unstorage, libraries with unbuild mkdist jiti mlly and pkg-types, plugins with unplugin unimport and magicast, or when selecting the correct UnJS package family by architectural scenario and implementation constraints.
Use whenever developing, writing, refactoring, reviewing, or cleaning code in a project to enforce the repository's code convergence and abstraction boundary rules.
| name | ts-type-naming |
| description | Enforce TypeScript type naming conventions / TypeScript 类型命名规范约束 / interface type naming / type alias naming |
Enforce consistent naming conventions for TypeScript interface and type declarations.
This skill defines and enforces strict conventions for TypeScript type definitions:
Naming rules:
I + PascalCase (e.g., IUserInfo, IApiResponse)userInfo, apiResponse)File location rules:
interface and type declarations must be placed in dedicated type files, not scattered across component or logic files.types.ts (the single root-level file) > xxxxs.ts > xxxx.d.tsshared/types/types.ts > shared/types/xxx{s,.d}.tstypes.ts at the root — it is the highest-level, most comprehensive type file.Detect project type. Determine whether the project is a Nuxt project (check for nuxt.config.ts, .nuxt/ directory) or a general TypeScript project.
Check file locations. Verify that all interface and type declarations reside in allowed type files:
types.ts at root level, or xxxxs.ts / *.d.tsshared/types/types.ts, or shared/types/*{s,.d}.tsIdentify type declarations. Scan the provided TypeScript code for all interface and type (alias) declarations.
Apply naming rules. Check each declaration against the naming convention:
interface → IPascalCase (I + PascalCase)
type → camelCase (lowercase first letter)
Report violations. For each non-conforming declaration, report:
Offer to fix. After reporting, ask whether to apply the fixes. If approved:
I + PascalCaseinterface declaration must start with an uppercase I followed by PascalCase.interface UserProps → interface IUserPropsinterface response → interface IResponseinterface apiConfig → interface IApiConfigtype alias declaration must use camelCase with a lowercase first letter.type UserInfo → type userInfotype APIResponse → type apiResponsetype Theme → type themeThere is only ONE types.ts at the project root — it is the highest-level, most comprehensive type file containing all shared type definitions. Type declarations are organized by priority:
| Priority | File Pattern | Description | Example |
|---|---|---|---|
| 1 (highest) | types.ts | The single root-level type file, contains all comprehensive types | types.ts |
| 2 | xxxxs.ts | Domain-specific type files for supplementary types | models.ts, users.ts |
| 3 | xxxx.d.ts | Ambient declaration files | global.d.ts, env.d.ts |
The types.ts file is the single source of truth. If a type is shared across the project, it belongs in types.ts. Domain-specific xxxxs.ts files should only contain types that are tightly coupled to a specific domain and not reused elsewhere.
If interface or type declarations are found in non-type files (e.g., utils.ts, service.ts, index.ts, component files), report them as violations and suggest moving them to types.ts or the appropriate domain-specific type file.
Type declarations must only exist in shared/types/:
| Priority | File Pattern | Description | Example |
|---|---|---|---|
| 1 (highest) | shared/types/types.ts | The single root-level type file | shared/types/types.ts |
| 2 | shared/types/xxx{s,.d}.ts | Domain-specific type files | shared/types/users.ts, shared/types/api.d.ts |
The shared/types/types.ts is the single source of truth for the entire Nuxt project. Domain-specific files under shared/types/ are for supplementary types only.
If interface or type declarations are found outside shared/types/, report them as violations and suggest the correct target file.
Partial<T>, Record<K,V>): These are not user-defined and are not affected.defineProps<{...}>() or component prop type definitions that are not exported are exempt from the file location rule, but still subject to the naming rule if they are extracted as named types.