スキル一覧に戻る
15195999826

naming-typescript

by 15195999826

0🍴 0📅 2026年1月13日
GitHubで見るManusで実行

SKILL.md


name: naming-typescript description: >- Applies TypeScript naming conventions for variables, functions, classes, types, and files. Use when writing new code or reviewing naming patterns. Triggers: "命名规范", "怎么命名", "变量名", "naming convention".

TypeScript 命名规范

速查表

类型规则示例
变量/函数camelCaseuserName, fetchUser
类/类型PascalCaseUserService, ApiResponse
常量UPPER_SNAKEMAX_RETRY, API_URL
布尔前缀isActive, hasPermission
数组复数users, items
文件kebab-caseuser-service.ts

布尔变量前缀

前缀语义示例
is状态isActive, isLoading
has拥有hasPermission, hasError
can能力canEdit, canSubmit
should建议shouldRefresh, shouldRetry
will将要willUpdate, willExpire
did已发生didMount, didChange

常量判断

// UPPER_SNAKE: 编译时确定、不可变
const MAX_RETRY = 3
const API_URL = 'https://api.example.com'

// camelCase: 运行时计算
const currentUser = fetchUser()

常用缩写

缩写全称
ctxContext
cfgConfiguration
req/resRequest/Response
errError
fnFunction
refReference
prev/nextPrevious/Next
idxIndex

避免:单字母变量(除 i/j/kT/K/V

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です