type-contract-auditor

Audit public TypeScript types against a formal spec for mismatches.

3|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/claushaas/palette-kit --skill type-contract-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-contract-auditor
Source: https://github.com/claushaas/palette-kit/tree/main/.codex/skills/type-contract-auditor
Command: npx skills add https://github.com/claushaas/palette-kit --skill type-contract-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps ensure public TypeScript types align with the official spec (src/planning/spec-v0.3.md), preventing drift that can break builds or mislead consumers.

Core Features & Use Cases

  • Compare public TS types to the spec to identify drift and missing types.
  • Detect mismatched optionals, duplicates, and circular imports with actionable fixes.
  • Use case: Guarantee type contracts reflect the planning spec, ensuring build health and maintainability.

Quick Start

Run the auditor against src/types and src/planning/spec-v0.3.md to generate a report of mismatches and suggested fixes.

Frequently Asked Questions about type-contract-auditor

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

FAQPage Schema
How do I audit TypeScript types against a spec to prevent drift?

You can audit TypeScript types against a spec by comparing public types in your source files with a formal spec to identify mismatches, missing types, and drift. This keeps builds healthy and aligns type contracts with planning specs.

How do I detect circular imports in a TypeScript project?

Detect circular imports in TypeScript by running a static analysis audit against your type definitions and spec. The audit identifies circular dependencies and mismatched optionals, providing actionable fixes to maintain build health.

What are mismatched optionals and duplicates in TypeScript type contracts?

Mismatched optionals and duplicates occur when public TypeScript types drift from the formal spec. A type contract audit identifies these discrepancies by comparing source types directly against the planning spec to ensure alignment.

Can I run a TypeScript type contract audit in CI pipelines?

Yes, you can apply a TypeScript type contract audit across builds and CI pipelines. Running the auditor against your types and spec file catches drift, missing types, and circular imports automatically during continuous integration.

What is the best way to ensure TypeScript builds remain healthy during spec updates?

The best way to ensure TypeScript builds remain healthy during spec updates is auditing public types against the formal spec. This catches type drift, mismatched optionals, and circular imports before they break builds or mislead consumers.