type-validator

Enforce TypeScript strict mode and detect unsafe casts in codebases.

333|92|Updated Jun 9, 2025
One-click install
npx skills add https://github.com/shenjingnan/xiaozhi-client --skill type-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-validator
Source: https://github.com/shenjingnan/xiaozhi-client/tree/main/.claude/skills/type-validator
Command: npx skills add https://github.com/shenjingnan/xiaozhi-client --skill type-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps maintain strict TypeScript typing across the codebase by identifying and guiding fixes for unsafe types, incomplete interfaces, and unsafe casts, reducing runtime errors and improving maintainability.

Core Features & Use Cases

  • Static typing discipline: Enforces strict type definitions and minimizes the use of any.
  • Runtime-safe validations: Integrates with Zod and type guards to align runtime checks with TypeScript types.
  • Code quality improvements: Provides pragmatic recommendations and automated-ish fixes within typical MCP/Xiaozhi client repos.

Quick Start

Run the type-validator across your TypeScript sources to locate and fix any any usage, missing types, or unsafe casts in the project.

Frequently Asked Questions about type-validator

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

FAQPage Schema
How do I enforce strict TypeScript typing and find unsafe casts in my project?

To enforce strict TypeScript typing, you can analyze your project sources to detect any usage, missing types, and unsafe casts. This process identifies incomplete interfaces and guides pragmatic fixes to reduce runtime errors.

How do I align runtime validations with TypeScript types using Zod?

You can align runtime validations with TypeScript types by integrating Zod schemas and type guards. This ensures that runtime checks match your static type definitions, preventing type mismatches during execution.

How do I minimize 'any' usage to improve TypeScript code quality?

To minimize any usage and improve TypeScript code quality, analyze your codebase to locate instances of implicit or explicit any. You can then apply strict type definitions to replace them with safer, explicit interfaces.

Do I need special tooling to run static type checking on MCP or Xiaozhi configurations?

No special tooling is required beyond standard Node and npm environments to run static type checking. The analysis operates directly on your TypeScript sources within typical MCP and Xiaozhi client repositories.

What are the limitations of relying on static type checking for runtime safety?

Static type checking alone cannot guarantee runtime safety because it does not validate external data shapes. To achieve runtime safety, you must integrate runtime validation tools like Zod schemas alongside your static type guards.