Authoring generators
Clone, customize, and write SKMTC generators.
Who this is for
You want generator behavior beyond what enrichments expose, or you're writing a new generator from scratch. You'll be reading and writing TypeScript in .skmtc/<project>/<gen-name>/src/.
None of this is required to use SKMTC — if you haven't used it as a consumer yet, start with using/. Authoring makes more sense once you've felt the customization limits, and it's more approachable than it sounds: generators build output with template literals (not ASTs) and compose with each other, so most authoring work is editing recognizable TypeScript. Stringable composition shows both ideas in real generator code.
The customization gradient
Use stock → install + accept defaults
Configure → enrichments in client.json
Customize behavior → clone + edit source ← extending starts here
Author new → write a new generatorStart here
- Anatomy of a generator — the one-page map of the parts (entry, base, enrichments, Projection, Snippets), how they run, and what keeps a generator maintainable. Read it before the tutorials.
Tutorials
Linear walkthroughs to learn by doing.
How-to guides
Recipes for specific problems.
- Change export paths
- Change identifier conventions
- Add a field type
- Swap a peer dependency
- Add enrichment options
- Compose with another generator
- Author a multi-generator stack
- Handle GraphQL instead of OAS
Recipes
Complete worked examples.
Shared resources you'll need
- Concepts — the DSL, the pipeline, cross-generator coordination, refs
- API reference —
@skmtc/coreexports, OAS object model, DSL classes - CLI reference —
clone,create,dev,bundle - Stock generators reference — source layout and clone seams per generator
- Explanation — design rationale for the architecture you'll be extending
Multi-project monorepo
One repo, multiple SKMTC projects writing into separate output directories — useful when you have several APIs or multiple consumer apps with different generator combinations.
Anatomy of a generator
The one-page map of a generator's parts — what each file is, how the parts run, and what keeps a generator maintainable as it grows. Read this before the authoring tutorials; every page in this tree assumes the vocabulary introduced here.