スキル一覧に戻る
kevincrabbe

typescript

by kevincrabbe

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

SKILL.md


name: typescript description: TypeScript guidelines covering type safety, RORO pattern, complexity limits, and error handling patterns. Use when writing TypeScript code.

TypeScript Development

Apply these guidelines when working with TypeScript code.

Types

Avoid using 'any'

Never use the any type. Always provide proper types.

Do not define inline object types

Do not define object/record types inline in parameter lists or return types. Create a named type/interface (or import an existing one) and use that name in the signature. Do the same for return shapes (e.g. Promise<Result> not Promise<{…}>).

// Bad
async execute(args: { sessionId: string; voiceId: string }): Promise<{ sessionAudioId: string }> { … }

// Good
export type ExecuteArgs = {
  sessionId: string;
  voiceId: string;
};

export type ExecuteResult = {
  sessionAudioId: string;
};

export async function execute(args: ExecuteArgs): Promise<ExecuteResult> {
  …
}

Use 'is' and 'has' prefixes for booleans

Boolean variables and functions should use is or has prefixes (e.g., isActive, hasPermission).

Functions

Use the RORO pattern

Receive an object, return an object.

Complexity

Keep cyclomatic complexity below 6

If you have a large switch case, consider strategy pattern/dispatch table.

Do not chain more than 2 array iteration methods

Store as variable and continue on next line if more processing is needed.

Do not nest blocks more than 3 levels deep

Keep nesting shallow for better readability.

スコア

総合スコア

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

レビュー

💬

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