type-design-analyzer

type-design-analyzer is a skill for Claude Code, Codex from jasmedia/cc-pr-reviewer. It costs 71 tokens per session (873 once invoked), scanned A, original, MIT.

A pull-request review tool for newly added or substantially changed types, classes, and related data structures. It checks whether their rules are clear, protected from misuse, and useful in practice.

In plain words
What is it for?
Use it to identify invariants—conditions that must always remain true—and assess encapsulation, how clearly those conditions are expressed, practical usefulness, and enforcement.
Why use it?
It helps catch designs whose valid states or relationships are not properly enforced. The review includes ratings and concrete suggestions for improving the design.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to identify invariants—conditions that must always remain true—and assess encapsulation, how clearly those conditions are expressed, practical usefulness, and enforcement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jasmedia/cc-pr-reviewer/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 jasmedia/cc-pr-reviewer --skill type-design-analyzer
Clone the repo
git clone --depth 1 https://github.com/jasmedia/cc-pr-reviewer

Made for: Claude Code, Codex.

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/jasmedia/cc-pr-reviewer/type-design-analyzer/github.svg)](https://agentmods.dev/skills/jasmedia/cc-pr-reviewer/type-design-analyzer)
Your own site
<a href="https://agentmods.dev/skills/jasmedia/cc-pr-reviewer/type-design-analyzer"><img src="https://agentmods.dev/badge/skills/jasmedia/cc-pr-reviewer/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/jasmedia/cc-pr-reviewer/type-design-analyzer"><img src="https://agentmods.dev/badge/skills/jasmedia/cc-pr-reviewer/type-design-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 873 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.00071 $0.00873
Opus 5 $0.00036 $0.00436
Sonnet 5 $0.00014 $0.00175
Haiku 4.5 $0.00007 $0.00087

Measured 10d ago against content hash 0eb009e2d0c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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.

cc_pr_reviewer/skills/type-design-analyzer/SKILL.md · 112 lines

How it starts

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

Type Design Analyzer

You are a type design expert with extensive experience in large-scale software architecture. Your specialty is analyzing and improving type designs to ensure they have strong, clearly expressed, and well-encapsulated invariants. Review every newly-added or significantly-modified type in the current pull request.

Core Mission

Evaluate type designs with a critical eye toward invariant strength, encapsulation quality, and practical usefulness. Well-designed types are the foundation of maintainable, bug-resistant software systems.

Analysis Framework

When analyzing a type, you will:

  1. Identify Invariants: Examine the type to identify all implicit and explicit invariants. Look for:

    • Data consistency requirements
    • Valid state transitions
    • Relationship constraints between fields
    • Business logic rules encoded in the type
    • Preconditions and postconditions
  2. Evaluate Encapsulation (Rate 1-10):

    • Are internal implementation details properly hidden?
    • Can the type's invariants be violated from outside?
    • Are there appropriate access modifiers?
    • Is the interface minimal and complete?
  3. Assess Invariant Expression (Rate 1-10):

    • How clearly are invariants communicated through the type's structure?
    • Are invariants enforced at compile-time where possible?
    • Is the type self-documenting through its design?
    • Are edge cases and constraints obvious from the type definition?
  4. Judge Invariant Usefulness (Rate 1-10):

    • Do the invariants prevent real bugs?
    • Are they aligned with business requirements?
    • Do they make the code easier to reason about?
    • Are they neither too restrictive nor too permissive?
  5. Examine Invariant Enforcement (Rate 1-10):

    • Are invariants checked at construction time?
    • Are all mutation points guarded?
    • Is it impossible to create invalid instances?
    • Are runtime checks appropriate and comprehensive?

Output Format

For each reviewed type, provide:

Read the full file on GitHub · 112 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 · 112 lines · 71 tokens per session scan A 0eb009e2d0c3

Subscribe to this mod's changes

type-design-analyzer is a skill published in the GitHub repository jasmedia/cc-pr-reviewer (5 stars, last pushed 1mo ago), licensed MIT. It adds 71 tokens to every session and 873 once invoked, about $0.0004 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

verify-implementation

A workflow that runs a project’s verification skills to produce a report on coding patterns, architecture rules, and project conventions. It is intended for work after implementation, before a pull request, or during code review.

sangrokjung/claude-forge · 37 tokens

review-loop

Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…

sangrokjung/claude-forge · 100 tokens

frontend-code-review

Trigger when the user requests a review of frontend files (e.g., .tsx, .ts, .js). Support both pending-change reviews and focused file reviews while applying the checklist rules.

sangrokjung/claude-forge · 42 tokens

go-code-reviewer

Review Go code with a defect-first approach using repository policy (constitution.md first, then AGENTS.md fallback). Use for code review, PR review, quality checks, risk analysis, and regression detection.

johnqtcg/awesome-skills · 45 tokens

go-review-lead

Orchestrate a comprehensive Go code review by triaging code changes, dispatching vertical review skills (security, concurrency, error, logic, performance, quality, test, observability) as parallel agents, then consolidating results into a unified report. Use for full Go PR review or comprehensive code review. Replaces…

johnqtcg/awesome-skills · 80 tokens

security-review

A code-security review guide that checks code changes, pull requests, or services for risks an attacker could exploit.

johnqtcg/awesome-skills · 164 tokens