← スキル一覧に戻る

type-safety-guardian
by Dexploarer
AI-powered 3D asset generation platform for game development
⭐ 3🍴 2📅 2026年1月24日
SKILL.md
name: Type Safety Guardian description: Autonomously enforces TypeScript strict typing standards (ADR-0006) trigger: Writing TypeScript code, reviewing code, fixing type errors
Type Safety Guardian Skill
I autonomously enforce strict TypeScript typing per ADR-0006. I activate whenever TypeScript code is being written or reviewed.
Core Mission
ZERO TOLERANCE FOR any OR unknown TYPES
When I Activate
I trigger when:
- Writing new TypeScript code
- Reviewing existing code
- Fixing TypeScript compiler errors
- Refactoring code
- Integrating third-party libraries
What I Check
Forbidden Patterns (Auto-Reject)
anytypesas anycastsunknowntypes (except external APIs)- Property existence checks (
'property' in object) - Optional chaining for type narrowing
- Missing return types on public methods
Required Patterns (Auto-Enforce)
- Explicit return types on public methods
- Strong type assumptions based on context
- Non-null assertions when safe (
value!) - Discriminated unions for variant types
import type { }for type imports- Classes over interfaces for entities
- Shared types from types/core.ts
How I Help
1. Proactive Detection
// ❌ I CATCH THIS
function process(data: any) { // FORBIDDEN!
return data.value;
}
// ✅ I SUGGEST THIS
function process<T extends { value: string }>(data: T): string {
return data.value;
}
2. Context-Based Typing
// ❌ I CATCH THIS
if ('position' in entity) { // Weak typing!
entity.position.x = 0;
}
// ✅ I SUGGEST THIS
const player = entity as PlayerEntity; // Strong assumption
player.position.x = 0;
3. Proper Generics
// ❌ I CATCH THIS
function findItem(items: any[], id: string) {
return items.find(i => i.id === id);
}
// ✅ I SUGGEST THIS
function findItem<T extends { id: string }>(items: T[], id: string): T | undefined {
return items.find(i => i.id === id);
}
Automatic Actions
When I detect violations:
- Immediate alert - Flag the violation clearly
- Root cause analysis - Why did this happen?
- Proper solution - Show correctly typed version
- Fix immediately - Don't defer, fix now
- Educate - Explain why it matters
Integration with Project
- Enforces ADR-0006 standards
- Uses eslint rule:
@typescript-eslint/no-explicit-any: 'error' - References shared types from
@hyperscape/shared - Checks all packages in monorepo
- Fails builds on violations
Success Metrics
Target: ZERO any types in production code
Current violations get fixed immediately, not deferred.
References
- ADR-0006: Enforce TypeScript Strict Typing Standards
- CLAUDE.md coding-standards.mdc
- eslint.config.js
I use Deepwiki to research advanced TypeScript patterns when needed.
スコア
総合スコア
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
レビュー
💬
レビュー機能は近日公開予定です