# Type Inference Engine

> Type Inference Engine is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Implement and test type inference algorithms including Algorithm W and constraint-based inference

- Skill name: `type-inference-engine`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/domains/science/computer-science/skills/type-inference-engine/SKILL.md
- Repository: a5c-ai/babysitter (1,548 GitHub stars when collected)

## SKILL.md

# Type Inference Engine

## Purpose

Provides expert guidance on implementing type inference algorithms for programming language implementations.

## Capabilities

- Algorithm W implementation
- Constraint generation and solving
- Unification with occurs check
- Let-polymorphism (Hindley-Milner)
- Principal type computation
- Type error diagnosis

## Usage Guidelines

1. **Constraint Generation**: Generate type constraints from expressions
2. **Unification**: Implement unification algorithm
3. **Generalization**: Handle let-polymorphism
4. **Error Messages**: Generate informative type errors
5. **Testing**: Validate inference on test cases

## Tools/Libraries

- Language workbenches
- Constraint solvers
- Type inference libraries

---

Source: https://www.openparable.com/skill/development/type-inference-engine (OpenParable). Cite the canonical URL above.
