スキル typescript-strict
📘

typescript-strict

安全 🌐 ネットワークアクセス⚙️ 外部コマンド

Enforce strict TypeScript standards

こちらからも入手できます: Doyajin174

TypeScript projects often suffer from implicit any types and loose error handling. This skill provides clear rules and examples for writing type-safe, production-ready TypeScript code that prevents runtime errors.

対応: Claude Codex Code(CC)
📊 69 十分
1

スキルZIPをダウンロード

2

Claudeでアップロード

設定 → 機能 → スキル → スキルをアップロードへ移動

3

オンにして利用開始

テストする

「typescript-strict」を使用しています。 Write a function that processes user data with proper error handling

期待される結果:

  • Use unknown instead of any for input parameters
  • Add explicit return type: Promise<User | null>
  • Type catch block errors with instanceof checks
  • Use discriminated union for result: { success: true, data: T } | { success: false, error: string }
  • Add null check before accessing optional properties

「typescript-strict」を使用しています。 Create a type-safe API response handler

期待される結果:

  • Define discriminated union for success and error states
  • Use exhaustive type checking with switch statements
  • Validate external data with type guards
  • Add explicit return type annotations
  • Handle unknown errors with proper typing

セキュリティ監査

安全
v5 • 1/16/2026

This skill contains only markdown documentation with TypeScript code examples. All 31 static findings are false positives: template literal backticks were misidentified as shell execution, base64 hashes were flagged as crypto, and code examples were misidentified as reconnaissance. Pure documentation skill with zero risk.

2
スキャンされたファイル
272
解析された行数
2
検出結果
5
総監査数
監査者: claude 監査履歴を表示 →

品質スコア

38
アーキテクチャ
100
保守性
85
コンテンツ
21
コミュニティ
100
セキュリティ
91
仕様準拠

作れるもの

Enforce Team Coding Standards

Ensure all team members follow consistent TypeScript patterns for better maintainability.

Generate Type-Safe Code

Guide AI tools to produce TypeScript code with proper types and error handling.

Review TypeScript PRs

Quickly identify violations of TypeScript best practices during code reviews.

これらのプロンプトを試す

Type Function
Write a TypeScript function called fetchUser that takes a user ID and returns user data. Use strict types and proper error handling.
Fix Any Types
Refactor this function to remove all any types. Use unknown with type guards where appropriate.
Error Handling
Add proper error handling to this function. Use discriminated unions for success and failure cases.
Code Review
Review this TypeScript code for strict mode compliance. Identify any violations of the rules and suggest fixes.

ベストプラクティス

  • Always use unknown instead of any and validate with type guards before use
  • Explicitly type all function signatures including return types for public APIs
  • Handle errors with proper typing using instanceof checks or type predicates

回避

  • Using any to silence TypeScript errors instead of properly typing the data
  • Non-null assertions to bypass strict null checks without proper null handling
  • Swallowing errors with empty catch blocks or generic console.log without proper error typing

よくある質問

Does this skill work with all TypeScript versions?
Yes. The rules follow TypeScript best practices compatible with TypeScript 4.0 and newer versions.
Can I use this with JavaScript projects?
This skill is TypeScript-specific. Use standard JSDoc annotations for JavaScript projects instead.
How does this integrate with my IDE?
This skill provides guidelines. For IDE integration, use TypeScript built-in strict mode in tsconfig.json.
Does this skill store any data?
No. This is a documentation-only skill that provides guidance without reading or writing any files.
How is this different from ESLint?
This skill provides reasoning and examples. ESLint enforces rules automatically. Use both together for best results.
Should I follow these rules in legacy code?
Apply rules to new code incrementally. For legacy code, create issues to track violations and address them during refactoring.

開発者の詳細

ファイル構成

📄 SKILL.md