💬 コミュニケーション コミュニティ
typescript-dev
TypeScript development best practices, code quality tools, and documentation templates. Activated when working with .ts, .tsx files or TypeScript projects.
⚡ おすすめ: コマンド1行でインストール(60秒)
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o typescript-dev.zip https://jpskill.com/download/17716.zip && unzip -o typescript-dev.zip && rm typescript-dev.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17716.zip -OutFile "$d\typescript-dev.zip"; Expand-Archive "$d\typescript-dev.zip" -DestinationPath $d -Force; ri "$d\typescript-dev.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
typescript-dev.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
typescript-devフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
TypeScript Development Expert
This skill supports TypeScript project development.
🎯 Core Rules
Package Management
- Required: Use
pnpmas package manager - Do not use
npmoryarn
Type Safety
- tsconfig.json:
strict: truerequired - Null Handling: Leverage optional chaining
?.and nullish coalescing?? - Imports: Use ES modules, avoid
require() - NO ANY: Do not use
anytype in production code
Best Practices
- Type Inference: Let TypeScript infer when obvious
- Generics: Use for reusable components
- Union Types: Prefer union types over enums for string literals
- Utility Types: Leverage built-in types (Partial, Pick, Omit)
Documentation
- Required: Use TSDoc format for documentation comments
- Public APIs only: Document exported functions, classes, and interfaces
- Self-documenting code: Prefer clear naming over excessive comments
- Document when necessary: Add TSDoc only when the code intent isn't obvious from the signature
🛠️ Code Quality Tools
Development Workflow
# Format code
pnpm run format
# Run linter
pnpm run lint
# Type check
pnpm tsc --noEmit
# Run tests with coverage
pnpm test -- --coverage
🎯 Quality Checklist
Check these during code review:
- [ ] Public APIs have TSDoc comments (when intent isn't clear from signature)
- [ ] No
anytype usage - [ ] Proper error handling
- [ ] Test coverage above 80%
- [ ] Type inference properly leveraged
- [ ] Utility Types utilized
- [ ] Optional chaining (
?.) and Nullish coalescing (??) used - [ ] ES modules used (avoid
require())
🚀 Common Patterns
Error Handling
// Good: Clear error types
class ValidationError extends Error {
constructor(message: string, public field: string) {
super(message);
this.name = 'ValidationError';
}
}
// Good: Result type pattern
type Result<T, E = Error> =
| { success: true; data: T }
| { success: false; error: E };
Async/Await
// Good: With error handling
async function fetchUserData(id: string): Promise<Result<UserData>> {
try {
const response = await fetch(`/api/users/${id}`);
const data = await response.json();
return { success: true, data };
} catch (error) {
return { success: false, error: error as Error };
}
}
Type Guards
// Good: Custom type guard
function isUserProfile(value: unknown): value is UserProfile {
return (
typeof value === 'object' &&
value !== null &&
'id' in value &&
'username' in value
);
}
💡 Performance Tips
-
Avoid unnecessary re-renders (React)
- Use
React.memofor expensive components - Use
useMemo/useCallbackappropriately
- Use
-
Lazy Loading
- Dynamic imports for code splitting
React.lazy()for components
-
Type-only imports
import type { UserProfile } from './types';
🔍 Common Anti-patterns to Avoid
❌ Don't:
// Using any type
function process(data: any) { }
// Implicit any
function getValue(obj, key) { }
// Excessive type assertions
const user = data as User;
✅ Do:
// Proper type definitions
function process(data: UserData) { }
// Explicit types
function getValue<T>(obj: T, key: keyof T) { }
// Use type guards
if (isUser(data)) {
// data is User here
}