← Back to list

typescript
by whyleonardo
Reusable Claude Code configuration template with custom commands and skills
⭐ 0🍴 0📅 Jan 13, 2026
SKILL.md
name: typescript description: TypeScript and JavaScript coding standards and best practices.
TypeScript Standards
Type Safety
- Enable strict mode (
"strict": true) - Avoid
any- useunknownwhen type is uncertain - Prefer
typefor unions/intersections,interfacefor object shapes - Use const assertions for literal types:
as const - Leverage discriminated unions for state machines
Prefer Modern Syntax
- Use
const/letovervar - Arrow functions for callbacks and short functions
- Template literals over string concatenation
- Optional chaining (
?.) and nullish coalescing (??) - Destructuring for cleaner code
Functions
- Explicit return types for public APIs
- Use overloads for complex signatures
- Prefer pure functions when possible
- Keep functions small and focused (max ~20-30 lines)
- Use default parameters over conditional logic
Error Handling
- Use typed error classes
- Prefer Result/Either patterns for expected failures
- Throw for unexpected/unrecoverable errors
- Always type catch blocks:
catch (error: unknown)
Async Code
- Prefer
async/awaitover raw Promises - Use
Promise.allfor parallel operations - Handle rejection with try/catch or
.catch() - Avoid mixing callbacks and promises
- Consider
Promise.allSettledwhen partial success is acceptable
Imports & Exports
- Use named exports for most cases
- Default exports only for main module entry
- Group imports: external, internal, types
- Use barrel files (
index.ts) sparingly - Prefer absolute imports with path aliases
Best Practices
- Avoid mutation when possible
- Use
readonlyfor immutable data - Prefer composition over inheritance
- Use generics for reusable type-safe code
- Validate external data at boundaries (Zod, etc.)
Score
Total Score
55/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon

