dart-seal-type-hierarchies

Installation
SKILL.md

Seal Type Hierarchies

1. When to use this skill

Use this skill when:

  • A package declares an abstract base type whose subtypes are all defined in the same library, but the base type is not marked sealed.
  • Code branches over the members of such a hierarchy with is checks or a non-exhaustive switch, so adding a subtype later fails silently at runtime instead of loudly at compile time.
  • Reviewing a new type hierarchy and deciding whether it should be open to external subtyping.

When NOT to use (Abstention Guardrails)

Do NOT seal a type when:

Installs
5
GitHub Stars
147
First Seen
Sep 20, 2026