Agent skill
reviewing-type-safety
TypeScript type safety patterns and best practices for maximum type coverage. Triggers: TypeScript, type safety, any, 型安全, 型カバレッジ, strict mode.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/devops/reviewing-type-safety
SKILL.md
型安全レビュー
検出
| ID | パターン | 修正 |
|---|---|---|
| TS1 | any |
unknown + 型ガード |
| TS1 | 暗黙的any | 明示的な型アノテーション |
| TS2 | value as Type |
型ガード関数 |
| TS2 | value! (非nullアサーション) |
明示的なnullチェック |
| TS3 | function fn(data) (型なし) |
function fn(data: Type) |
| TS3 | 戻り値型の欠如 | 明示的な : ReturnType |
| TS4 | 網羅的でないdefault: |
default: assertNever(value) |
基準
型カバレッジ >= 95%。Any使用 = 0。Strictモード全て有効。
参考
| トピック | ファイル |
|---|---|
| カバレッジ | references/type-coverage.md |
| ガード | references/type-guards.md |
| Strict | references/strict-mode.md |
| Result | references/result-type.md |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?