typespec-templates
CommunityMaster TypeSpec templates for reusable patterns
Software Engineering#templates#constraints#typespec#template-declarations#template-instantiation#is-extends
Authorhafley66
Version1.0.0
Installs0
System Documentation
What problem does it solve?
TypeSpec templates enable reusable type patterns, reducing boilerplate and ensuring consistent type declarations, relationships, and instantiations across codebases.
Core Features & Use Cases
- Define template declarations with type parameters for flexible, generic models.
- Instantiate templates with concrete types, including keyword argument syntax and named args for clarity.
- Apply template constraints with where clauses and is/extends relationships to enforce shapes and inheritance.
- Leverage template mappers, nested templates, and multi-parameter templates to compose complex patterns.
- Use cases include modeling generic responses, pagination structures, and reusable data shapes for codegen patterns.
Quick Start
Define a template like Response<T> and instantiate it with a concrete type to generate a specialized model.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: typespec-templates Download link: https://github.com/hafley66/claude-research/archive/main.zip#typespec-templates Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.