dagger-codegen
Original:🇺🇸 English
Translated
Edit dagger.gen.go output, Go templates (object.go.tmpl, defs.go.tmpl), invoke() dispatch, SDK interfaces (CodeGenerator, ClientGenerator), `dagger develop`, `dagger client install`. Keywords: codegen, SDK, bindings, templates, internal/dagger, dag.*, ModuleMainSrc
1installs
Sourcedagger/dagger
Added on
NPX Install
npx skill4agent add dagger/dagger dagger-codegenTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Dagger Codegen
When to Load This Skill
- Editing or
dagger.gen.gooutputinternal/dagger/dagger.gen.go - Modifying Go templates in
cmd/codegen/generator/go/templates/ - Changing SDK interfaces in
core/sdk.go - Working on ,
dagger develop, ordagger calldagger client install - Debugging why generated code looks wrong
Critical Concepts
"Codegen" means 4 different things in Dagger:
| # | Name | Trigger | Key Files |
|---|---|---|---|
| 1 | In-Module Bindings | | |
| 2 | Runtime Dispatch | Module startup | |
| 3 | SDK Libraries | | |
| 4 | Generated Clients | | |
Know which one you're dealing with before editing.
Key Entry Points
| To change... | Edit |
|---|---|
| Generated method signatures | |
| Generated type definitions | |
Module | |
Standalone client | |
| Template functions | |
| SDK interfaces | |
| Built-in SDK list | |
| Python output | |
Reference Files
Load based on specific need:
| Need | Load |
|---|---|
| Understanding the 4 codegen types | codegen-types.md |
| SDK architecture, interfaces, Go special case | sdk-architecture.md |
| Go template conditionals, two-pass generation | go-templates.md |
| generated-clients.md |