kingwill101/stem/stem-builder-codegen
Claude Code and agent skill by kingwill101/stem
- community
Checking that the SKILL.md file is still in the repository.
Use when adding Stem annotations, generated task/workflow registries, DTO codecs, or build_runner configuration with stem_builder. Generate code from supported declarations and keep codec representations stable.
Install
npx vskill@latest install kingwill101/stem/stem-builder-codegenSKILL.md
The same SKILL.md was published earlier as kingwill101/stem/stem-builder-codegen.
stem_builder code generation
Rules
- Add
stemas a dependency andstem_builderplusbuild_runneras
development dependencies. Annotation types are exported by stem.
- Add a
part 'name.stem.g.dart';directive to the annotated library. Run
dart run build_runner build (or watch) from the consuming package.
- Use
@WorkflowDefnfor flow or script classes and@TaskDefnfor task
functions. Give persisted tasks, workflows, and checkpoints explicit stable names when a Dart rename must not change identity.
- A flow's first step defines its input contract. Later steps may read prior
results through the injected context; do not add required inputs that are absent from that contract.
- Script workflows use a plain
run(...)method. Annotated checkpoint methods
are called directly from run; the generated proxy routes them through durable script.step(...) execution.
- Supported context injection is deliberate: flow steps use
FlowContextor
WorkflowExecutionContext, script runs use WorkflowScriptContext, script checkpoints use WorkflowScriptStepContext or WorkflowExecutionContext, and typed task functions can inject TaskExecutionContext. Prefer typed serializable or codec-backed parameters; the context-plus-map signature is a legacy interoperability path, not a requirement for generated tasks.
- Use
@PayloadCodecDefn()for a customCodec<T, Object?>in the same
library. The binding must be non-nullable as a value, and its generic type and representation must remain exact; generic DTOs and unsupported shapes need an explicit binding.
- Generated JSON DTO adapters and stored schema-version formats are not a
license to change persisted names or representations casually. Regenerate after annotation changes and inspect the generated diff.
- Keep task and workflow names unique within one generated library. Compose
multiple generated libraries/modules explicitly so runtime conflict checks remain active.
Example
Save this annotated library as lib/definitions.dart, then generate its part:
For script workflows, add this class to the same annotated library:
Validation checklist
- Run the builder tests and an integration compile after changing
annotations or generated output.
- Check that generated names, codecs, and nullability match the declaration.
- Run the generated registry through the same runtime registration path used
by the application; generated source alone is not a worker.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/stem_builder/skills/stem_builder-codegen/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kingwill101/stem/stem-builder-codegen)