type-design-analyzer

Analyze type invariants and encapsulation quality across statically typed languages.

1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/bcmcpher/my-skills --skill type-design-analyzer-bcmcpher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-design-analyzer
Source: https://github.com/bcmcpher/my-skills/tree/main/plugins/programming-tools/agents/type-design-analyzer
Command: npx skills add https://github.com/bcmcpher/my-skills --skill type-design-analyzer-bcmcpher

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze type design for encapsulation quality and invariant strength. It helps ensure new types, PR reviews, and refactoring maintain strong invariants and clean boundaries.

Core Features & Use Cases

  • Invariant discovery and documentation across type fields and relationships.
  • Encapsulation and access control assessment, including mutation guards.
  • Concrete improvement recommendations with language-agnostic guidance.
  • Real-world scenario: when reviewing a PR introducing a new type, assess whether invariants are enforced at construction and whether mutation is restricted.

Quick Start

Analyze a given type to identify invariants and encapsulation, then propose concrete improvements.

Frequently Asked Questions about type-design-analyzer

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

FAQPage Schema
How do I assess type invariants and encapsulation when reviewing a new type in a PR?

To evaluate encapsulation quality, identify all type fields and relationships, then verify if invariants are strictly enforced at construction and if mutation is properly restricted by access guards across statically typed languages.

What are type invariants and how do they affect static analysis?

Type invariants are conditions that must always remain true for a given type throughout its lifecycle. Static analysis identifies these invariants and checks whether type boundaries and access control properly maintain them.

Does this type design analyzer work across different statically typed languages?

Yes, the type design analyzer provides language-agnostic guidance to assess encapsulation and invariants across statically typed languages during refactoring efforts, new type reviews, or PR modifications.

What is the best way to document invariants and encapsulation rules for an existing type?

The best way to document invariants is to use a structured framework to identify conditions across type fields and relationships, assess mutation guards, and propose concrete, implementable improvements for clean boundaries.

When should I review type encapsulation during a refactoring effort?

You should review type encapsulation during refactoring when modifying types to ensure strong invariants are maintained. Assess whether mutation is restricted and verify boundaries are clean to prevent behavioral regressions.