type-design-analyzer

type-design-analyzer is a skill for Claude Code from euxx/claude-skills-for-copilot. It costs 43 tokens per session (636 once invoked), scanned A, original, MIT.

An analysis of types, interfaces, and data models that checks whether their rules are expressed and enforced by the type system.

In plain words
What is it for?
Reviewing new or changed types and models for encapsulation, useful constraints, and rules that the compiler or type checker can enforce.
Why use it?
It finds designs that allow invalid combinations of values and suggests structures that prevent those states.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Reviewing new or changed types and models for encapsulation, useful constraints, and rules that the compiler or type checker can enforce.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/euxx/claude-skills-for-copilot/type-design-analyzer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add euxx/claude-skills-for-copilot --skill type-design-analyzer
Clone the repo
git clone --depth 1 https://github.com/euxx/claude-skills-for-copilot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for type-design-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/euxx/claude-skills-for-copilot/type-design-analyzer/github.svg)](https://agentmods.dev/skills/euxx/claude-skills-for-copilot/type-design-analyzer)
Your own site
<a href="https://agentmods.dev/skills/euxx/claude-skills-for-copilot/type-design-analyzer"><img src="https://agentmods.dev/badge/skills/euxx/claude-skills-for-copilot/type-design-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for type-design-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/euxx/claude-skills-for-copilot/type-design-analyzer"><img src="https://agentmods.dev/badge/skills/euxx/claude-skills-for-copilot/type-design-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 636 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00636
Opus 5 $0.00022 $0.00318
Sonnet 5 $0.00009 $0.00127
Haiku 4.5 $0.00004 $0.00064

Measured 10d ago against content hash 3b32231f1472, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

type-design-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/type-design-analyzer/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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?
    • Invariant Expression (1–10): Are the invariants visible in the type definition itself, or only in documentation?
    • Invariant Usefulness (1–10): Do the expressed invariants represent meaningful real-world constraints?
    • Invariant Enforcement (1–10): Does the type system prevent violations at compile time?
  4. Identify specific improvements: discriminated unions, branded types, opaque types, readonly modifiers, wrapper types.

Output Per Type

### TypeName
**Location**: file:line

**Invariants Identified**:
- [list of constraints that should always hold]

**Ratings**:
- Encapsulation: X/10 — [justification]
- Invariant Expression: X/10 — [justification]
- Invariant Usefulness: X/10 — [justification]
- Invariant Enforcement: X/10 — [justification]
- **Overall**: X/10 — [weighted judgment: Invariant Enforcement counts most; Encapsulation least for structural types]

**Strengths**:
- [what the type does well]

**Concerns**:
- [specific problems with the current design]

**Recommended Improvements**:
[concrete code examples showing better type design]

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 64 lines · 43 tokens per session scan A 3b32231f1472

Subscribe to this mod's changes

type-design-analyzer is a skill published in the GitHub repository euxx/claude-skills-for-copilot (4 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 636 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pr-comment-review

Audit and remediate an open GitHub PR's review feedback: verify Copilot and Codex actually reviewed, drive every unresolved thread to a fix-or-justify reply, correct PR title/description drift against the real diff, and run a one-time self-review pass. Trigger on "have all PR comments been addressed", "did copilot and…

anchildress1/awesome-github-copilot · 162 tokens

audit-legacy-controller

Read the legacy Admin{Domain}sController.php without modifying it. Extract every field rendered, every action method, and every Hook::exec() call.

jeffsenso/prestashop-skills · 38 tokens

copilot-mcp-server

Direct access to GitHub Copilot MCP server tools for AI-powered development assistance.

Poorgramer-Zack/copilot-mcp-tool · 21 tokens

continual-learning

Nightly refinement of an existing per-repo review-style prompt using this reviewer's own finding outcomes. Read confirmed (resolved-by-commit / thumbs-up) and dismissed (thumbs-down) findings, promote the bug patterns the team actually fixes, demote the false-positive patterns, reconcile against the current prompt…

langchain-ai/open-swe · 89 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

code-yeongyu/oh-my-openagent · 63 tokens