Type Inference
This skill automatically infers data types from code snippets, boosting developer productivity and reducing manual type annotations.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add type-inference npx -- -y @trustedskills/type-inference
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"type-inference": {
"command": "npx",
"args": [
"-y",
"@trustedskills/type-inference"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides access to Biome's type inference system, which automatically determines data types within code snippets. It leverages a module graph and specialized data structures like TypeReference and TypeData to enable fast, IDE-focused updates and performance. The system handles various TypeScript type constructs including primitives, functions, objects, unions, intersections, tuples, and more, represented by distinct variants of the TypeData enum.
When to use it
- When working with Biome's code editor for improved developer productivity.
- To understand how Biome infers types in local expressions (e.g.,
a + b). - For debugging or analyzing type inference results within a Biome project.
- When needing to examine the module-level ("thin") type inference process, which resolves references within a single module's scope.
Key capabilities
- Type Inference: Automatically determines data types from code.
- Module Graph Integration: Operates within Biome’s module graph architecture.
TypeReferenceUsage: UtilizesTypeReferencefor type referencing instead of direct references to avoid stale data.TypeDataEnum Representation: Provides access to theTypeDataenum, which represents various TypeScript types (e.g.,Unknown,Boolean,Function,Object).- Local Inference: Performs type inference based on expressions without surrounding context.
- Module-Level Inference: Resolves references within a module's scope.
Example prompts
- "What is the inferred type of 'a + b' in this Biome project?"
- "Show me the
TypeDatarepresentation for the inferred type of this function." - "Explain how Biome resolves type references during module-level inference."
Tips & gotchas
- This skill requires familiarity with TypeScript type system concepts and Biome's architecture.
- Refer to
crates/biome_js_type_info/CONTRIBUTING.mdfor detailed architectural information. - Biome prioritizes IDE support and instant updates, so data copying between modules is prohibited; instead, use
TypeReference.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.