Type Design Analyzer

Analyzes type design quality by rating encapsulation, invariant expression, usefulness, and enforcement. Helps design types that make invalid states unrepresentable. Use when reviewing new types or data models.

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add euxx/claude-skills-for-copilot --skill type-design-analyzer
Manual install
git clone --depth 1 https://github.com/euxx/claude-skills-for-copilot.git /tmp/claude-skills-for-copilot
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills-for-copilot/skills/type-design-analyzer ~/.claude/skills/type-design-analyzer

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Type Design Analyzer

Evaluate the quality of type definitions, interfaces, and data models. The goal is to identify types that allow invalid states and suggest improvements that make invalid states unrepresentable.

## What Makes a Good Type

1. **Encapsulation**: For class-backed or opaque types, the internal structure is hidden; external code interacts through a defined interface. For structural types (interfaces, type aliases), encapsulation is achieved by keeping types unexported or by wrapping them in opaque branded types.
2. **Invariant expression**: The type's constraints are expressed in its structure, not in documentation or runtime checks.
3. **Invariant usefulness**: The expressed invariants represent meaningful domain constraints.
4. **Invariant enforcement**: The type system (not the programmer) ensures invariants are maintained.

## Analysis Steps

1. **Locate all type definitions** in scope: interfaces, type aliases, classes, enums, discriminated unions.

2. **Identify invariants** for each type — constraints that must always be true:
   - Relationships between fields (e.g., "if `status` is `done`, `completedAt` must be set")
   - Valid value ranges or formats
   - Mutual exclusivity constraints
   - Ordering or structural requirements

3. **Rate each type** across four dimensions (1–10 scale):
   - **Encapsulation** (1–10): Can external code access and mutate internals that should be private?
Read the full skill on GitHub

Details

Skill name
type-design-analyzer
Path
skills/type-design-analyzer/SKILL.md
License
MIT
Repo updated
2 November 2026

FAQ

What does the Type Design Analyzer skill do?

Analyzes type design quality by rating encapsulation, invariant expression, usefulness, and enforcement. Helps design types that make invalid states unrepresentable. Use when reviewing new types or data models.

How do I install the Type Design Analyzer skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add euxx/claude-skills-for-copilot --skill type-design-analyzer. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Type Design Analyzer popular?

It lives in euxx/claude-skills-for-copilot, which has 5 GitHub stars and 0 forks.

Related skills

Code Review

5

euxx/claude-skills-for-copilot

Multi-agent code review for local changes, files, or directories. Detects bugs, security issues, and conventions-file violations (AGENTS.md/CLAUDE.md/GEMINI.md).

Git & Code Review

Code Simplifier

5

euxx/claude-skills-for-copilot

Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Works on recently modified code, a set of changes, or the whole codebase.

Software Development

Comment Analyzer

5

euxx/claude-skills-for-copilot

Analyzes code comments for accuracy, completeness, and long-term maintainability. Detects comment rot and misleading documentation. Use after adding or modifying code comments.

Software Development

Verify Agent Action

9

sandbaseai/workbuddy-skill

Use before a consequential agent action to verify its exact target, parameters, scope, approval binding, evidence, freshness, and replay safety without executing it.

AI, LLMs & Agents

Tool Schema Design

9

sandbaseai/workbuddy-skill

Use when creating or revising function-calling, MCP, plugin, or internal Agent tools and you need clear intent boundaries, bounded schemas, explicit effects, safe defaults, idempotency, errors, and realistic selection tests.

AI, LLMs & Agents

Voom

5

roby2358/skills

The recursive agent containment and cleanup skill. Use this skill whenever an AI agent, pipeline, or autonomous workflow has gone off the rails — producing cascading side effects, unintended outputs, runaway processes, or metaphorical "pink stuff" spread across systems. Triggers include: agent loops, hallucination cascades, unintended bulk writes, recursive failures, agentic sprawl, pipeline contamination, "it's doing something weird", "everything is broken", "make it stop", or any situation where one agent's output has contaminated another agent's input. Also use when the user says /voom. Thi

AI, LLMs & Agents

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.