Type Theory
Expert skill in type theory foundations for implementing type systems including inference, checking, and subtyping
Best use case
Type Theory is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Expert skill in type theory foundations for implementing type systems including inference, checking, and subtyping
Teams using Type Theory should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/type-theory/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Type Theory Compares
| Feature / Agent | Type Theory | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Expert skill in type theory foundations for implementing type systems including inference, checking, and subtyping
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Type Theory Skill
## Overview
Expert skill in type theory foundations for implementing type systems including inference, checking, and subtyping.
## Capabilities
- Implement Hindley-Milner type inference with Algorithm W
- Implement constraint-based type inference with unification
- Design and implement bidirectional type checking
- Implement structural and nominal subtyping
- Handle variance (covariant, contravariant, invariant)
- Implement row polymorphism and record types
- Design flow-sensitive type narrowing
- Implement type error message generation
## Target Processes
- type-system-implementation.js
- semantic-analysis.js
- generics-polymorphism.js
- effect-system-design.js
## Dependencies
Academic type theory literature (TAPL, ATTAPL)
## Usage Guidelines
1. **Algorithm Selection**: Choose between HM inference and bidirectional checking based on language features
2. **Constraint Generation**: Separate constraint generation from solving for cleaner implementation
3. **Error Localization**: Track constraint origins for accurate error location
4. **Variance**: Document variance rules explicitly for all generic positions
5. **Gradual Typing**: Consider gradual typing for mixed typed/untyped codebases
## Output Schema
```json
{
"type": "object",
"properties": {
"inferenceAlgorithm": {
"type": "string",
"enum": ["hindley-milner", "bidirectional", "constraint-based", "flow-sensitive"]
},
"subtypingKind": {
"type": "string",
"enum": ["structural", "nominal", "mixed"]
},
"features": {
"type": "array",
"items": { "type": "string" }
},
"generatedFiles": {
"type": "array",
"items": { "type": "string" }
}
}
}
```Related Skills
typescript
TypeScript configuration, strict mode, generics, and type utilities.
prototype-interaction
Define and document prototype interactions, transitions, and hotspots
typespec-sdk-generator
Microsoft TypeSpec-based API and SDK generation
typescript-sdk-specialist
TypeScript SDK development with Node.js and browser support. Design SDK architecture, implement type-safe API clients, support ESM and CommonJS modules, and configure bundling for browsers.
critical-theory-application
Apply theoretical frameworks (postcolonial, feminist, Marxist, post-structuralist) to cultural texts and phenomena
type-inference-engine
Implement and test type inference algorithms including Algorithm W and constraint-based inference
hpo-phenotype-matcher
Human Phenotype Ontology skill for phenotype-driven gene prioritization
mcp-sdk-typescript-bootstrapper
Bootstrap MCP (Model Context Protocol) servers with the official TypeScript SDK. Creates complete server implementations with transport layer, tools, resources, and proper error handling.
number-theory-toolkit
Provide number theory algorithm implementations and guidance
process-builder
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
babysitter
Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)
yolo
Run Babysitter autonomously with minimal manual interruption.