Type Safety Guardian

Enforce strict TypeScript typing by rejecting `any` and `unknown` misuse.

7|2|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill type-safety-guardian-prompt-or-die-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Type Safety Guardian
Source: https://github.com/Prompt-or-Die-Labs/hyper-forge/tree/main/.claude/plugins/core-dev/skills/type-safety-guardian
Command: npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill type-safety-guardian-prompt-or-die-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents fragile TypeScript code by blocking forbidden any/unknown patterns and enforcing strict typing conventions to reduce type-related defects and build failures.

Core Features & Use Cases

  • Zero-tolerance typing rules: Detects and rejects any, unsafe unknown, and related weak-typing patterns while guiding you to compliant alternatives.
  • Safer API and refactor behavior: Enforces explicit return types on public methods and promotes discriminated unions and shared types to keep changes reliable.
  • Structured remediation workflow: Flags each violation, explains likely root cause, provides a correctly typed solution, and pushes fixes immediately.

Quick Start

Ask the AI to review the TypeScript changes against ADR-0006 and replace any forbidden patterns with strictly typed equivalents.

Frequently Asked Questions about Type Safety Guardian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce strict TypeScript typing and eliminate any types during code review?

To enforce strict TypeScript typing during code review, apply zero-tolerance rules that detect forbidden weak-typing constructs like `any` and unsafe `unknown`, requiring explicit public method return types and safe alternatives such as discriminated unions.

What is the best way to refactor TypeScript code to satisfy ADR-0006 type safety guardrails?

Refactoring TypeScript code to satisfy ADR-0006 involves rejecting `any` and `unknown` misuse, enforcing explicit return types on public methods, and promoting strong typing patterns like discriminated unions and shared core types to ensure production readiness.

How do I prevent type drift and any regressions when integrating third-party TypeScript libraries?

Prevent type drift and `any` regressions during third-party integration by detecting forbidden weak-typing patterns and guiding you to strictly typed equivalents, ensuring that external dependencies do not compromise your internal type safety.

Why does my TypeScript build fail when using unknown types and how do I fix it?

TypeScript builds fail when unsafe `unknown` types violate strict typing rules, requiring you to replace them with safe type patterns through a structured remediation workflow that flags violations, explains root causes, and pushes correctly typed solutions.

Can I use ESLint to block any types and enforce strict typing in my TypeScript project?

Yes, you can block `any` types by applying strict typing rules that detect and reject forbidden weak-typing constructs, enforce explicit return types on public methods, and guide replacements with compliant alternatives like discriminated unions.