Type system constraint guides — maps language features to the static guarantees they enforce
npx claudepluginhub jpablo/vibe-typesType system constraint guides for Python, Rust, and Scala 3 — maps features to the constraints they enforce at check/compile time
A multi-language guide to type system features — mapping each language's type system capabilities to the constraints and properties they can enforce at compile time.
Approach: For each language, a Technique Catalog documents what each type feature enables, and a Use-Case Index shows which features solve which problem. A shared Taxonomy provides cross-language coverage matrices.
| Language | Status | Guide |
|---|---|---|
| Scala 3 | In Progress | 40 technique catalog entries, 20 use-case documents |
| Rust | In Progress | 37 technique catalog entries, 21 use-case documents |
| Python | In Progress | 29 technique catalog entries, 18 use-case documents |
| Lean 4 | In Progress | 41 technique catalog entries, 18 use-case documents |
| Java | Planned | — |
| TypeScript | Planned | — |
| Haskell | Planned | — |
| OCaml | Planned | — |
| Agda | Planned | — |
| TLA+ | Planned | — |
| Document | Contents |
|---|---|
| Techniques | 53 techniques × 4 languages — cross-language coverage matrix |
| Use Cases | 22 use cases × 4 languages — cross-language coverage matrix |
| Sources | References and primary sources per language |
| Changelog | Version history and update log |
vibe-types/
├── plugin/ # Claude Code plugin (installable)
│ ├── .claude-plugin/
│ │ └── plugin.json
│ └── skills/
│ ├── scala3/ # One skill per language
│ │ ├── SKILL.md
│ │ ├── catalog/ # T01-algebraic-data-types.md, T02-..., etc.
│ │ └── usecases/ # UC01-invalid-states.md, UC02-..., etc.
│ ├── python/
│ ├── rust/
│ └── lean/
├── taxonomy/ # Cross-language coverage matrices
│ ├── techniques.md
│ ├── usecases.md
│ └── sources.md
├── .claude-plugin/
│ └── marketplace.json # For sharing via marketplace
└── docs/ # Supplementary documentation
Technique files use stable IDs (T01-algebraic-data-types.md) shared across languages. The same filename = the same concept. Gaps are visible by comparing directory listings.
/plugin marketplace add jpablo/vibe-types
/plugin install vibe-types@vibe-types-marketplace
This registers one skill per language (Python, Rust, Scala 3, Lean 4). Claude auto-loads the relevant skill when it detects a matching topic — no manual setup needed.
Use the built-in command to add a quick index to your CLAUDE.md:
/vibe-types:install-context
It asks which language and where to install, then appends the snippet. Or do it manually — paste one or more of the quick indexes below into your ~/.claude/CLAUDE.md (or project-level CLAUDE.md).
- Basic annotations & None handling: enforce types on params/returns; require None checks → `T13-null-safety`
- Union & Literal types: restrict values to declared alternatives; Literal for exact values → `T02-union-intersection`
- TypedDict: enforce dict key names, value types, and required/optional presence → `T31-record-types`
- Protocol (structural subtyping): static duck typing — verify method/attr presence without inheritance → `T07-structural-typing`
- Generics & TypeVar: preserve type relationships; bounds restrict acceptable types → `T04-generics-bounds`
- ParamSpec: preserve function signatures through decorators → `T45-paramspec-variadic`
- TypeGuard & TypeIs: custom narrowing functions; exhaustive branch handling → `T14-type-narrowing`
- Final & frozen dataclass: prevent reassignment, override, and mutation → `T32-immutability-markers`, `T06-derivation`
- Preventing invalid states: enums, Literal, NewType, Union — make invalid states unrepresentable → `UC01-invalid-states`
- Parse, don't validate: return refined types instead of checking and discarding → `UC01-invalid-states`